diff --git a/Allwmake b/Allwmake index 16edfd1f6f..9187532553 100755 --- a/Allwmake +++ b/Allwmake @@ -26,12 +26,12 @@ else fi # build OpenFOAM libraries and applications -src/Allwmake -applications/Allwmake +src/Allwmake $* +applications/Allwmake $* if [ "$1" = doc ] then - doc/Allwmake + doc/Allwmake $* fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/Allwmake b/applications/Allwmake index 00bc326641..7f7ac6718d 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -16,7 +16,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { set -x -wmake all utilities -wmake all solvers +wmake all utilities $* +wmake all solvers $* # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 109354319e..aaf4620e3c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -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 @@ -22,8 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::XiGModel::basicSubGrid - + Foam::XiGModels::basicSubGrid Description @@ -39,13 +38,14 @@ Description and the removal: - \f[ - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} - \frac{\Xi_{sub}-1}{\Xi_{sub}} \f] + \f[ + - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} + \frac{\Xi_{sub}-1}{\Xi_{sub}} + \f] Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$ due to the turbulence. - SourceFiles basicSubGrid.C @@ -64,7 +64,7 @@ namespace XiGModels { /*---------------------------------------------------------------------------*\ - Class basicSubGrid Declaration + Class basicSubGrid Declaration \*---------------------------------------------------------------------------*/ class basicSubGrid diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 4c7095a6ed..1a4bb1ec0b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -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 @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::XiEqModel::SCOPEXiEq + Foam::XiEqModels::SCOPEXiEq Description Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation @@ -120,7 +120,6 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); - }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C index 00aa92630f..d78011c9db 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C @@ -26,6 +26,10 @@ License #include "DelaunayMesh.H" #include "labelPair.H" #include "PrintTable.H" +#include "pointIOField.H" +#include "scalarIOField.H" +#include "labelIOField.H" +#include "pointConversion.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -36,14 +40,121 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::DelaunayMesh::DelaunayMesh() +Foam::DelaunayMesh::DelaunayMesh(const Time& runTime) : Triangulation(), vertexCount_(0), - cellCount_(0) + cellCount_(0), + runTime_(runTime) {} +template +Foam::DelaunayMesh::DelaunayMesh +( + const Time& runTime, + const word& meshName +) +: + Triangulation(), + vertexCount_(0), + cellCount_(0), + runTime_(runTime) +{ + pointIOField pts + ( + IOobject + ( + "points", + runTime.timeName(), + meshName/polyMesh::meshSubDir, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField types + ( + IOobject + ( + "types", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField indices + ( + IOobject + ( + "indices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField processorIndices + ( + IOobject + ( + "processorIndices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + if (pts.headerOk()) + { + forAll(pts, ptI) + { + Vertex_handle vh = this->insert(toPoint(pts[ptI])); + + if (indices.headerOk()) + { + vh->index() = indices[ptI]; + vertexCount()++; + } + else + { + vh->index() = getNewVertexIndex(); + } + + if (processorIndices.headerOk()) + { + vh->procIndex() = processorIndices[ptI]; + } + else + { + vh->procIndex() = Pstream::myProcNo(); + } + + if (types.headerOk()) + { + vh->type() = + static_cast + ( + types[ptI] + ); + } + else + { + vh->type() = Vb::vtUnassigned; + } + } + } +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H index 383ee64bae..1fbf19c1d6 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H @@ -43,6 +43,7 @@ SourceFiles #include "boundBox.H" #include "indexedVertex.H" #include "CGALTriangulation3Ddefs.H" +#include "Time.H" #include "autoPtr.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,6 +83,12 @@ public: FixedList::Hash<> > labelPairHashSet; + typedef HashTable + < + label, + labelPair, + FixedList::Hash<> + > labelTolabelPairHashTable; private: @@ -95,6 +102,9 @@ private: // This allows a unique index to be assigned to each cell. mutable label cellCount_; + //- Reference to Time + const Time& runTime_; + //- Spatial sort traits to use with a pair of point pointers and an int. // Taken from a post on the CGAL lists: 2010-01/msg00004.html by // Sebastien Loriot (Geometry Factory). @@ -159,7 +169,13 @@ public: // Constructors //- Construct from components - DelaunayMesh(); + explicit DelaunayMesh(const Time& runTime); + + DelaunayMesh + ( + const Time& runTime, + const word& meshName + ); //- Destructor @@ -168,6 +184,14 @@ public: // Member Functions + inline const Time& time() const; + + inline void timeCheck + ( + const string& description, + const bool check = true + ) const; + inline label getNewVertexIndex() const; inline label getNewCellIndex() const; @@ -177,6 +201,7 @@ public: inline void resetCellCount(); inline label vertexCount() const; + inline label& vertexCount(); inline void resetVertexCount(); @@ -209,12 +234,12 @@ public: //- Create an fvMesh from the triangulation. // The mesh is not parallel consistent - only used for viewing - autoPtr createMesh + autoPtr createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData = true ) const; }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H index 733f1230f7..bf2277e356 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H @@ -36,6 +36,40 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +inline const Foam::Time& Foam::DelaunayMesh::time() const +{ + return runTime_; +} + + +template +void Foam::DelaunayMesh::timeCheck +( + const string& description, + const bool check +) const +{ + if (check) + { + Info<< nl << "--- [ cpuTime " + << time().elapsedCpuTime() << " s, " + << "delta " << time().cpuTimeIncrement()<< " s"; + + if (description != word::null) + { + Info<< ", " << description << " "; + } + else + { + Info<< " "; + } + + Info<< "] --- " << endl; + } +} + + template inline Foam::label Foam::DelaunayMesh::getNewVertexIndex() const { @@ -90,6 +124,12 @@ Foam::label Foam::DelaunayMesh::vertexCount() const return vertexCount_; } +template +Foam::label& Foam::DelaunayMesh::vertexCount() +{ + return vertexCount_; +} + template void Foam::DelaunayMesh::resetVertexCount() diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C index bed42012cf..1a341348b1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C @@ -28,6 +28,7 @@ License #include "pointConversion.H" #include "wallPolyPatch.H" #include "processorPolyPatch.H" +#include "labelIOField.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -331,13 +332,13 @@ void Foam::DelaunayMesh::printVertexInfo(Ostream& os) const template -Foam::autoPtr +Foam::autoPtr Foam::DelaunayMesh::createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData ) const { pointField points(Triangulation::number_of_vertices()); @@ -354,12 +355,54 @@ Foam::DelaunayMesh::createMesh List > patchFaces(1, DynamicList()); List > patchOwners(1, DynamicList