ENH: foamyHexMesh: Construct backgroundMeshDecomposition in initialisation list

This commit is contained in:
laurence
2013-07-29 15:55:11 +01:00
parent d68c31eb23
commit e7aeee33d7
2 changed files with 19 additions and 22 deletions

View File

@ -839,6 +839,21 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
allGeometry_,
foamyHexMeshDict.subDict("surfaceConformation")
),
decomposition_
(
Pstream::parRun()
? new backgroundMeshDecomposition
(
runTime_,
rndGen_,
geometryToConformTo_,
foamyHexMeshControls().foamyHexMeshDict().subDict
(
"backgroundMeshDecomposition"
)
)
: NULL
),
cellShapeControl_
(
runTime_,
@ -874,8 +889,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
(
foamyHexMeshDict.subDict("motionControl")
)
),
decomposition_()
)
{}
@ -894,23 +908,6 @@ void Foam::conformalVoronoiMesh::initialiseForMotion()
geometryToConformTo_.writeFeatureObj("foamyHexMesh");
}
if (Pstream::parRun())
{
decomposition_.reset
(
new backgroundMeshDecomposition
(
runTime_,
rndGen_,
geometryToConformTo_,
foamyHexMeshControls().foamyHexMeshDict().subDict
(
"backgroundMeshDecomposition"
)
)
);
}
buildCellSizeAndAlignmentMesh();
insertInitialPoints();

View File

@ -143,6 +143,9 @@ private:
//- The surfaces to conform to
conformationSurfaces geometryToConformTo_;
//- Background mesh decomposition, only available in parallel.
autoPtr<backgroundMeshDecomposition> decomposition_;
//- The cell shape control object
cellShapeControl cellShapeControl_;
@ -182,9 +185,6 @@ private:
//- Face area weight function. Runtime selectable.
autoPtr<faceAreaWeightModel> faceAreaWeightModel_;
//- Background mesh decomposition, only available in parallel.
autoPtr<backgroundMeshDecomposition> decomposition_;
// Private Member Functions