From a0d143ef21db08153f0b0d2cfa88a23894ac6f01 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sun, 13 Mar 2011 23:16:06 +0000 Subject: [PATCH] Added constructor from shapes --- src/finiteVolume/fvMesh/fvMesh.C | 47 ++++++++++++++++++++++++++++++++ src/finiteVolume/fvMesh/fvMesh.H | 15 ++++++++++ 2 files changed, 62 insertions(+) diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 9bcfd34cb..6fee487f4 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -255,6 +255,53 @@ Foam::fvMesh::fvMesh } +Foam::fvMesh::fvMesh +( + const IOobject& io, + const Xfer& points, + const cellShapeList& shapes, + const faceListList& boundaryFaces, + const wordList& boundaryPatchNames, + const wordList& boundaryPatchTypes, + const word& defaultBoundaryPatchName, + const word& defaultBoundaryPatchType, + const wordList& boundaryPatchPhysicalTypes, + const bool syncPar +) +: + polyMesh + ( + io, + points, + shapes, + boundaryFaces, + boundaryPatchNames, + boundaryPatchTypes, + defaultBoundaryPatchName, + defaultBoundaryPatchType, + boundaryPatchPhysicalTypes, + syncPar + ), + surfaceInterpolation(*this), + boundary_(*this), + lduPtr_(NULL), + curTimeIndex_(time().timeIndex()), + VPtr_(NULL), + V0Ptr_(NULL), + V00Ptr_(NULL), + SfPtr_(NULL), + magSfPtr_(NULL), + CPtr_(NULL), + CfPtr_(NULL), + phiPtr_(NULL) +{ + if (debug) + { + Info<< "Constructing fvMesh from components" << endl; + } +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::fvMesh::~fvMesh() diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index f738975d9..6cd36f617 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -201,6 +201,21 @@ public: const bool syncPar = true ); + //- Construct from cell shapes + fvMesh + ( + const IOobject& io, + const Xfer& points, + const cellShapeList& shapes, + const faceListList& boundaryFaces, + const wordList& boundaryPatchNames, + const wordList& boundaryPatchTypes, + const word& defaultBoundaryPatchName, + const word& defaultBoundaryPatchType, + const wordList& boundaryPatchPhysicalTypes, + const bool syncPar = true + ); + // Destructor