diff --git a/src/meshing/blockMesh/block/block.C b/src/meshing/blockMesh/block/block.C index d8093d33893823078d5aa00a288513040dcfe126..0fe19e2ba7d0d5afa97accc406bdc6dbbae8e7e3 100644 --- a/src/meshing/blockMesh/block/block.C +++ b/src/meshing/blockMesh/block/block.C @@ -37,9 +37,9 @@ Foam::block::block Istream& is ) : - blockDef_(blockMeshPoints, edges, is), - vertices_(blockDef_.nPoints()), - cells_(blockDef_.nCells()), + blockDescriptor(blockMeshPoints, edges, is), + vertices_(nPoints()), + cells_(nCells()), boundaryPatches_(6) { createPrimitives(); @@ -48,9 +48,9 @@ Foam::block::block Foam::block::block(const blockDescriptor& definition) : - blockDef_(definition), - vertices_(blockDef_.nPoints()), - cells_(blockDef_.nCells()), + blockDescriptor(definition), + vertices_(nPoints()), + cells_(nCells()), boundaryPatches_(6) { createPrimitives(); diff --git a/src/meshing/blockMesh/block/block.H b/src/meshing/blockMesh/block/block.H index 557e6a05f4620bb373d23314af0714f00351d823..a53a067c60480a0e55fd2c4546ec4f0908b786d7 100644 --- a/src/meshing/blockMesh/block/block.H +++ b/src/meshing/blockMesh/block/block.H @@ -56,12 +56,11 @@ class Ostream; \*---------------------------------------------------------------------------*/ class block +: + public blockDescriptor { // Private data - //- Block definition - blockDescriptor blockDef_; - //- List of vertices pointField vertices_; @@ -125,7 +124,7 @@ public: //- Return the block definition inline const blockDescriptor& blockDef() const { - return blockDef_; + return *this; } const pointField& points() const; diff --git a/src/meshing/blockMesh/block/blockCreate.C b/src/meshing/blockMesh/block/blockCreate.C index 15e2d28386b87da4603f9af6e132704d5e55865b..d3d09edc9717433ba268ec0f008cc7e111a555be 100644 --- a/src/meshing/blockMesh/block/blockCreate.C +++ b/src/meshing/blockMesh/block/blockCreate.C @@ -35,8 +35,8 @@ Foam::label Foam::block::vtxLabel(label i, label j, label k) const return ( i - + j*(blockDef_.meshDensity().x() + 1) - + k*(blockDef_.meshDensity().x() + 1) * (blockDef_.meshDensity().y() + 1) + + j * (meshDensity().x() + 1) + + k * (meshDensity().x() + 1) * (meshDensity().y() + 1) ); } @@ -44,24 +44,24 @@ Foam::label Foam::block::vtxLabel(label i, label j, label k) const void Foam::block::createPoints() { // set local variables for mesh specification - const label ni = blockDef_.meshDensity().x(); - const label nj = blockDef_.meshDensity().y(); - const label nk = blockDef_.meshDensity().z(); + const label ni = meshDensity().x(); + const label nj = meshDensity().y(); + const label nk = meshDensity().z(); - const point& p000 = blockDef_.blockPoint(0); - const point& p100 = blockDef_.blockPoint(1); - const point& p110 = blockDef_.blockPoint(2); - const point& p010 = blockDef_.blockPoint(3); + const point& p000 = blockPoint(0); + const point& p100 = blockPoint(1); + const point& p110 = blockPoint(2); + const point& p010 = blockPoint(3); - const point& p001 = blockDef_.blockPoint(4); - const point& p101 = blockDef_.blockPoint(5); - const point& p111 = blockDef_.blockPoint(6); - const point& p011 = blockDef_.blockPoint(7); + const point& p001 = blockPoint(4); + const point& p101 = blockPoint(5); + const point& p111 = blockPoint(6); + const point& p011 = blockPoint(7); // list of edge point and weighting factors - const List<List<point> >& p = blockDef_.blockEdgePoints(); - const scalarListList& w = blockDef_.blockEdgeWeights(); + const List< List<point> >& p = blockEdgePoints(); + const scalarListList& w = blockEdgeWeights(); // generate vertices @@ -243,9 +243,9 @@ void Foam::block::createPoints() void Foam::block::createCells() { - const label ni = blockDef_.meshDensity().x(); - const label nj = blockDef_.meshDensity().y(); - const label nk = blockDef_.meshDensity().z(); + const label ni = meshDensity().x(); + const label nj = meshDensity().y(); + const label nk = meshDensity().z(); label cellNo = 0; @@ -274,9 +274,9 @@ void Foam::block::createCells() void Foam::block::createBoundary() { - const label ni = blockDef_.meshDensity().x(); - const label nj = blockDef_.meshDensity().y(); - const label nk = blockDef_.meshDensity().z(); + const label ni = meshDensity().x(); + const label nj = meshDensity().y(); + const label nk = meshDensity().z(); // x-direction diff --git a/src/meshing/blockMesh/blockMesh/blockMesh.C b/src/meshing/blockMesh/blockMesh/blockMesh.C index babb05e448db6d4fa3a59aa151074d6fd5fb11ed..a46eace62dfd81b93537472ecd184f473300484a 100644 --- a/src/meshing/blockMesh/blockMesh/blockMesh.C +++ b/src/meshing/blockMesh/blockMesh/blockMesh.C @@ -111,7 +111,7 @@ Foam::label Foam::blockMesh::numZonedBlocks() const forAll(*this, blockI) { - if (operator[](blockI).blockDef().zoneName().size()) + if (operator[](blockI).zoneName().size()) { num++; } diff --git a/src/meshing/blockMesh/blockMesh/blockMeshMergeList.C b/src/meshing/blockMesh/blockMesh/blockMeshMergeList.C index 4c7c7b5e5299ada5b4d9d1c329341fe828b8b053..1e17bc30027e9a978618cc904321e1e66ac7dcf0 100644 --- a/src/meshing/blockMesh/blockMesh/blockMeshMergeList.C +++ b/src/meshing/blockMesh/blockMesh/blockMeshMergeList.C @@ -327,6 +327,8 @@ Foam::labelList Foam::blockMesh::createMergeList() } } +// FIXME? - there seems to be some logic missing here + foundFace = false; label blockNfaceLabel; for @@ -347,6 +349,9 @@ Foam::labelList Foam::blockMesh::createMergeList() } } +// FIXME? - there seems to be some logic missing here + + const labelListList& blockPfaceFaces = blocks[blockPlabel].boundaryPatches()[blockPfaceLabel]; diff --git a/src/meshing/blockMesh/blockMesh/blockMeshPatches.C b/src/meshing/blockMesh/blockMesh/blockMeshPatches.C index 62f1cc679fe4bc988b2e513ab4d07193397c50b8..3e0f6087921c16605957f168d1d780938613e9ae 100644 --- a/src/meshing/blockMesh/blockMesh/blockMeshPatches.C +++ b/src/meshing/blockMesh/blockMesh/blockMeshPatches.C @@ -41,12 +41,9 @@ Foam::faceList Foam::blockMesh::createPatchFaces forAll(patchTopologyFaces, patchTopologyFaceLabel) { - label blockLabel = blockLabels[patchTopologyFaceLabel]; + const label blockI = blockLabels[patchTopologyFaceLabel]; - faceList blockFaces - ( - blocks[blockLabel].blockDef().blockShape().faces() - ); + faceList blockFaces = blocks[blockI].blockShape().faces(); forAll(blockFaces, blockFaceLabel) { @@ -57,7 +54,7 @@ Foam::faceList Foam::blockMesh::createPatchFaces ) { nFaces += - blocks[blockLabel].boundaryPatches()[blockFaceLabel].size(); + blocks[blockI].boundaryPatches()[blockFaceLabel].size(); } } } @@ -69,12 +66,9 @@ Foam::faceList Foam::blockMesh::createPatchFaces forAll(patchTopologyFaces, patchTopologyFaceLabel) { - label blockLabel = blockLabels[patchTopologyFaceLabel]; + const label blockI = blockLabels[patchTopologyFaceLabel]; - faceList blockFaces - ( - blocks[blockLabel].blockDef().blockShape().faces() - ); + faceList blockFaces = blocks[blockI].blockShape().faces(); forAll(blockFaces, blockFaceLabel) { @@ -85,7 +79,7 @@ Foam::faceList Foam::blockMesh::createPatchFaces ) { const labelListList& blockPatchFaces = - blocks[blockLabel].boundaryPatches()[blockFaceLabel]; + blocks[blockI].boundaryPatches()[blockFaceLabel]; forAll(blockPatchFaces, blockFaceLabel) { @@ -96,7 +90,7 @@ Foam::faceList Foam::blockMesh::createPatchFaces mergeList_ [ blockPatchFaces[blockFaceLabel][0] - + blockOffsets_[blockLabel] + + blockOffsets_[blockI] ]; label nUnique = 1; @@ -112,7 +106,7 @@ Foam::faceList Foam::blockMesh::createPatchFaces mergeList_ [ blockPatchFaces[blockFaceLabel][facePointLabel] - + blockOffsets_[blockLabel] + + blockOffsets_[blockI] ]; if (quadFace[nUnique] != quadFace[nUnique-1]) diff --git a/src/meshing/blockMesh/blockMesh/blockMeshTopology.C b/src/meshing/blockMesh/blockMesh/blockMeshTopology.C index 882f8297c02f9bf2beaf93b3316c1ff6ab7d9e74..3bca1b40523ca48bcddb4e077bd0ffbddf52b08a 100644 --- a/src/meshing/blockMesh/blockMesh/blockMeshTopology.C +++ b/src/meshing/blockMesh/blockMesh/blockMeshTopology.C @@ -173,7 +173,7 @@ Foam::polyMesh* Foam::blockMesh::createTopology(IOdictionary& meshDescription) ( nBlocks, tmpBlockPoints, - blocks[nBlocks].blockDef().blockShape() + blocks[nBlocks].blockShape() ); nBlocks++; @@ -292,7 +292,7 @@ Foam::polyMesh* Foam::blockMesh::createTopology(IOdictionary& meshDescription) tmpBlockShapes.set ( blockI, - new cellShape(blocks[blockI].blockDef().blockShape()) + new cellShape(blocks[blockI].blockShape()) ); if (tmpBlockShapes[blockI].mag(tmpBlockPoints) < 0.0) diff --git a/src/meshing/blockMesh/curvedEdges/curvedEdgeList.H b/src/meshing/blockMesh/curvedEdges/curvedEdgeList.H index 3918dded609ac4a62d125d9cf79aae34cc171220..6111d535650046e5c52cc30c971bf82808e7fb55 100644 --- a/src/meshing/blockMesh/curvedEdges/curvedEdgeList.H +++ b/src/meshing/blockMesh/curvedEdges/curvedEdgeList.H @@ -22,10 +22,11 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -InClass +Typedef Foam::curvedEdgeList Description + A PtrList of curvedEdges \*---------------------------------------------------------------------------*/