diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C index 2b9f809a16acb5b933d144a6028a158a9533e61f..8e79265269fafd99fa55edda6875c13124b93cae 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.C @@ -63,15 +63,15 @@ cellSizeFunction::cellSizeFunction { if (mode == "inside") { - sideMode_ = INSIDE; + sideMode_ = smInside; } else if (mode == "outside") { - sideMode_ = OUTSIDE; + sideMode_ = smOutside; } else if (mode == "bothSides") { - sideMode_ = BOTHSIDES; + sideMode_ = rmBothsides; } else { @@ -80,14 +80,14 @@ cellSizeFunction::cellSizeFunction << exit(FatalError); } } - else if (mode != BOTHSIDES) + else if (mode != rmBothsides) { WarningIn("cellSizeFunction::cellSizeFunction") << "surface does not support volumeType, defaulting mode to " << "bothSides." << endl; - sideMode_ = BOTHSIDES; + sideMode_ = rmBothsides; } } diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.H b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.H index 718851374270d668c171d56f48c07429326984b3..0f4bf69db4d4ab264e9fa76b203448b5dd72302f 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.H +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/cellSizeFunction/cellSizeFunction.H @@ -65,9 +65,9 @@ public: //- Surface side mode enum sideMode { - INSIDE, // Control inside the surface - OUTSIDE, // Control outside the surface - BOTHSIDES // Control on both sides of a surface + smInside, // Control inside the surface + smOutside, // Control outside the surface + rmBothsides // Control on both sides of a surface }; diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C index 24d7b48168bcedbdf519cbd66c30622cb78a72a3..d57c9b56d741f367e9825f826c6dd9d86dfcc9af 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C @@ -95,7 +95,7 @@ bool linearDistance::cellSize if (hitInfo.hit()) { - if (sideMode_ == BOTHSIDES) + if (sideMode_ == rmBothsides) { size = sizeFunction(mag(pt - hitInfo.hitPoint())); @@ -120,7 +120,7 @@ bool linearDistance::cellSize if ( - sideMode_ == INSIDE + sideMode_ == smInside && vTL[0] == searchableSurface::INSIDE ) { @@ -130,7 +130,7 @@ bool linearDistance::cellSize } else if ( - sideMode_ == OUTSIDE + sideMode_ == smOutside && vTL[0] == searchableSurface::OUTSIDE ) { diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C index 241ddcd46c9bcbd7671894e113f8083d1458a666..a96f43f0ef36543a45496bb841bfec4e6e13a412 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C @@ -76,7 +76,7 @@ bool linearSpatial::cellSize bool isSurfacePoint ) const { - if (sideMode_ == BOTHSIDES || isSurfacePoint) + if (sideMode_ == rmBothsides || isSurfacePoint) { size = sizeFunction(pt); @@ -114,8 +114,8 @@ bool linearSpatial::cellSize if ( - sideMode_ == INSIDE - && vTL[0] == searchableSurface::INSIDE + sideMode_ == smInside + && vTL[0] == searchableSurface::INSIDE ) { size = sizeFunction(pt); @@ -124,8 +124,8 @@ bool linearSpatial::cellSize } else if ( - sideMode_ == OUTSIDE - && vTL[0] == searchableSurface::OUTSIDE + sideMode_ == smOutside + && vTL[0] == searchableSurface::OUTSIDE ) { size = sizeFunction(pt); diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C index 24c519d0a514abacc30e448901d86b284f2364dd..5260b2b9ad84542d26be306f5c4d80e9f31fc6a3 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C @@ -112,7 +112,7 @@ bool surfaceOffsetLinearDistance::cellSize if (hitInfo.hit()) { - if (sideMode_ == BOTHSIDES) + if (sideMode_ == rmBothsides) { size = sizeFunction(mag(pt - hitInfo.hitPoint())); @@ -137,7 +137,7 @@ bool surfaceOffsetLinearDistance::cellSize if ( - sideMode_ == INSIDE + sideMode_ == smInside && vTL[0] == searchableSurface::INSIDE ) { @@ -147,7 +147,7 @@ bool surfaceOffsetLinearDistance::cellSize } else if ( - sideMode_ == OUTSIDE + sideMode_ == smOutside && vTL[0] == searchableSurface::OUTSIDE ) { diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C index 8c69196da2935df71b2a9b02aba9d2c4b693b335..4914bec7d0280b4d31527482e72d6082a3340496 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C @@ -60,7 +60,7 @@ bool uniform::cellSize bool isSurfacePoint ) const { - if (sideMode_ == BOTHSIDES || isSurfacePoint) + if (sideMode_ == rmBothsides || isSurfacePoint) { size = cellSize_; @@ -98,7 +98,7 @@ bool uniform::cellSize if ( - sideMode_ == INSIDE + sideMode_ == smInside && vTL[0] == searchableSurface::INSIDE ) { @@ -108,7 +108,7 @@ bool uniform::cellSize } else if ( - sideMode_ == OUTSIDE + sideMode_ == smOutside && vTL[0] == searchableSurface::OUTSIDE ) { diff --git a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C index 84141ef6bf8e08e048dd049d2c0ced639518b6ef..f22dd6b25722159c8e980fcc53d9647577f49f87 100644 --- a/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C +++ b/src/mesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C @@ -84,7 +84,7 @@ bool uniformDistance::cellSize if (hitInfo.hit()) { - if (sideMode_ == BOTHSIDES) + if (sideMode_ == rmBothsides) { size = cellSize_; @@ -109,7 +109,7 @@ bool uniformDistance::cellSize if ( - sideMode_ == INSIDE + sideMode_ == smInside && vTL[0] == searchableSurface::INSIDE ) { @@ -119,7 +119,7 @@ bool uniformDistance::cellSize } else if ( - sideMode_ == OUTSIDE + sideMode_ == smOutside && vTL[0] == searchableSurface::OUTSIDE ) { diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 4978ae356d13a7edeef949c39ed98c60a45ffa79..1aa1113615a0487eb488c34d4dbf547ecad14b4b 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -104,7 +104,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh insertInitialPoints(); - buildSurfaceConformation(COARSE); + buildSurfaceConformation(rmCoarse); if(cvMeshControls().objOutput()) { @@ -546,14 +546,14 @@ void Foam::conformalVoronoiMesh::createFeaturePoints() scalar bigSpan = 10*cvMeshControls().span(); - insertPoint(point(-bigSpan, -bigSpan, -bigSpan), Vb::FAR_POINT); - insertPoint(point(-bigSpan, -bigSpan, bigSpan), Vb::FAR_POINT); - insertPoint(point(-bigSpan, bigSpan, -bigSpan), Vb::FAR_POINT); - insertPoint(point(-bigSpan, bigSpan, bigSpan), Vb::FAR_POINT); - insertPoint(point( bigSpan, -bigSpan, -bigSpan), Vb::FAR_POINT); - insertPoint(point( bigSpan, -bigSpan, bigSpan), Vb::FAR_POINT); - insertPoint(point( bigSpan, bigSpan, -bigSpan), Vb::FAR_POINT); - insertPoint(point( bigSpan, bigSpan , bigSpan), Vb::FAR_POINT); + insertPoint(point(-bigSpan, -bigSpan, -bigSpan), Vb::ptFarPoint); + insertPoint(point(-bigSpan, -bigSpan, bigSpan), Vb::ptFarPoint); + insertPoint(point(-bigSpan, bigSpan, -bigSpan), Vb::ptFarPoint); + insertPoint(point(-bigSpan, bigSpan, bigSpan), Vb::ptFarPoint); + insertPoint(point( bigSpan, -bigSpan, -bigSpan), Vb::ptFarPoint); + insertPoint(point( bigSpan, -bigSpan, bigSpan), Vb::ptFarPoint); + insertPoint(point( bigSpan, bigSpan, -bigSpan), Vb::ptFarPoint); + insertPoint(point( bigSpan, bigSpan , bigSpan), Vb::ptFarPoint); Info<< nl << "Conforming to feature points" << endl; @@ -953,7 +953,7 @@ void Foam::conformalVoronoiMesh::conformToSurface() { reconformationMode reconfMode = reconformationControl(); - if (reconfMode == NONE) + if (reconfMode == rmNone) { // Reinsert stored surface conformation reinsertSurfaceConformation(); @@ -973,7 +973,7 @@ Foam::conformalVoronoiMesh::reconformationControl() const Info<< nl << " Rebuilding surface conformation for final output" << endl; - return FINE; + return rmFine; } else if ( @@ -985,10 +985,10 @@ Foam::conformalVoronoiMesh::reconformationControl() const Info<< nl << " Rebuilding surface conformation for more iterations" << endl; - return COARSE; + return rmCoarse; } - return NONE; + return rmNone; } void Foam::conformalVoronoiMesh::buildSurfaceConformation @@ -996,18 +996,18 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation reconformationMode reconfMode ) { - if (reconfMode == COARSE) + if (reconfMode == rmCoarse) { Info<< nl << " Build coarse surface conformation" << endl; } - else if (reconfMode == FINE) + else if (reconfMode == rmFine) { Info<< nl << " Build fine surface conformation" << endl; } - else if (reconfMode == NONE) + else if (reconfMode == rmNone) { WarningIn("buildSurfaceConformation(reconformationMode reconfMode)") - << "reconformationMode NONE specified, not building conformation" + << "reconformationMode rmNone specified, not building conformation" << endl; return; @@ -2032,13 +2032,13 @@ void Foam::conformalVoronoiMesh::calcDualMesh { if (vit->internalOrBoundaryPoint()) { - vit->type() = Vb::INTERNAL_POINT; + vit->type() = Vb::ptInternalPoint; vit->index() = dualCelli; dualCelli++; } else { - vit->type() = Vb::FAR_POINT; + vit->type() = Vb::ptFarPoint; vit->index() = -1; } } diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index cd7fb5af1d6d6ee050c8adc9b173b1fd88339608..a2d72c146e53c5e6a372288422c107d4a385d5da 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -88,9 +88,9 @@ public: enum reconformationMode { - NONE, // Do not rebuild the surface conformation - COARSE, // Rebuild the conformation with coarse tolerances (faster) - FINE // Rebuild the conformation with fine tolerances (slower) + rmNone, // Do not rebuild the surface conformation + rmCoarse, // Rebuild the conformation with coarse tolerances (faster) + rmFine // Rebuild the conformation with fine tolerances (slower) }; private: diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H index dfd47e49a3ba951d674a695167b2fdbb5d614adc..54775ed4a743a9c1f0a940b8843017c1bf58961d 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H @@ -63,9 +63,9 @@ public: enum cellTypes { - UNCHANGED = 0, - CHANGED = -1, - SAVE_CHANGED = -2 + ctUnchanged = 0, + ctChanged = -1, + ctSaveChanged = -2 }; typedef typename Cb::Vertex_handle Vertex_handle; @@ -82,7 +82,7 @@ public: indexedCell() : Cb(), - index_(CHANGED) + index_(ctChanged) {} indexedCell @@ -91,7 +91,7 @@ public: ) : Cb(v0, v1, v2, v3), - index_(CHANGED) + index_(ctChanged) {} indexedCell @@ -107,18 +107,18 @@ public: ) : Cb(v0, v1, v2, v3, n0, n1, n2, n3), - index_(CHANGED) + index_(ctChanged) {} void set_vertex(int i, Vertex_handle v) { - index_ = CHANGED; + index_ = ctChanged; Cb::set_vertex(i, v); } void set_vertices() { - index_ = CHANGED; + index_ = ctChanged; Cb::set_vertices(); } @@ -127,7 +127,7 @@ public: Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3 ) { - index_ = CHANGED; + index_ = ctChanged; Cb::set_vertices(v0, v1, v2, v3); } diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H index 5c71317999e23f6882a65bb8f00d4fcc4acebbbd..93fcb12346f8f319aab98b57e59d54fe9996ca46 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex.H @@ -57,12 +57,12 @@ class indexedVertex //- The index for this triangle vertex int index_; - //- type of pair-point : - // NEAR_BOUNDARY_POINT : internal near boundary point. - // INTERNAL_POINT : internal point. - // FAR_POINT : far-point. - // >= 0 : part of point-pair. Index of other point. - // Lowest numbered is inside one (master). + //- type of pair-point : + // ptNearBoundaryPoint : internal near boundary point. + // ptInternalPoint : internal point. + // ptFarPoint : far-point. + // >= 0 : part of point-pair. Index of other point. + // Lowest numbered is inside one (master). int type_; Foam::tensor alignment_; @@ -74,10 +74,10 @@ public: enum pointTypes { - NEAR_BOUNDARY_POINT = -4, - INTERNAL_POINT = -3, - MIRROR_POINT = -2, - FAR_POINT = -1 + ptNearBoundaryPoint = -4, + ptInternalPoint = -3, + ptMirrorPoint = -2, + ptFarPoint = -1 }; typedef typename Vb::Vertex_handle Vertex_handle; @@ -94,8 +94,8 @@ public: indexedVertex() : Vb(), - index_(INTERNAL_POINT), - type_(INTERNAL_POINT), + index_(ptInternalPoint), + type_(ptInternalPoint), alignment_(), targetCellSize_(0.0) {} @@ -103,8 +103,8 @@ public: indexedVertex(const Point& p) : Vb(p), - index_(INTERNAL_POINT), - type_(INTERNAL_POINT), + index_(ptInternalPoint), + type_(ptInternalPoint), alignment_(), targetCellSize_(0.0) {} @@ -112,8 +112,8 @@ public: indexedVertex(const Point& p, Cell_handle f) : Vb(f, p), - index_(INTERNAL_POINT), - type_(INTERNAL_POINT), + index_(ptInternalPoint), + type_(ptInternalPoint), alignment_(), targetCellSize_(0.0) {} @@ -121,8 +121,8 @@ public: indexedVertex(Cell_handle f) : Vb(f), - index_(INTERNAL_POINT), - type_(INTERNAL_POINT), + index_(ptInternalPoint), + type_(ptInternalPoint), alignment_(), targetCellSize_(0.0) {} @@ -170,43 +170,43 @@ public: inline bool uninitialised() const { - return type_ == INTERNAL_POINT && index_ == INTERNAL_POINT; + return type_ == ptInternalPoint && index_ == ptInternalPoint; } //- Is point a far-point inline bool farPoint() const { - return type_ == FAR_POINT; + return type_ == ptFarPoint; } //- Is point internal, i.e. not on boundary inline bool internalPoint() const { - return type_ <= INTERNAL_POINT; + return type_ <= ptInternalPoint; } //- Set the point to be internal inline void setInternal() { - type_ = INTERNAL_POINT; + type_ = ptInternalPoint; } //- Is point internal and near the boundary inline bool nearBoundary() const { - return type_ == NEAR_BOUNDARY_POINT; + return type_ == ptNearBoundaryPoint; } //- Set the point to be near the boundary inline void setNearBoundary() { - type_ = NEAR_BOUNDARY_POINT; + type_ = ptNearBoundaryPoint; } //- Is point a mirror point inline bool mirrorPoint() const { - return type_ == MIRROR_POINT; + return type_ == ptMirrorPoint; } //- Either master or slave of pointPair.