diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index f85b65435b..7a98cf9af2 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -30,7 +30,6 @@ Description #include "Time.H" #include "polyMesh.H" #include "primitivePatch.H" -#include "faceIOList.H" #include "IFstream.H" #include "OFstream.H" diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index c48abfbc39..71af306d33 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -293,11 +293,13 @@ int main(int argc, char *argv[]) // From global region number to mesh patch. globalToPatch.setSize(surfaces.nRegions(), -1); - Info<< "Patch\tRegion" << nl - << "-----\t------" + Info<< "Patch\tType\tRegion" << nl + << "-----\t----\t------" << endl; const labelList& surfaceGeometry = surfaces.surfaces(); + const PtrList& surfacePatchInfo = surfaces.patchInfo(); + forAll(surfaceGeometry, surfI) { label geomI = surfaceGeometry[surfI]; @@ -308,15 +310,34 @@ int main(int argc, char *argv[]) forAll(regNames, i) { - label patchI = meshRefiner.addMeshedPatch - ( - regNames[i], - wallPolyPatch::typeName - ); + label globalRegionI = surfaces.globalRegion(surfI, i); - Info<< patchI << '\t' << regNames[i] << nl; + label patchI; - globalToPatch[surfaces.globalRegion(surfI, i)] = patchI; + if (surfacePatchInfo.set(globalRegionI)) + { + patchI = meshRefiner.addMeshedPatch + ( + regNames[i], + surfacePatchInfo[globalRegionI] + ); + } + else + { + dictionary patchInfo; + patchInfo.set("type", wallPolyPatch::typeName); + + patchI = meshRefiner.addMeshedPatch + ( + regNames[i], + patchInfo + ); + } + + Info<< patchI << '\t' << mesh.boundaryMesh()[patchI].type() + << '\t' << regNames[i] << nl; + + globalToPatch[globalRegionI] = patchI; } Info<< nl; @@ -431,7 +452,7 @@ int main(int argc, char *argv[]) { cpuTime timer; - autoLayerDriver layerDriver(meshRefiner); + autoLayerDriver layerDriver(meshRefiner, globalToPatch); // Layer addition parameters layerParameters layerParams(layerDict, mesh.boundaryMesh()); diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index a15aa483c4..dbfcbd12d5 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -343,7 +343,8 @@ meshQualityControls //- Minimum quality of the tet formed by the face-centre // and variable base point minimum decomposition triangles and - // the cell centre. Set to very negative number (e.g. -1E30) to + // the cell centre. This has to be a positive number for tracking + // to work. Set to very negative number (e.g. -1E30) to // disable. // <0 = inside out tet, // 0 = flat tet diff --git a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C index 2649cc1e4e..c340aedb17 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C +++ b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C @@ -166,10 +166,10 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << endl; // Convert all the standard mesh files - writeMeshObject("cells", meshDir, runTime); + writeMeshObject("cells", meshDir, runTime); writeMeshObject("owner", meshDir, runTime); writeMeshObject("neighbour", meshDir, runTime); - writeMeshObject("faces", meshDir, runTime); + writeMeshObject("faces", meshDir, runTime); writeMeshObject("points", meshDir, runTime); writeMeshObject("pointProcAddressing", meshDir, runTime); writeMeshObject("faceProcAddressing", meshDir, runTime); diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C index e615ebe210..89cf00cd1b 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -311,7 +311,7 @@ void rewriteField { IOWarningIn("rewriteField(..)", patchDict) << "Cyclic patch " << patchName - << " has value entry. Please removed this and rerun." + << " has value entry. Please remove this and rerun." << endl; } diff --git a/etc/bashrc b/etc/bashrc index e5c050b44f..e194bba3d0 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -131,7 +131,8 @@ unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH # WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION -# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA +# | MPI | QSMPI : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB @@ -241,7 +242,8 @@ foamClean=$WM_PROJECT_DIR/bin/foamCleanPath cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned" #- Clean LD_LIBRARY_PATH -cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` && LD_LIBRARY_PATH="$cleaned" +cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \ + && LD_LIBRARY_PATH="$cleaned" #- Clean MANPATH cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned" @@ -257,8 +259,13 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.sh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc -_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc +paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \ + && _foamSource $paraview3 +unset paraview3 + +ensight=`$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/bashrc` \ + && _foamSource $ensight +unset ensight # Clean environment paths again. Only remove duplicates diff --git a/etc/cshrc b/etc/cshrc index 7ceff2ff58..807d38f042 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -255,8 +255,17 @@ _foamSource $WM_PROJECT_DIR/etc/aliases.csh # Source user setup files for optional packages # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -_foamSource $WM_PROJECT_DIR/etc/apps/paraview3/cshrc -# _foamSource $WM_PROJECT_DIR/etc/apps/ensight/cshrc +set paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc` +if ( $status == 0 ) then + _foamSource $paraview3 +endif +unset paraview3 + +set ensight=`$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc` +if ( $status == 0 ) then + _foamSource $ensight +endif +unset ensight # Clean environment paths again. Only remove duplicates diff --git a/src/OpenFOAM/db/IOobjects/IOListList/IOListList.C b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C similarity index 87% rename from src/OpenFOAM/db/IOobjects/IOListList/IOListList.C rename to src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C index 0f1b320195..ac21a5e4c5 100644 --- a/src/OpenFOAM/db/IOobjects/IOListList/IOListList.C +++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C @@ -23,13 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "IOListList.H" +#include "CompactIOList.H" #include "labelList.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -void Foam::IOListList::readFromStream() +void Foam::CompactIOList::readFromStream() { Istream& is = readStream(word::null); @@ -47,7 +47,7 @@ void Foam::IOListList::readFromStream() { FatalIOErrorIn ( - "IOListList::readFromStream()", + "CompactIOList::readFromStream()", is ) << "unexpected class name " << headerClassName() << " expected " << typeName << " or " << IOList::typeName @@ -61,7 +61,7 @@ void Foam::IOListList::readFromStream() // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template -Foam::IOListList::IOListList(const IOobject& io) +Foam::CompactIOList::CompactIOList(const IOobject& io) : regIOobject(io) { @@ -77,7 +77,11 @@ Foam::IOListList::IOListList(const IOobject& io) template -Foam::IOListList::IOListList(const IOobject& io, const label size) +Foam::CompactIOList::CompactIOList +( + const IOobject& io, + const label size +) : regIOobject(io) { @@ -97,7 +101,7 @@ Foam::IOListList::IOListList(const IOobject& io, const label size) template -Foam::IOListList::IOListList +Foam::CompactIOList::CompactIOList ( const IOobject& io, const List& list @@ -121,7 +125,7 @@ Foam::IOListList::IOListList template -Foam::IOListList::IOListList +Foam::CompactIOList::CompactIOList ( const IOobject& io, const Xfer >& list @@ -145,7 +149,7 @@ Foam::IOListList::IOListList // * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * // template -Foam::IOListList::~IOListList() +Foam::CompactIOList::~CompactIOList() {} @@ -153,7 +157,7 @@ Foam::IOListList::~IOListList() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -bool Foam::IOListList::writeObject +bool Foam::CompactIOList::writeObject ( IOstream::streamFormat fmt, IOstream::versionNumber ver, @@ -182,7 +186,7 @@ bool Foam::IOListList::writeObject template -bool Foam::IOListList::writeData(Ostream& os) const +bool Foam::CompactIOList::writeData(Ostream& os) const { return (os << *this).good(); } @@ -191,9 +195,9 @@ bool Foam::IOListList::writeData(Ostream& os) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template -void Foam::IOListList::operator= +void Foam::CompactIOList::operator= ( - const IOListList& rhs + const CompactIOList& rhs ) { List::operator=(rhs); @@ -201,7 +205,7 @@ void Foam::IOListList::operator= template -void Foam::IOListList::operator=(const List& rhs) +void Foam::CompactIOList::operator=(const List& rhs) { List::operator=(rhs); } @@ -213,7 +217,7 @@ template Foam::Istream& Foam::operator>> ( Foam::Istream& is, - Foam::IOListList& L + Foam::CompactIOList& L ) { // Read compact @@ -244,7 +248,7 @@ template Foam::Ostream& Foam::operator<< ( Foam::Ostream& os, - const Foam::IOListList& L + const Foam::CompactIOList& L ) { // Keep ascii writing same. diff --git a/src/OpenFOAM/db/IOobjects/IOListList/IOListList.H b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H similarity index 76% rename from src/OpenFOAM/db/IOobjects/IOListList/IOListList.H rename to src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H index b5bd103183..e4a85ef118 100644 --- a/src/OpenFOAM/db/IOobjects/IOListList/IOListList.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H @@ -22,18 +22,22 @@ License along with OpenFOAM. If not, see . Class - Foam::IOListList + Foam::CompactIOList Description - A List of objects of type \ with automated input and output. + A List of objects of type \ with automated input and output using + a compact storage. Behaves like IOList except when binary output in + case it writes a CompactListList. + + Useful for lists of small sublists e.g. faceList, cellList. SourceFiles - IOListList.C + CompactIOList.C \*---------------------------------------------------------------------------*/ -#ifndef IOListList_H -#define IOListList_H +#ifndef CompactIOList_H +#define CompactIOList_H #include "IOList.H" #include "regIOobject.H" @@ -47,25 +51,25 @@ class Istream; class Ostream; // Forward declaration of friend functions and operators -template class IOListList; +template class CompactIOList; template Istream& operator>> ( Istream&, - IOListList& + CompactIOList& ); template Ostream& operator<< ( Ostream&, - const IOListList& + const CompactIOList& ); /*---------------------------------------------------------------------------*\ - Class IOListList Declaration + Class CompactIOList Declaration \*---------------------------------------------------------------------------*/ template -class IOListList +class CompactIOList : public regIOobject, public List @@ -78,27 +82,27 @@ class IOListList public: //- Runtime type information - TypeName("ListList"); + TypeName("CompactList"); // Constructors //- Construct from IOobject - IOListList(const IOobject&); + CompactIOList(const IOobject&); - //- Construct from IOobject and size of IOListList - IOListList(const IOobject&, const label); + //- Construct from IOobject and size of CompactIOList + CompactIOList(const IOobject&, const label); //- Construct from IOobject and a List - IOListList(const IOobject&, const List&); + CompactIOList(const IOobject&, const List&); //- Construct by transferring the List contents - IOListList(const IOobject&, const Xfer >&); + CompactIOList(const IOobject&, const Xfer >&); // Destructor - virtual ~IOListList(); + virtual ~CompactIOList(); // Member functions @@ -115,7 +119,7 @@ public: // Member operators - void operator=(const IOListList&); + void operator=(const CompactIOList&); void operator=(const List&); @@ -126,14 +130,14 @@ public: friend Istream& operator>> ( Istream&, - IOListList& + CompactIOList& ); // Write List to Ostream. friend Ostream& operator<< ( Ostream&, - const IOListList& + const CompactIOList& ); }; @@ -145,7 +149,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "IOListList.C" +# include "CompactIOList.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.C b/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.C index 6a6aa29de2..46203004a6 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.C @@ -35,7 +35,8 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - defineTemplateTypeNameAndDebugWithName(cellIOList, "cellList", 0); +defineTemplateTypeNameAndDebugWithName(cellIOList, "cellList", 0); +defineTemplateTypeNameAndDebugWithName(cellCompactIOList, "cellCompactList", 0); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.H b/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.H index 194c682482..9db59238d2 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cellIOList.H @@ -33,13 +33,14 @@ Description #define cellIOList_H #include "cell.H" -#include "IOList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList cellIOList; + typedef CompactIOList cellCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.C b/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.C index 4dd508f0ee..a4fc4e91fc 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.C +++ b/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.C @@ -33,10 +33,14 @@ Description namespace Foam { - defineCompoundTypeName(List, edgeList); - addCompoundToRunTimeSelectionTable(List, edgeList); - defineTemplateTypeNameAndDebugWithName(edgeIOList, "edgeList", 0); +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineCompoundTypeName(List, edgeList); +addCompoundToRunTimeSelectionTable(List, edgeList); + +defineTemplateTypeNameAndDebugWithName(edgeIOList, "edgeList", 0); +defineTemplateTypeNameAndDebugWithName(edgeCompactIOList, "edgeCompactList", 0); } // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.H b/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.H index 6c4d1f9287..fa3659913f 100644 --- a/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.H +++ b/src/OpenFOAM/meshes/meshShapes/edge/edgeIOList.H @@ -33,13 +33,14 @@ Description #define edgeIOList_H #include "edge.H" -#include "IOList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList edgeIOList; + typedef CompactIOList edgeCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceIOList.C b/src/OpenFOAM/meshes/meshShapes/face/faceIOList.C index 5ce764bd14..212ac9ca17 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceIOList.C +++ b/src/OpenFOAM/meshes/meshShapes/face/faceIOList.C @@ -36,6 +36,12 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTemplateTypeNameAndDebugWithName(faceIOList, "faceList", 0); +defineTemplateTypeNameAndDebugWithName +( + faceCompactIOList, + "faceCompactList", + 0 +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceIOList.H b/src/OpenFOAM/meshes/meshShapes/face/faceIOList.H index 58874198a0..0422f52470 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceIOList.H +++ b/src/OpenFOAM/meshes/meshShapes/face/faceIOList.H @@ -33,13 +33,14 @@ Description #define faceIOList_H #include "face.H" -#include "IOList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList faceIOList; + typedef CompactIOList faceCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 668320e1d6..ab72d6d446 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -272,7 +272,7 @@ Foam::polyMesh::polyMesh(const IOobject& io) } else { - cellIOList cLst + cellCompactIOList cLst ( IOobject ( diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index a100a358e1..62df97511c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -101,7 +101,7 @@ private: pointIOField points_; //- Faces - faceIOList faces_; + faceCompactIOList faces_; //- Face owner labelIOList owner_; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C index 757f174588..8e50f8033e 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C @@ -112,7 +112,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() ) ); - faces_ = faceIOList + faces_ = faceCompactIOList ( IOobject ( @@ -238,7 +238,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() } else { - cellIOList cells + cellCompactIOList cells ( IOobject ( diff --git a/src/OpenFOAM/primitives/Lists/labelListIOList.C b/src/OpenFOAM/primitives/Lists/labelListIOList.C index 72ebc51588..0e131a3b0a 100644 --- a/src/OpenFOAM/primitives/Lists/labelListIOList.C +++ b/src/OpenFOAM/primitives/Lists/labelListIOList.C @@ -21,10 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -Description - Declaration of IOList and IOListList ClassNames for IOListLists that - do not have .C files. - \*---------------------------------------------------------------------------*/ #include "labelListIOList.H" @@ -38,8 +34,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName ( - labelIOListList, - "labelCompactListList", + labelListCompactIOList, + "labelListCompactList", 0 ); } diff --git a/src/OpenFOAM/primitives/Lists/labelListIOList.H b/src/OpenFOAM/primitives/Lists/labelListIOList.H index aebd4fc4aa..90cd61e238 100644 --- a/src/OpenFOAM/primitives/Lists/labelListIOList.H +++ b/src/OpenFOAM/primitives/Lists/labelListIOList.H @@ -33,15 +33,14 @@ Description #define labelListIOList_H #include "labelList.H" -#include "IOList.H" -#include "IOListList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList labelListIOList; - typedef IOListList labelIOListList; + typedef CompactIOList labelListCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/Lists/scalarListIOList.C b/src/OpenFOAM/primitives/Lists/scalarListIOList.C index effb61127e..84df4520cc 100644 --- a/src/OpenFOAM/primitives/Lists/scalarListIOList.C +++ b/src/OpenFOAM/primitives/Lists/scalarListIOList.C @@ -21,10 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -Description - Declaration of IOList and IOListList ClassNames for IOListLists that - do not have .C files. - \*---------------------------------------------------------------------------*/ #include "scalarListIOList.H" @@ -43,8 +39,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName ( - scalarIOListList, - "scalarCompactListList", + scalarListCompactIOList, + "scalarListCompactList", 0 ); } diff --git a/src/OpenFOAM/primitives/Lists/scalarListIOList.H b/src/OpenFOAM/primitives/Lists/scalarListIOList.H index 24dc8e13fb..99e2fdf69a 100644 --- a/src/OpenFOAM/primitives/Lists/scalarListIOList.H +++ b/src/OpenFOAM/primitives/Lists/scalarListIOList.H @@ -33,15 +33,14 @@ Description #define scalarListIOList_H #include "scalarList.H" -#include "IOList.H" -#include "IOListList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList scalarListIOList; - typedef IOListList scalarIOListList; + typedef CompactIOList scalarListCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/Lists/vectorListIOList.C b/src/OpenFOAM/primitives/Lists/vectorListIOList.C index 661f729410..fa73bde4d5 100644 --- a/src/OpenFOAM/primitives/Lists/vectorListIOList.C +++ b/src/OpenFOAM/primitives/Lists/vectorListIOList.C @@ -21,10 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -Description - Declaration of IOList and IOListList ClassNames for IOListLists that - do not have .C files. - \*---------------------------------------------------------------------------*/ #include "vectorListIOList.H" @@ -43,8 +39,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName ( - vectorIOListList, - "vectorCompactListList", + vectorListCompactIOList, + "vectorListCompactList", 0 ); } diff --git a/src/OpenFOAM/primitives/Lists/vectorListIOList.H b/src/OpenFOAM/primitives/Lists/vectorListIOList.H index 53acf8afb0..299882f5b5 100644 --- a/src/OpenFOAM/primitives/Lists/vectorListIOList.H +++ b/src/OpenFOAM/primitives/Lists/vectorListIOList.H @@ -25,7 +25,7 @@ Typedef Foam::vectorListIOList Description - Scalar container classes + Lists of vectors container class \*---------------------------------------------------------------------------*/ @@ -33,15 +33,14 @@ Description #define vectorListIOList_H #include "vectorList.H" -#include "IOList.H" -#include "IOListList.H" +#include "CompactIOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { typedef IOList vectorListIOList; - typedef IOListList vectorIOListList; + typedef CompactIOList vectorListCompactIOList; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/mesh/autoMesh/Make/files b/src/mesh/autoMesh/Make/files index fecec5db5d..ec877c5f94 100644 --- a/src/mesh/autoMesh/Make/files +++ b/src/mesh/autoMesh/Make/files @@ -5,7 +5,6 @@ $(autoHexMeshDriver)/autoLayerDriver.C $(autoHexMeshDriver)/autoLayerDriverShrink.C $(autoHexMeshDriver)/autoSnapDriver.C $(autoHexMeshDriver)/autoRefineDriver.C -$(autoHexMeshDriver)/autoHexMeshDriver.C $(autoHexMeshDriver)/layerParameters/layerParameters.C $(autoHexMeshDriver)/refinementParameters/refinementParameters.C diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C deleted file mode 100644 index 2d12064c97..0000000000 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C +++ /dev/null @@ -1,548 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*----------------------------------------------------------------------------*/ - -#include "autoHexMeshDriver.H" -#include "fvMesh.H" -#include "Time.H" -#include "boundBox.H" -#include "wallPolyPatch.H" -#include "cellSet.H" -#include "syncTools.H" -#include "refinementParameters.H" -#include "snapParameters.H" -#include "layerParameters.H" -#include "autoRefineDriver.H" -#include "autoSnapDriver.H" -#include "autoLayerDriver.H" -#include "triSurfaceMesh.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(autoHexMeshDriver, 0); -} - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -// Check writing tolerance before doing any serious work -Foam::scalar Foam::autoHexMeshDriver::getMergeDistance(const scalar mergeTol) - const -{ - const boundBox& meshBb = mesh_.bounds(); - scalar mergeDist = mergeTol * meshBb.mag(); - scalar writeTol = std::pow - ( - scalar(10.0), - -scalar(IOstream::defaultPrecision()) - ); - - Info<< nl - << "Overall mesh bounding box : " << meshBb << nl - << "Relative tolerance : " << mergeTol << nl - << "Absolute matching distance : " << mergeDist << nl - << endl; - - if (mesh_.time().writeFormat() == IOstream::ASCII && mergeTol < writeTol) - { - FatalErrorIn("autoHexMeshDriver::getMergeDistance(const scalar) const") - << "Your current settings specify ASCII writing with " - << IOstream::defaultPrecision() << " digits precision." << endl - << "Your merging tolerance (" << mergeTol << ") is finer than this." - << endl - << "Please change your writeFormat to binary" - << " or increase the writePrecision" << endl - << "or adjust the merge tolerance (-mergeTol)." - << exit(FatalError); - } - - return mergeDist; -} - - -//// Specifically orient using a calculated point outside -//void Foam::autoHexMeshDriver::orientOutside -//( -// PtrList& shells -//) -//{ -// // Determine outside point. -// boundBox overallBb = boundBox::invertedBox; -// -// bool hasSurface = false; -// -// forAll(shells, shellI) -// { -// if (isA(shells[shellI])) -// { -// const triSurfaceMesh& shell = -// refCast(shells[shellI]); -// -// hasSurface = true; -// -// boundBox shellBb(shell.localPoints(), false); -// -// overallBb.min() = min(overallBb.min(), shellBb.min()); -// overallBb.max() = max(overallBb.max(), shellBb.max()); -// } -// } -// -// if (hasSurface) -// { -// const point outsidePt = 2 * overallBb.span(); -// -// //Info<< "Using point " << outsidePt << " to orient shells" << endl; -// -// forAll(shells, shellI) -// { -// if (isA(shells[shellI])) -// { -// triSurfaceMesh& shell = -// refCast(shells[shellI]); -// -// if (!refinementSurfaces::isSurfaceClosed(shell)) -// { -// FatalErrorIn("orientOutside(PtrList&)") -// << "Refinement shell " -// << shell.searchableSurface::name() -// << " is not closed." << exit(FatalError); -// } -// -// refinementSurfaces::orientSurface(outsidePt, shell); -// } -// } -// } -//} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// Construct from components -Foam::autoHexMeshDriver::autoHexMeshDriver -( - fvMesh& mesh, - const bool overwrite, - const dictionary& dict, - const dictionary& decomposeDict -) -: - mesh_(mesh), - dict_(dict), - debug_(readLabel(dict_.lookup("debug"))), - mergeDist_(getMergeDistance(readScalar(dict_.lookup("mergeTolerance")))) -{ - if (debug_ > 0) - { - meshRefinement::debug = debug_; - autoHexMeshDriver::debug = debug_; - autoRefineDriver::debug = debug; - autoSnapDriver::debug = debug; - autoLayerDriver::debug = debug; - } - - refinementParameters refineParams(dict, 1); - - Info<< "Overall cell limit : " - << refineParams.maxGlobalCells() << endl; - Info<< "Per processor cell limit : " - << refineParams.maxLocalCells() << endl; - Info<< "Minimum number of cells to refine : " - << refineParams.minRefineCells() << endl; - Info<< "Curvature : " - << refineParams.curvature() << nl << endl; - Info<< "Layers between different refinement levels : " - << refineParams.nBufferLayers() << endl; - - PtrList shellDicts(dict_.lookup("refinementShells")); - - PtrList surfaceDicts(dict_.lookup("surfaces")); - - - // Read geometry - // ~~~~~~~~~~~~~ - - { - Info<< "Reading all geometry." << endl; - - // Construct dictionary with all shells and all refinement surfaces - dictionary geometryDict; - - forAll(shellDicts, shellI) - { - dictionary shellDict = shellDicts[shellI]; - const word name(shellDict.lookup("name")); - shellDict.remove("name"); - shellDict.remove("level"); - shellDict.remove("refineInside"); - geometryDict.add(name, shellDict); - } - - forAll(surfaceDicts, surfI) - { - dictionary surfDict = surfaceDicts[surfI]; - const word name(string::validate(surfDict.lookup("file"))); - surfDict.remove("file"); - surfDict.remove("regions"); - if (!surfDict.found("name")) - { - surfDict.add("name", name); - } - surfDict.add("type", triSurfaceMesh::typeName); - geometryDict.add(name, surfDict); - } - - allGeometryPtr_.reset - ( - new searchableSurfaces - ( - IOobject - ( - "abc", // dummy name - //mesh_.time().findInstance("triSurface", word::null), - // instance - mesh_.time().constant(), // instance - "triSurface", // local - mesh_.time(), // registry - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - geometryDict - ) - ); - - Info<< "Read geometry in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - } - - - // Read refinement surfaces - // ~~~~~~~~~~~~~~~~~~~~~~~~ - - { - Info<< "Reading surfaces and constructing search trees." << endl; - - surfacesPtr_.reset - ( - new refinementSurfaces - ( - allGeometryPtr_(), - surfaceDicts - ) - ); - Info<< "Read surfaces in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - } - - // Read refinement shells - // ~~~~~~~~~~~~~~~~~~~~~~ - - { - Info<< "Reading refinement shells." << endl; - shellsPtr_.reset - ( - new shellSurfaces - ( - allGeometryPtr_(), - shellDicts - ) - ); - Info<< "Read refinement shells in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - - //// Orient shell surfaces before any searching is done. - //Info<< "Orienting triSurface shells so point far away is outside." - // << endl; - //orientOutside(shells_); - //Info<< "Oriented shells in = " - // << mesh_.time().cpuTimeIncrement() << " s" << endl; - - Info<< "Setting refinement level of surface to be consistent" - << " with shells." << endl; - surfacesPtr_().setMinLevelFields(shells()); - Info<< "Checked shell refinement in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - } - - - // Check faceZones are synchronised - meshRefinement::checkCoupledFaceZones(mesh_); - - - // Refinement engine - // ~~~~~~~~~~~~~~~~~ - - { - Info<< nl - << "Determining initial surface intersections" << nl - << "-----------------------------------------" << nl - << endl; - - // Main refinement engine - meshRefinerPtr_.reset - ( - new meshRefinement - ( - mesh, - mergeDist_, // tolerance used in sorting coordinates - overwrite, - surfaces(), - shells() - ) - ); - Info<< "Calculated surface intersections in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - - // Some stats - meshRefinerPtr_().printMeshInfo(debug_, "Initial mesh"); - - meshRefinerPtr_().write - ( - debug_&meshRefinement::OBJINTERSECTIONS, - mesh_.time().path()/meshRefinerPtr_().timeName() - ); - } - - - // Add all the surface regions as patches - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - { - Info<< nl - << "Adding patches for surface regions" << nl - << "----------------------------------" << nl - << endl; - - // From global region number to mesh patch. - globalToPatch_.setSize(surfaces().nRegions(), -1); - - Info<< "Patch\tRegion" << nl - << "-----\t------" - << endl; - - const labelList& surfaceGeometry = surfaces().surfaces(); - forAll(surfaceGeometry, surfI) - { - label geomI = surfaceGeometry[surfI]; - - const wordList& regNames = allGeometryPtr_().regionNames()[geomI]; - - Info<< surfaces().names()[surfI] << ':' << nl << nl; - - forAll(regNames, i) - { - label patchI = meshRefinerPtr_().addMeshedPatch - ( - regNames[i], - wallPolyPatch::typeName - ); - - Info<< patchI << '\t' << regNames[i] << nl; - - globalToPatch_[surfaces().globalRegion(surfI, i)] = patchI; - } - - Info<< nl; - } - Info<< "Added patches in = " - << mesh_.time().cpuTimeIncrement() << " s" << nl << endl; - } - - - //// Add cyclics for any named faceZones - //// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - //// (these cyclics are used later on to temporarily put the faceZones - //// in when snapping) - // - //labelList namedSurfaces(surfaces().getNamedSurfaces()); - //if (namedSurfaces.size()) - //{ - // Info<< nl - // << "Introducing cyclics for faceZones" << nl - // << "---------------------------------" << nl - // << endl; - // - // // From surface to cyclic patch - // surfaceToCyclicPatch_.setSize(surfaces().size(), -1); - // - // Info<< "Patch\tZone" << nl - // << "----\t-----" - // << endl; - // - // forAll(namedSurfaces, i) - // { - // label surfI = namedSurfaces[i]; - // - // surfaceToCyclicPatch_[surfI] = meshRefinement::addPatch - // ( - // mesh, - // surfaces().faceZoneNames()[surfI], - // cyclicPolyPatch::typeName - // ); - // - // Info<< surfaceToCyclicPatch_[surfI] << '\t' - // << surfaces().faceZoneNames()[surfI] << nl << endl; - // } - // Info<< "Added cyclic patches in = " - // << mesh_.time().cpuTimeIncrement() << " s" << endl; - //} - - - // Parallel - // ~~~~~~~~ - - { - // Decomposition - decomposerPtr_ = decompositionMethod::New(decomposeDict); - decompositionMethod& decomposer = decomposerPtr_(); - - - if (Pstream::parRun() && !decomposer.parallelAware()) - { - FatalErrorIn("autoHexMeshDriver::autoHexMeshDriver" - "(const IOobject&, fvMesh&)") - << "You have selected decomposition method " - << decomposer.typeName - << " which is not parallel aware." << endl - << "Please select one that is (hierarchical, ptscotch)" - << exit(FatalError); - } - - // Mesh distribution engine (uses tolerance to reconstruct meshes) - distributorPtr_.reset(new fvMeshDistribute(mesh_, mergeDist_)); - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::autoHexMeshDriver::writeMesh(const string& msg) const -{ - const meshRefinement& meshRefiner = meshRefinerPtr_(); - - meshRefiner.printMeshInfo(debug_, msg); - Info<< "Writing mesh to time " << meshRefiner.timeName() << endl; - - meshRefiner.write(meshRefinement::MESH|meshRefinement::SCALARLEVELS, ""); - if (debug_ & meshRefinement::OBJINTERSECTIONS) - { - meshRefiner.write - ( - meshRefinement::OBJINTERSECTIONS, - mesh_.time().path()/meshRefiner.timeName() - ); - } - Info<< "Wrote mesh in = " - << mesh_.time().cpuTimeIncrement() << " s." << endl; -} - - -void Foam::autoHexMeshDriver::doMesh() -{ - const Switch wantRefine(dict_.lookup("doRefine")); - const Switch wantSnap(dict_.lookup("doSnap")); - const Switch wantLayers(dict_.lookup("doLayers")); - - Info<< "Do refinement : " << wantRefine << nl - << "Do snapping : " << wantSnap << nl - << "Do layers : " << wantLayers << nl - << endl; - - if (wantRefine) - { - const dictionary& motionDict = dict_.subDict("motionDict"); - - autoRefineDriver refineDriver - ( - meshRefinerPtr_(), - decomposerPtr_(), - distributorPtr_(), - globalToPatch_ - ); - - // Get all the refinement specific params - refinementParameters refineParams(dict_, 1); - - refineDriver.doRefine(dict_, refineParams, wantSnap, motionDict); - - // Write mesh - writeMesh("Refined mesh"); - } - - if (wantSnap) - { - const dictionary& snapDict = dict_.subDict("snapDict"); - const dictionary& motionDict = dict_.subDict("motionDict"); - - autoSnapDriver snapDriver - ( - meshRefinerPtr_(), - globalToPatch_ - ); - - // Get all the snapping specific params - snapParameters snapParams(snapDict, 1); - - snapDriver.doSnap(snapDict, motionDict, snapParams); - - // Write mesh. - writeMesh("Snapped mesh"); - } - - if (wantLayers) - { - const dictionary& motionDict = dict_.subDict("motionDict"); - const dictionary& shrinkDict = dict_.subDict("shrinkDict"); - PtrList surfaceDicts(dict_.lookup("surfaces")); - - autoLayerDriver layerDriver(meshRefinerPtr_()); - - // Get all the layer specific params - layerParameters layerParams - ( - surfaceDicts, - surfacesPtr_(), - globalToPatch_, - shrinkDict, - mesh_.boundaryMesh() - ); - - layerDriver.doLayers - ( - shrinkDict, - motionDict, - layerParams, - true, // pre-balance - decomposerPtr_(), - distributorPtr_() - ); - - // Write mesh. - writeMesh("Layer mesh"); - } -} - - -// ************************************************************************* // diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H deleted file mode 100644 index 5637fe966b..0000000000 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H +++ /dev/null @@ -1,232 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::autoHexMeshDriver - -Description - main meshing driver. - -SourceFiles - autoHexMeshDriver.C - -\*---------------------------------------------------------------------------*/ - -#ifndef autoHexMeshDriver_H -#define autoHexMeshDriver_H - -#include "autoPtr.H" -#include "dictionary.H" -#include "searchableSurfaces.H" -#include "refinementSurfaces.H" -#include "shellSurfaces.H" -#include "meshRefinement.H" -#include "decompositionMethod.H" -#include "fvMeshDistribute.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Class forward declarations -class fvMesh; - -/*---------------------------------------------------------------------------*\ - Class autoHexMeshDriver Declaration -\*---------------------------------------------------------------------------*/ - -class autoHexMeshDriver -{ - // Static data members - - //- Extrusion controls - enum extrudeMode - { - NOEXTRUDE, /*!< Do not extrude. No layers added. */ - EXTRUDE, /*!< Extrude */ - EXTRUDEREMOVE /*!< Extrude but afterwards remove added */ - /*!< faces locally */ - }; - - - // Private classes - - //- Combine operator class for equalizing displacements. - class minMagEqOp - { - public: - - void operator()(vector& x, const vector& y) const - { - if (magSqr(y) < magSqr(x)) - { - x = y; - } - } - }; - - //- Combine operator class to combine normal with other normal. - class nomalsCombine - { - public: - - void operator()(vector& x, const vector& y) const - { - if (y != point::max) - { - if (x == point::max) - { - x = y; - } - else - { - x *= (x&y); - } - } - } - }; - - - - // Private data - - //- Reference to mesh - fvMesh& mesh_; - - //- Input dictionary - const dictionary dict_; - - //- Debug level - const label debug_; - - //- Merge distance - const scalar mergeDist_; - - - //- All surface based geometry - autoPtr allGeometryPtr_; - - //- Shells (geometry for inside/outside refinement) - autoPtr shellsPtr_; - - //- Surfaces (geometry for intersection based refinement) - autoPtr surfacesPtr_; - - //- Per refinement surface region the patch - labelList globalToPatch_; - - //- Mesh refinement engine - autoPtr meshRefinerPtr_; - - //- Decomposition engine - autoPtr decomposerPtr_; - - //- Mesh distribution engine - autoPtr distributorPtr_; - - - - // Private Member Functions - - //- Calculate merge distance. Check against writing tolerance. - scalar getMergeDistance(const scalar mergeTol) const; - - //static void orientOutside(PtrList&); - - //- Disallow default bitwise copy construct - autoHexMeshDriver(const autoHexMeshDriver&); - - //- Disallow default bitwise assignment - void operator=(const autoHexMeshDriver&); - -public: - - //- Runtime type information - ClassName("autoHexMeshDriver"); - - - // Constructors - - //- Construct from dictionary and mesh to modify - autoHexMeshDriver - ( - fvMesh& mesh, - const bool overwrite, - const dictionary& meshDict, - const dictionary& decomposeDict - ); - - - // Member Functions - - // Access - - //- reference to mesh - const fvMesh& mesh() const - { - return mesh_; - } - fvMesh& mesh() - { - return mesh_; - } - - //- Surfaces to base refinement on - const refinementSurfaces& surfaces() const - { - return surfacesPtr_(); - } - - //- Surfaces to volume refinement on - const shellSurfaces& shells() const - { - return shellsPtr_(); - } - - //- Per refinementsurface, per region the patch - const labelList& globalToPatch() const - { - return globalToPatch_; - } - - - // Meshing - - //- Write mesh - void writeMesh(const string&) const; - - //- Do all : refine, snap, layers - void doMesh(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index be138e9d90..8f7ada0487 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -193,13 +193,13 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo errorFaces ); - // if (checkEdgeConnectivity) - // { + //if (checkEdgeConnectivity) + //{ // Info<< "Checking edge-face connectivity (duplicate faces" // << " or non-consecutive shared vertices)" << endl; - + // // label nOldSize = errorFaces.size(); - + // // hasErrors = // mesh.checkFaceFaces // ( @@ -207,7 +207,7 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo // &errorFaces // ) // || hasErrors; - + // // Info<< "Detected additional " // << returnReduce // ( @@ -216,7 +216,7 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo // ) // << " faces with illegal face-face connectivity" // << endl; - // } + //} if (!hasErrors) { @@ -2344,6 +2344,7 @@ Foam::label Foam::autoLayerDriver::checkAndUnmark ( const addPatchCellLayer& addLayer, const dictionary& meshQualityDict, + const List& baffles, const indirectPrimitivePatch& pp, const fvMesh& newMesh, @@ -2355,7 +2356,15 @@ Foam::label Foam::autoLayerDriver::checkAndUnmark // Check the resulting mesh for errors Info<< nl << "Checking mesh with layer ..." << endl; faceSet wrongFaces(newMesh, "wrongFaces", newMesh.nFaces()/1000); - motionSmoother::checkMesh(false, newMesh, meshQualityDict, wrongFaces); + motionSmoother::checkMesh + ( + false, + newMesh, + meshQualityDict, + identity(newMesh.nFaces()), + baffles, + wrongFaces + ); Info<< "Detected " << returnReduce(wrongFaces.size(), sumOp