diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H deleted file mode 100644 index fe428b6e3bf606c25bacd523196415f6ff618a45..0000000000000000000000000000000000000000 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H +++ /dev/null @@ -1,8 +0,0 @@ -FieldField<fvsPatchField, scalar>& phibf = phi.boundaryField(); -const FieldField<fvPatchField, vector>& Ubf = U.boundaryField(); -const FieldField<fvsPatchField, vector>& Sfbf = mesh.Sf().boundaryField(); - -forAll(phibf, patchI) -{ - phibf[patchI] = (Ubf[patchI] & Sfbf[patchI]); -} diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/files b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/files similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/files rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/files diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/createFields.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H similarity index 88% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index 888d06a88989e40f736992a85afd058f6b106aaf..11dfa8a5200efcf9e848c25d00844edf9b2a0f41 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -1,5 +1,3 @@ -#include "resetPhiPatches.H" - volScalarField rAU(1.0/UEqn().A()); surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); @@ -22,6 +20,9 @@ adjustPhi(phiHbyA, U, p_gh); fvOptions.relativeFlux(phiHbyA); +// Update the phi BCs from U before p BCs are updated +phi.boundaryField() = mesh.Sf().boundaryField() & U.boundaryField(); + // Non-orthogonal pressure corrector loop while (pimple.correctNonOrthogonal()) { diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 34f97162852a3deda8ff73ca112603abdc93009e..e87f64bc30a36963458a0c20e0a2a5cefbd83c1b 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1783,7 +1783,7 @@ int main(int argc, char *argv[]) { extrudeMeshShadowFaces[nShadowFaces] = fz[j]; zoneShadowFlipMap[nShadowFaces] = fz.flipMap()[j]; - zoneShadowID[nShadowFaces] = zoneShadowIDs[i]; + zoneShadowID[nShadowFaces] = i; nShadowFaces++; } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C index 87c1dbe22d4b745cd142593528ddddf8b40a5e1f..f71a17cfcbddcae8873febeef01e42962e468d08 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C @@ -111,6 +111,8 @@ int main(int argc, char *argv[]) conformalVoronoiMesh::debug = true; + Info<< "Create mesh for time = " << runTime.timeName() << nl << endl; + conformalVoronoiMesh mesh(runTime, foamyHexMeshDict); diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H index ff6e106377aff725f21da957a762a980549a0516..8e803839905de31e8726b7834182413c3c4d384d 100644 --- a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H +++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,9 @@ public: class const_iterator; friend class const_iterator; + class const_reverse_iterator; + friend class const_reverse_iterator; + // Constructors @@ -254,6 +257,48 @@ public: }; + // STL const_reverse_iterator + + typedef typename LListBase::const_reverse_iterator + LListBase_const_reverse_iterator; + + //- An STL-conforming const_reverse_iterator + class const_reverse_iterator + : + public LListBase_const_reverse_iterator + { + + public: + + //- Construct from base const_reverse_iterator + const_reverse_iterator(LListBase_const_reverse_iterator baseIter) + : + LListBase_const_reverse_iterator(baseIter) + {} + + + // Member operators + + const T& operator*() + { + return + static_cast<const T&> + (LListBase_const_reverse_iterator::operator*()); + } + + const T& operator()() + { + return operator*(); + } + + const_reverse_iterator& operator++() + { + LListBase_const_reverse_iterator::operator++(); + return *this; + } + }; + + // STL member operators //- Equality operation on ULists of the same type. diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C index 95476fd89a7a15f71cf9bd8d6f78596cfcbec95d..4757dbb0f7f9d3f69001bba8cd38699486f8c607 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,12 @@ Foam::DLListBase::const_iterator Foam::DLListBase::endConstIter_ reinterpret_cast<const link*>(0) ); +Foam::DLListBase::const_reverse_iterator Foam::DLListBase::endConstRevIter_ +( + static_cast<const DLListBase&>(DLListBase()), + reinterpret_cast<const link*>(0) +); + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index 3af1b2b1bcb2059998106459585bec95ac840f24..2894931bcee5ebbed869a88aee243fb272de8874 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,9 @@ public: class const_iterator; friend class const_iterator; + class const_reverse_iterator; + friend class const_reverse_iterator; + // Constructors @@ -260,6 +263,43 @@ public: inline const_iterator begin() const; inline const const_iterator& end() const; + // STL const_reverse_iterator + + //- An STL-conforming const_reverse_iterator + class const_reverse_iterator + { + // Private data + + //- Reference to the list this is an reverse_iterator for + const DLListBase& curList_; + + //- Current element + const link* curElmt_; + + public: + + //- Construct for a given DLListBase and link + inline const_reverse_iterator(const DLListBase&, const link*); + + // Member operators + + inline void operator=(const const_reverse_iterator&); + + inline bool operator==(const const_reverse_iterator&) const; + inline bool operator!=(const const_reverse_iterator&) const; + + inline const link& operator*(); + + inline const_reverse_iterator& operator++(); + inline const_reverse_iterator operator++(int); + }; + + inline const_reverse_iterator crbegin() const; + inline const const_reverse_iterator& crend() const; + + inline const_reverse_iterator rbegin() const; + inline const const_reverse_iterator& rend() const; + private: //- iterator returned by end() @@ -268,6 +308,9 @@ private: //- const_iterator returned by end() static const_iterator endConstIter_; + //- const_reverse_iterator returned by end() + static const_reverse_iterator endConstRevIter_; + }; diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H index 9e7eeacd233e29b34d6c38e1268008b552c7e028..fd33c5efacf0d9072a236dee8e0094c5ce9f57c5 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -383,4 +383,111 @@ Foam::DLListBase::end() const } +// * * * * * * * * * * STL const_reverse_iterator * * * * * * * * * * * * * // + +inline Foam::DLListBase::const_reverse_iterator::const_reverse_iterator +( + const DLListBase& s, + const link* elmt +) +: + curList_(s), + curElmt_(elmt) +{} + + +inline void Foam::DLListBase::const_reverse_iterator::operator= +( + const const_reverse_iterator& iter +) +{ + curElmt_ = iter.curElmt_; +} + + +inline bool Foam::DLListBase::const_reverse_iterator::operator== +( + const const_reverse_iterator& iter +) const +{ + return curElmt_ == iter.curElmt_; +} + + +inline bool Foam::DLListBase::const_reverse_iterator::operator!= +( + const const_reverse_iterator& iter +) const +{ + return curElmt_ != iter.curElmt_; +} + + +inline const Foam::DLListBase::link& +Foam::DLListBase::const_reverse_iterator::operator*() +{ + return *curElmt_; +} + + +inline Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::const_reverse_iterator::operator++() +{ + if (curElmt_ == curList_.first_) + { + curElmt_ = 0; + } + else + { + curElmt_ = curElmt_->prev_; + } + + return *this; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::const_reverse_iterator::operator++(int) +{ + const_reverse_iterator tmp = *this; + ++*this; + return tmp; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::crbegin() const +{ + if (size()) + { + return const_reverse_iterator(*this, last()); + } + else + { + return endConstRevIter_; + } +} + + +inline const Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::crend() const +{ + return endConstRevIter_; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::rbegin() const +{ + return this->crbegin(); +} + + +inline const Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::rend() const +{ + return endConstRevIter_; +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C index fd79d3835ad671233d47b1b93671c3aab57be7b6..7c68958b1563f683c3d7a743a320e3136650ee9c 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -628,197 +628,245 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define PRODUCT_OPERATOR(product, op, opFunc) \ - \ -template<template<class> class Field, class Type1, class Type2> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type1, Type2>::type>& f, \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], f1[i], f2[i]); \ - } \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), f1, f2); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type2>::New(tf2) \ - ); \ - opFunc(tRes(), f1, tf2()); \ - reuseTmpFieldField<Field, productType, Type2>::clear(tf2); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type1>::New(tf1) \ - ); \ - opFunc(tRes(), tf1(), f2); \ - reuseTmpFieldField<Field, productType, Type1>::clear(tf1); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpTmpFieldField<Field, productType, Type1, Type1, Type2>::New \ - (tf1, tf2) \ - ); \ - opFunc(tRes(), tf1(), tf2()); \ - reuseTmpTmpFieldField<Field, productType, Type1, Type1, Type2>::clear \ - (tf1, tf2); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type, Form>::type>& f, \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], f1[i], vs); \ - } \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - typedef typename product<Type, Form>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), f1, static_cast<const Form&>(vs)); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type> >& tf1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - typedef typename product<Type, Form>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type>::New(tf1) \ - ); \ - opFunc(tRes(), tf1(), static_cast<const Form&>(vs)); \ - reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -void opFunc \ -( \ - FieldField<Field, typename product<Form, Type>::type>& f, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], vs, f1[i]); \ - } \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -) \ -{ \ - typedef typename product<Form, Type>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), static_cast<const Form&>(vs), f1); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const tmp<FieldField<Field, Type> >& tf1 \ -) \ -{ \ - typedef typename product<Form, Type>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type>::New(tf1) \ - ); \ - opFunc(tRes(), static_cast<const Form&>(vs), tf1()); \ - reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ - return tRes; \ +#define PRODUCT_OPERATOR(product, op, opFunc) \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +void opFunc \ +( \ + FieldField<Field1, typename product<Type1, Type2>::type>& f, \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], f1[i], f2[i]); \ + } \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + FieldField<Field1, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, f2); \ + return tRes; \ +} \ + \ +template<template<class> class Field, class Type1, class Type2> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field, Type1>& f1, \ + const tmp<FieldField<Field, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type2>::New(tf2) \ + ); \ + opFunc(tRes(), f1, tf2()); \ + reuseTmpFieldField<Field, productType, Type2>::clear(tf2); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + FieldField<Field1, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, tf2()); \ + tf2.clear(); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + reuseTmpFieldField<Field1, productType, Type1>::New(tf1) \ + ); \ + opFunc(tRes(), tf1(), f2); \ + reuseTmpFieldField<Field1, productType, Type1>::clear(tf1); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::New \ + (tf1, tf2) \ + ); \ + opFunc(tRes(), tf1(), tf2()); \ + reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::clear \ + (tf1, tf2); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +void opFunc \ +( \ + FieldField<Field, typename product<Type, Form>::type>& f, \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], f1[i], vs); \ + } \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + typedef typename product<Type, Form>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + FieldField<Field, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, static_cast<const Form&>(vs)); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field, Type> >& tf1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + typedef typename product<Type, Form>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type>::New(tf1) \ + ); \ + opFunc(tRes(), tf1(), static_cast<const Form&>(vs)); \ + reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +void opFunc \ +( \ + FieldField<Field, typename product<Form, Type>::type>& f, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], vs, f1[i]); \ + } \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +) \ +{ \ + typedef typename product<Form, Type>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + FieldField<Field, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), static_cast<const Form&>(vs), f1); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const tmp<FieldField<Field, Type> >& tf1 \ +) \ +{ \ + typedef typename product<Form, Type>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type>::New(tf1) \ + ); \ + opFunc(tRes(), static_cast<const Form&>(vs), tf1()); \ + reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ + return tRes; \ } PRODUCT_OPERATOR(typeOfSum, +, add) diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H index ba4be61880014e3a033f5377db3e7940406b6b03..65f68b34ec02174d1f19775db5cd7a56306d3245 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -267,100 +267,138 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define PRODUCT_OPERATOR(product, op, opFunc) \ - \ -template<template<class> class Field, class Type1, class Type2> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type1, Type2>::type>& f, \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type, Form>::type>& f, \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type> >& tf1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -void opFunc \ -( \ - FieldField<Field, typename product<Form, Type>::type>& f, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const tmp<FieldField<Field, Type> >& tf1 \ +#define PRODUCT_OPERATOR(product, op, opFunc) \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +void opFunc \ +( \ + FieldField<Field1, typename product<Type1, Type2>::type>& f, \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template<template<class> class Field, class Type1, class Type2> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field, Type1>& f1, \ + const tmp<FieldField<Field, Type2> >& tf2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +void opFunc \ +( \ + FieldField<Field, typename product<Type, Form>::type>& f, \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field, Type> >& tf1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +void opFunc \ +( \ + FieldField<Field, typename product<Form, Type>::type>& f, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const tmp<FieldField<Field, Type> >& tf1 \ ); PRODUCT_OPERATOR(typeOfSum, +, add) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index c024d98389b64ee3d8b573ba119c58e3f6a0cb96..a13a24b0d466c66a03478401620311cb6249f718 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -50,7 +50,8 @@ readField } - // 1. Handle explicit patch names + // 1. Handle explicit patch names. Note that there can be only one explicit + // patch name since is key of dictionary. forAllConstIter(dictionary, dict, iter) { if (iter().isDict() && !iter().keyword().isPattern()) @@ -76,33 +77,45 @@ readField // 2. Patch-groups. (using non-wild card entries of dictionaries) // (patchnames already matched above) - // Note: in order of entries in the dictionary (first patchGroups wins) - forAllConstIter(dictionary, dict, iter) + // Note: in reverse order of entries in the dictionary (last + // patchGroups wins). This is so is consistent with dictionary wildcard + // behaviour + if (dict.size()) { - if (iter().isDict() && !iter().keyword().isPattern()) + for + ( + IDLList<entry>::const_reverse_iterator iter = dict.rbegin(); + iter != dict.rend(); + ++iter + ) { - const labelList patchIDs = bmesh_.findIndices - ( - iter().keyword(), - true // use patchGroups - ); + const entry& e = iter(); - forAll(patchIDs, i) + if (e.isDict() && !e.keyword().isPattern()) { - label patchi = patchIDs[i]; + const labelList patchIDs = bmesh_.findIndices + ( + e.keyword(), + true // use patchGroups + ); - if (!this->set(patchi)) + forAll(patchIDs, i) { - this->set - ( - patchi, - PatchField<Type>::New + label patchi = patchIDs[i]; + + if (!this->set(patchi)) + { + this->set ( - bmesh_[patchi], - field, - iter().dict() - ) - ); + patchi, + PatchField<Type>::New + ( + bmesh_[patchi], + field, + e.dict() + ) + ); + } } } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C index 6c18b43d0a5e17debe9c57967888bc280ab4a6c4..3cdf3a6e4e6e29bb38c3c43f7ad7fbdf86f22f65 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C @@ -90,10 +90,6 @@ void Foam::GAMGSolver::interpolate { corrC[restrictAddressing[celli]] += diagPtr[celli]*psiPtr[celli]; diagC[restrictAddressing[celli]] += diagPtr[celli]; - //corrC[restrictAddressing[celli]] += psiPtr[celli]/diagPtr[celli]; - //diagC[restrictAddressing[celli]] += 1.0/diagPtr[celli]; - //corrC[restrictAddressing[celli]] += psiPtr[celli]; - //diagC[restrictAddressing[celli]] += 1.0; } for (register label ccelli=0; ccelli<nCCells; ccelli++) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C index b6c30898de0b5d73c2d5fbf18ab1ef53430379ce..a3e22411d93905c53bd211bf826f6909096da5d6 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C @@ -313,7 +313,7 @@ void Foam::GAMGSolver::Vcycle scalarField& ACfRef = const_cast<scalarField&>(ACf.operator const scalarField&()); - if (interpolateCorrection_ && leveli < coarsestLevel - 2) + if (interpolateCorrection_) //&& leveli < coarsestLevel - 2) { interpolate ( diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H index 80ad9195472e75aff4979797485949d8467a2d24..f1d07d79b98d0c9b38c02013efd183f1cb37e993 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,16 +98,6 @@ public: //- Destructor virtual ~coupledPointPatch(); - - // Member Functions - - // Access - - //- Return true because this patch is coupled - virtual bool coupled() const - { - return true; - } }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H index da777d683c53287bc9ee0942c9c989919d8bd7ad..6699795bfc87ef14a76bda87cdef1681f0a4bc5a 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H @@ -115,19 +115,6 @@ public: // Member functions - //- Return true if running parallel - virtual bool coupled() const - { - if (Pstream::parRun()) - { - return true; - } - else - { - return false; - } - } - //- Return message tag to use for communication virtual int tag() const { diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H index c59234c66c5d5143ba7a9db32d5dc191f0f6531a..f5958be5e042a026501c846355be1a04022ac72f 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,6 +171,12 @@ public: return polyPatch_.index(); } + //- Return true if this patch field is coupled + virtual bool coupled() const + { + return polyPatch_.coupled(); + } + //- Return mesh points virtual const labelList& meshPoints() const { diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C index 4d32bfa89f8ddd66a433c541461ddc9220fc32ba..311df77f7dac967114acf8f507ac77c994423e14 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C @@ -38,7 +38,7 @@ makeCompactCellFaceAddressingAndFaceWeights const lduAddressing& fineAddressing, List<idxtype>& cellCells, List<idxtype>& cellCellOffsets, - const vectorField& Si, + const scalarField& magSi, List<scalar>& faceWeights ) { @@ -87,8 +87,8 @@ makeCompactCellFaceAddressingAndFaceWeights cellCells[l1] = nei; cellCells[l2] = own; - faceWeights[l1] = mag(Si[facei]); - faceWeights[l2] = mag(Si[facei]); + faceWeights[l1] = magSi[facei]; + faceWeights[l2] = magSi[facei]; } } @@ -100,8 +100,8 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate const label maxSize, const lduAddressing& fineAddressing, const scalarField& V, - const vectorField& Sf, - const scalarField& Sb + const scalarField& magSf, + const scalarField& magSb ) { const label nFineCells = fineAddressing.size(); @@ -119,15 +119,15 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate fineAddressing, cellCells, cellCellOffsets, - Sf, + magSf, faceWeights ); // agglomeration options. List<int> options(4, 0); - options[0] = 4; // globular agglom - options[1] = 6; // objective F3 and F2 - options[2] = 128; // debugging output level + options[0] = 4; // globular agglom + options[1] = 6; // objective F3 and F2 + options[2] = 128; // debugging output level options[3] = fvMesh_.nGeometricD(); // Dimensionality of the grid @@ -140,7 +140,7 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate nFineCells, cellCellOffsets.begin(), const_cast<scalar*>(V.begin()), - const_cast<scalar*>(Sb.begin()), + const_cast<scalar*>(magSb.begin()), cellCells.begin(), faceWeights.begin(), minSize, @@ -157,8 +157,7 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate bool ok = checkRestriction ( newRestrictAddr, - nNewCoarseCells -, + nNewCoarseCells, fineAddressing, finalAgglom, nCoarseCells diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index cc259c5038483972c243664d9058558cd71af950..dd912465a0ca32ed9fba08b4bed8ec9402d63759 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -25,6 +25,7 @@ License #include "MGridGenGAMGAgglomeration.H" #include "fvMesh.H" +#include "processorPolyPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -60,20 +61,19 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration // Start geometric agglomeration from the cell volumes and areas of the mesh scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes()); - vectorField magFaceAreas(vector::one*mag(fvMesh_.faceAreas())); - SubField<vector> Sf(magFaceAreas, fvMesh_.nInternalFaces()); - //SubField<vector> Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces()); + scalarField magFaceAreas(sqrt(3.0)*mag(fvMesh_.faceAreas())); + SubField<scalar> magSf(magFaceAreas, fvMesh_.nInternalFaces()); - vectorField* SfPtr = const_cast<vectorField*> + scalarField* magSfPtr = const_cast<scalarField*> ( - &Sf.operator const vectorField&() + &magSf.operator const scalarField&() ); // Create the boundary area cell field - scalarField* SbPtr(new scalarField(fvMesh_.nCells(), 0)); + scalarField* magSbPtr(new scalarField(fvMesh_.nCells(), 0)); { - scalarField& Sb = *SbPtr; + scalarField& magSb = *magSbPtr; const labelList& own = fvMesh_.faceOwner(); const vectorField& Sf = fvMesh_.faceAreas(); @@ -82,11 +82,32 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration { if (!fvMesh_.isInternalFace(facei)) { - Sb[own[facei]] += mag(Sf[facei]); + magSb[own[facei]] += mag(Sf[facei]); } } } + /* + { + scalarField& magSb = *magSbPtr; + const polyBoundaryMesh& patches = fvMesh_.boundaryMesh(); + + forAll(patches, patchi) + { + const polyPatch& pp = patches[patchi]; + + if (!(Pstream::parRun() && isA<processorPolyPatch>(pp))) + { + const labelUList& faceCells = pp.faceCells(); + const vectorField& pSf = pp.faceAreas(); + forAll(faceCells, pfi) + { + magSb[faceCells[pfi]] += mag(pSf[pfi]); + } + } + } + } + */ // Agglomerate until the required number of cells in the coarsest level // is reached @@ -104,8 +125,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration maxSize, meshLevel(nCreatedLevels).lduAddr(), *VPtr, - *SfPtr, - *SbPtr + *magSfPtr, + *magSbPtr ); if (continueAgglomerating(nCoarseCells)) @@ -140,37 +161,37 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration // Agglomerate the face areas field for the next level { - vectorField* aggSfPtr + scalarField* aggMagSfPtr ( - new vectorField + new scalarField ( meshLevels_[nCreatedLevels].upperAddr().size(), - vector::zero + 0 ) ); - restrictFaceField(*aggSfPtr, *SfPtr, nCreatedLevels); + restrictFaceField(*aggMagSfPtr, *magSfPtr, nCreatedLevels); if (nCreatedLevels) { - delete SfPtr; + delete magSfPtr; } - SfPtr = aggSfPtr; + magSfPtr = aggMagSfPtr; } // Agglomerate the cell boundary areas field for the next level { - scalarField* aggSbPtr + scalarField* aggMagSbPtr ( new scalarField(meshLevels_[nCreatedLevels].size()) ); // Restrict but no parallel agglomeration (not supported) - restrictField(*aggSbPtr, *SbPtr, nCreatedLevels, false); + restrictField(*aggMagSbPtr, *magSbPtr, nCreatedLevels, false); - delete SbPtr; - SbPtr = aggSbPtr; + delete magSbPtr; + magSbPtr = aggMagSbPtr; } nCreatedLevels++; @@ -183,9 +204,9 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration if (nCreatedLevels) { delete VPtr; - delete SfPtr; + delete magSfPtr; } - delete SbPtr; + delete magSbPtr; } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H index ea6b5e9c19231dce65aa78fdcb164b1d5ea66394..5ed8e2a401c11c640a0ceaaccedc755a84f4c3f7 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -73,7 +73,7 @@ class MGridGenGAMGAgglomeration const lduAddressing& fineAddressing, List<idxtype>& cellCells, List<idxtype>& cellCellOffsets, - const vectorField& Si, + const scalarField& magSi, List<scalar>& faceWeights ); @@ -85,8 +85,8 @@ class MGridGenGAMGAgglomeration const label maxSize, const lduAddressing& fineAddressing, const scalarField& V, - const vectorField& Sf, - const scalarField& Sb + const scalarField& magSf, + const scalarField& magSb ); diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index 8a3cd26b68b5501a79d192de54e8f70983f1b171..bd9eb4c0063397f7774221c4fe95ed14c2e462b6 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection const scalar projectLen = mag(mesh.bounds().max()-mesh.bounds().min()); // For case of fixed projection vector: - vector projectVec; + vector projectVec(vector::zero); if (projectMode_ == FIXEDNORMAL) { vector n = projectDir_/mag(projectDir_); diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 6fd254c46e574fa0ae9c021191285112121f0b79..6a61832cd61a18c73db4ededf69d14a24effaa5c 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2501,7 +2501,8 @@ void Foam::autoLayerDriver::addLayers if (debug&meshRefinement::MESH) { const_cast<Time&>(mesh.time())++; - Info<< "Writing baffled mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing baffled mesh to time " + << meshRefiner_.timeName() << endl; meshRefiner_.write ( debug, @@ -2923,7 +2924,8 @@ void Foam::autoLayerDriver::addLayers ); const_cast<Time&>(mesh.time())++; - Info<< "Writing shrunk mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing shrunk mesh to time " + << meshRefiner_.timeName() << endl; // See comment in autoSnapDriver why we should not remove meshPhi // using mesh.clearOut(). @@ -3057,7 +3059,8 @@ void Foam::autoLayerDriver::addLayers if (debug&meshRefinement::MESH) { - Info<< "Writing layer mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing layer mesh to time " << meshRefiner_.timeName() + << endl; newMesh.write(); cellSet addedCellSet ( diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index 014c616287793e99bca6a09c88b28e2e5672e454..9f881a52f33ddbfaee0d9df8ef4cbd5dfb2e6e2c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -958,13 +958,15 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Because of isCollapsedFace one side can decide not to baffle whereas // the other side does so sync. Baffling is prefered over not baffling. - syncTools::syncFaceList - ( - mesh_, - facePatch, - maxEqOp<label>() - ); - + if (checkCollapse) // Or always? + { + syncTools::syncFaceList + ( + mesh_, + facePatch, + maxEqOp<label>() + ); + } Info<< "markFacesOnProblemCells : marked " << returnReduce(nBaffleFaces, sumOp<label>()) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H index 3cbe4c29f683f28034d4656c05ff7c83122f50a4..6641d0d1e291236da3c55ad5153c3af68fce938f 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H @@ -112,13 +112,6 @@ public: // Member Functions - //- Is patch 'coupled'. Note that on AMI the geometry is not - // coupled but the fields are! - virtual bool coupled() const - { - return false; - } - //- Return the constraint type this pointPatch implements. virtual const word& constraintType() const { diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/U b/tutorials/incompressible/simpleFoam/motorBike/0.org/U index 635097121830b8f88d0a5b59d3c30072c18bc1f4..fee3ec88b81f8729dc0e6b67a07a3385f0e525fc 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/U +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/U @@ -41,7 +41,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type fixedValue; value uniform (0 0 0); diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/k b/tutorials/incompressible/simpleFoam/motorBike/0.org/k index 834d2ad52c2afbf990bab910a1b7884eaaead3f3..301f8b579c183903925c73cd09dbb824793e3233 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/k +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/k @@ -41,7 +41,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type kqRWallFunction; value $internalField; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/nut b/tutorials/incompressible/simpleFoam/motorBike/0.org/nut index 999d0b331ea7193114a3bfd0fe39a0b9dd7c2375..c940f6b2d626139de3f580952b9a06b9c408d418 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/nut +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/nut @@ -54,7 +54,7 @@ boundaryField value uniform 0; } - "motorBike_.*" + motorBikeGroup { type nutkWallFunction; value uniform 0; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/omega b/tutorials/incompressible/simpleFoam/motorBike/0.org/omega index 5362d6c44e1c87b97d88cd93c1e040724ab07674..7eff6c73556546386383963a0bcb40c7519b097e 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/omega +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/omega @@ -40,7 +40,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type omegaWallFunction; value $internalField; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/p b/tutorials/incompressible/simpleFoam/motorBike/0.org/p index e6eb255c41d060020335b314f126a956eec66256..419e1a85d8844d6a27ad3ec5737f231a55d2a748 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/p +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/p @@ -41,7 +41,7 @@ boundaryField type zeroGradient; } - "motorBike_.*" + motorBikeGroup { type zeroGradient; } diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean index af2c672ef80199607ae5e95c9ffdce80e8425776..25434c9d020ccd96ae202e35e0dc296d3bc685c8 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allclean +++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean @@ -3,8 +3,10 @@ # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -# remove surface +# remove surface and features \rm -f constant/triSurface/motorBike.obj.gz +\rm -rf constant/extendedFeatureEdgeMesh/ +\rm -f constant/triSurface/motorBike.eMesh rm -rf 0 > /dev/null 2>&1 diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary deleted file mode 100644 index ce1bcc0d3a591dd8d2e80eb316f061cbb12fcb53..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -5 -( - frontAndBack - { - type patch; - nFaces 320; - startFace 3456; - } - inlet - { - type patch; - nFaces 64; - startFace 3776; - } - outlet - { - type patch; - nFaces 64; - startFace 3840; - } - lowerWall - { - type wall; - nFaces 160; - startFace 3904; - } - upperWall - { - type patch; - nFaces 160; - startFace 4064; - } -) - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs index e4977a21d67e8fc508c98229db21659e0d4876cf..3012c35b321d732b92bda85c408192a951682c42 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs +++ b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs @@ -12,12 +12,11 @@ forceCoeffs1 functionObjectLibs ( "libforces.so" ); - outputControl timeStep; - outputInterval 1; + outputControl outputTime; log yes; - patches ( "motorBike.*" ); + patches ( motorBikeGroup ); pName p; UName U; rhoName rhoInf; // Indicates incompressible @@ -31,6 +30,7 @@ forceCoeffs1 lRef 1.42; // Wheelbase length Aref 0.75; // Estimated +/* - Uncomment to have forceCoeffs calculated in 20 bins binData { nBin 20; // output data into 20 bins @@ -38,6 +38,7 @@ forceCoeffs1 format gnuplot; cumulative yes; } +*/ } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes index 36a6021c97a5b210efcb5206792ea644ef62b423..c0f1506a7ce5fce2b53f6dde09e233def2088830 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes @@ -22,6 +22,7 @@ ddtSchemes gradSchemes { default Gauss linear; + grad(U) cellLimited Gauss linear 1; } divSchemes diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution index 5037a3c14f6efef9376e464f2694dcbaead87e6b..55c9820427db82757efd4a3df9fb7909bdc31cb7 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution @@ -20,7 +20,7 @@ solvers { solver GAMG; tolerance 1e-7; - relTol 0.1; + relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict index 17d0e6feb5255bd8de6b147f64e533449d1af8cf..00cc7b66ef59360041472923914717ec2b2d7712 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict @@ -92,7 +92,7 @@ castellatedMeshControls ( { file "motorBike.eMesh"; - level 0; + level 6; } ); @@ -119,7 +119,7 @@ castellatedMeshControls patchInfo { type wall; - inGroups (motorBike); + inGroups (motorBikeGroup); } } } @@ -180,10 +180,10 @@ snapControls //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. - tolerance 4.0; + tolerance 2.0; //- Number of mesh displacement relaxation iterations. - nSolveIter 0; + nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. @@ -193,14 +193,14 @@ snapControls //- Number of feature edge snapping iterations. // Leave out altogether to disable. - nFeatureSnapIter 0; + nFeatureSnapIter 10; //- Detect (geometric only) features by sampling the surface // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) - explicitFeatureSnap false; + explicitFeatureSnap true; //- Detect points on multiple surfaces (only for explicitFeatureSnap) multiRegionFeatureSnap false; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines b/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines index e3e050e2b92f8960bc77ae6e56aa7e68cb08a8ff..c071607c9ac4ed383efae7560fe8a56383d3bee9 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines +++ b/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines @@ -16,7 +16,6 @@ near // Output every outputControl outputTime; - //outputInterval 1; // Fields to be sampled. Per field original name and mapped field to // create. @@ -27,7 +26,7 @@ near ); // Patches/groups to sample (regular expressions) - patches (motorBike); + patches (motorBikeGroup); // Distance to sample distance 0.001; @@ -42,7 +41,6 @@ wallBoundedStreamLines // Output every outputControl outputTime; - // outputInterval 10; setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; @@ -87,7 +85,7 @@ wallBoundedStreamLines patchSeedCoeffs { type patchSeed; - patches (motorBike); + patches (motorBikeGroup); axis x; //distance; maxPoints 20000; } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon index 15724a840fd98e470dba5398cf6ea664ed80f294..84e17340fa2865292135d3e52269fb8b2d4a834b 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon @@ -40,7 +40,7 @@ boundaryField walls { type epsilonWallFunction; - value uniform 0; + value $internalField; } } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary deleted file mode 100644 index 123fc6be271cf0b98d8ab3ac8dff9ed781fb9d26..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -5 -( - inlet - { - type patch; - nFaces 28; - startFace 4422; - } - outlet - { - type patch; - nFaces 28; - startFace 4450; - } - side1 - { - type cyclicAMI; - inGroups 1(cyclicAMI); - nFaces 400; - startFace 4478; - matchTolerance 0.0001; - transform rotational; - neighbourPatch side2; - rotationAxis (1 0 0); - rotationCentre (0 0 0); - } - side2 - { - type cyclicAMI; - inGroups 1(cyclicAMI); - nFaces 250; - startFace 4878; - matchTolerance 0.0001; - transform rotational; - neighbourPatch side1; - rotationAxis (1 0 0); - rotationCentre (0 0 0); - } - walls - { - type wall; - nFaces 250; - startFace 5128; - } -) - -// ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties index 20eed6f6e0e785cd4e37eeb988c69c98396ada00..159b737d17d47fd5bf88055b4a4d843791836cba 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "constant"; - object reactingCloud1Properties; + object kinematicCloudProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,8 +48,6 @@ constantProperties rho0 964; youngsModulus 6e8; poissonsRatio 0.35; - - constantVolume false; } @@ -66,18 +64,12 @@ subModels dispersionModel none; - patchInteractionModel standardWallInteraction; - - heatTransferModel none; - - stochasticCollisionModel none; + patchInteractionModel none; surfaceFilmModel none; collisionModel pairCollision; - radiation off; - pairCollisionCoeffs { // Maximum possible particle diameter expected at any time @@ -123,11 +115,6 @@ subModels } }; } - - standardWallInteractionCoeffs - { - type rebound; - } } diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties index b24dcb63b23eba2f077124ac95e021fd7d0744a8..49458393ea6fb5b6755a4bf34826816045936ef9 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "constant"; - object reactingCloud1Properties; + object kinematicCloudProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,8 +40,6 @@ constantProperties rho0 964; youngsModulus 6e8; poissonsRatio 0.35; - - constantVolume false; } subModels @@ -76,18 +74,12 @@ subModels dispersionModel none; - patchInteractionModel standardWallInteraction; - - heatTransferModel none; - - stochasticCollisionModel none; + patchInteractionModel none; surfaceFilmModel none; collisionModel pairCollision; - radiation off; - pairCollisionCoeffs { // Maximum possible particle diameter expected at any time @@ -133,11 +125,6 @@ subModels } }; } - - standardWallInteractionCoeffs - { - type rebound; - } } diff --git a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict deleted file mode 120000 index 6fe38b15ec13cdd9b1d68fbf890f865afd36d644..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict +++ /dev/null @@ -1 +0,0 @@ -backgroundMeshDecomposition/decomposeParDict \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..3d3806e87382b1f4fef074e2aad6f535c98881b6 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method scotch; +//method ptscotch; +// method hierarchical; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 1 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict deleted file mode 120000 index 6fe38b15ec13cdd9b1d68fbf890f865afd36d644..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict +++ /dev/null @@ -1 +0,0 @@ -backgroundMeshDecomposition/decomposeParDict \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..afb5d8a226cc699ab6db67b043e65ba01103f2d7 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/decomposeParDict @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method scotch; +method hierarchical; + +simpleCoeffs +{ + n ( 2 2 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict deleted file mode 120000 index 6fe38b15ec13cdd9b1d68fbf890f865afd36d644..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict +++ /dev/null @@ -1 +0,0 @@ -backgroundMeshDecomposition/decomposeParDict \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..24853f860c83fa3934d4a639a8cd06eef84ab905 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method ptscotch; +//method hierarchical; +method scotch; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/U b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/U rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allclean rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allrun rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/g b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/g similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/g rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/g diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData similarity index 98% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData index 584f0ea0d51cc70fcc8d28f34781e5260abcefbb..bc1a5b586c255ce2640d8047342e93c127c3f0a3 100755 --- a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData +++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData @@ -1,3 +1,2 @@ #!/bin/sh awk '{print $1 " " $4}' postProcessing/poolHeight/0/faceSource.dat > poolHeight_vs_time - diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict