diff --git a/applications/test/Circulator/Test-Circulator.C b/applications/test/Circulator/Test-Circulator.C index 7fc698842b..837697508f 100644 --- a/applications/test/Circulator/Test-Circulator.C +++ b/applications/test/Circulator/Test-Circulator.C @@ -58,13 +58,13 @@ int main(int argc, char *argv[]) << cStart.prev() << " / " << cStart() << " / " << cStart.next() << endl; - } while (cStart.circulate(CirculatorBase::CLOCKWISE)); + } while (cStart.circulate(CirculatorBase::direction::clockwise)); if (cStart.size()) do { Info<< "Iterate backwards over face : " << cStart() << endl; - } while (cStart.circulate(CirculatorBase::ANTICLOCKWISE)); + } while (cStart.circulate(CirculatorBase::direction::anticlockwise)); Info<< nl << nl << "Test non-const circulator" << nl << endl; @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) << cStart2.prev() << " / " << cStart2() << " / " << cStart2.next() << endl; - } while (cStart2.circulate(CirculatorBase::CLOCKWISE)); + } while (cStart2.circulate(CirculatorBase::direction::clockwise)); if (cStart2.size()) do { @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) cStart2() += 1; Info<< " -> " << cStart2() << endl; - } while (cStart2.circulate(CirculatorBase::CLOCKWISE)); + } while (cStart2.circulate(CirculatorBase::direction::clockwise)); Info<< "Face after : " << f << endl; @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) { Info<< "Iterate forwards over face : " << cZero() << endl; - } while (cZero.circulate(CirculatorBase::CLOCKWISE)); + } while (cZero.circulate(CirculatorBase::direction::clockwise)); fZero = face(identity(5)); @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) { Info<< "Iterate forwards over face : " << cZero() << endl; - } while (cZero.circulate(CirculatorBase::CLOCKWISE)); + } while (cZero.circulate(CirculatorBase::direction::clockwise)); Info<< nl << nl << "Simultaneously go forwards/backwards over face " << f @@ -171,8 +171,8 @@ int main(int argc, char *argv[]) } while ( - circForward.circulate(CirculatorBase::CLOCKWISE), - circBackward.circulate(CirculatorBase::ANTICLOCKWISE) + circForward.circulate(CirculatorBase::direction::clockwise), + circBackward.circulate(CirculatorBase::direction::anticlockwise) ); Info<< "\nEnd\n" << endl; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 039b89b281..1b0a5a7063 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -155,7 +155,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() List volumeStatus ( mesh_.nCells(), - volumeType::UNKNOWN + volumeType::unknown ); // Surface refinement @@ -165,7 +165,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() // Determine/update the status of each cell forAll(volumeStatus, celli) { - if (volumeStatus[celli] == volumeType::UNKNOWN) + if (volumeStatus[celli] == volumeType::unknown) { treeBoundBox cellBb ( @@ -178,15 +178,15 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (geometry.overlaps(cellBb)) { - volumeStatus[celli] = volumeType::MIXED; + volumeStatus[celli] = volumeType::mixed; } else if (geometry.inside(cellBb.midpoint())) { - volumeStatus[celli] = volumeType::INSIDE; + volumeStatus[celli] = volumeType::inside; } else { - volumeStatus[celli] = volumeType::OUTSIDE; + volumeStatus[celli] = volumeType::outside; } } } @@ -212,9 +212,9 @@ void Foam::backgroundMeshDecomposition::initialRefinement() { label celli = newCellsToRefine[nCTRI]; - if (volumeStatus[celli] == volumeType::MIXED) + if (volumeStatus[celli] == volumeType::mixed) { - volumeStatus[celli] = volumeType::UNKNOWN; + volumeStatus[celli] = volumeType::unknown; } icellWeights[celli] = max @@ -264,7 +264,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (oldCelli == -1) { - newVolumeStatus[newCelli] = volumeType::UNKNOWN; + newVolumeStatus[newCelli] = volumeType::unknown; } else { @@ -284,7 +284,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() // Determine/update the status of each cell forAll(volumeStatus, celli) { - if (volumeStatus[celli] == volumeType::UNKNOWN) + if (volumeStatus[celli] == volumeType::unknown) { treeBoundBox cellBb ( @@ -297,15 +297,15 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (geometry.overlaps(cellBb)) { - volumeStatus[celli] = volumeType::MIXED; + volumeStatus[celli] = volumeType::mixed; } else if (geometry.inside(cellBb.midpoint())) { - volumeStatus[celli] = volumeType::INSIDE; + volumeStatus[celli] = volumeType::inside; } else { - volumeStatus[celli] = volumeType::OUTSIDE; + volumeStatus[celli] = volumeType::outside; } } } @@ -319,7 +319,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() forAll(volumeStatus, celli) { - if (volumeStatus[celli] == volumeType::OUTSIDE) + if (volumeStatus[celli] == volumeType::outside) { cellsToRemove.append(celli); } @@ -374,7 +374,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (oldCelli == -1) { - newVolumeStatus[newCelli] = volumeType::UNKNOWN; + newVolumeStatus[newCelli] = volumeType::unknown; } else { @@ -523,7 +523,7 @@ bool Foam::backgroundMeshDecomposition::refineCell weightEstimate = 1.0; - if (volType == volumeType::MIXED) + if (volType == volumeType::mixed) { // // Assess the cell size at the nearest point on the surface for the // // MIXED cells, if the cell is large with respect to the cell size, @@ -603,7 +603,7 @@ bool Foam::backgroundMeshDecomposition::refineCell // return true; // } } - else if (volType == volumeType::INSIDE) + else if (volType == volumeType::inside) { // scalar s = // foamyHexMesh_.cellShapeControl_.cellSize(cellBb.midpoint()); @@ -638,7 +638,7 @@ Foam::labelList Foam::backgroundMeshDecomposition::selectRefinementCells // Determine/update the status of each cell forAll(volumeStatus, celli) { - if (volumeStatus[celli] == volumeType::MIXED) + if (volumeStatus[celli] == volumeType::mixed) { if (meshCutter_.cellLevel()[celli] < minLevels_) { @@ -646,7 +646,7 @@ Foam::labelList Foam::backgroundMeshDecomposition::selectRefinementCells } } - if (volumeStatus[celli] != volumeType::OUTSIDE) + if (volumeStatus[celli] != volumeType::outside) { if ( @@ -1036,7 +1036,7 @@ bool Foam::backgroundMeshDecomposition::positionOnThisProcessor { // return bFTreePtr_().findAnyOverlap(pt, 0.0); - return (bFTreePtr_().getVolumeType(pt) == volumeType::INSIDE); + return (bFTreePtr_().getVolumeType(pt) == volumeType::inside); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C index 7b1a09ea1f..b4d40d0ce2 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearDistance/linearDistance.C @@ -186,7 +186,7 @@ bool linearDistance::cellSize(const point& pt, scalar& size) const if ( sideMode_ == smInside - && vTL[0] == volumeType::INSIDE + && vTL[0] == volumeType::inside ) { size = sizeFunction(hitPt, dist, hitIndex); @@ -196,7 +196,7 @@ bool linearDistance::cellSize(const point& pt, scalar& size) const else if ( sideMode_ == smOutside - && vTL[0] == volumeType::OUTSIDE + && vTL[0] == volumeType::outside ) { size = sizeFunction(hitPt, dist, hitIndex); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C index c391ac1efb..a2ed374288 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/linearSpatial/linearSpatial.C @@ -150,7 +150,7 @@ bool linearSpatial::cellSize if ( sideMode_ == smInside - && vTL[0] == volumeType::INSIDE + && vTL[0] == volumeType::inside ) { size = sizeFunction(pt); @@ -160,7 +160,7 @@ bool linearSpatial::cellSize else if ( sideMode_ == smOutside - && vTL[0] == volumeType::OUTSIDE + && vTL[0] == volumeType::outside ) { size = sizeFunction(pt); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C index 2b8b2f9c9e..a2ef17bb7d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/surfaceOffsetLinearDistance/surfaceOffsetLinearDistance.C @@ -250,7 +250,7 @@ bool surfaceOffsetLinearDistance::cellSize if ( sideMode_ == smInside - && vTL[0] == volumeType::INSIDE + && vTL[0] == volumeType::inside ) { size = sizeFunction(hitPt, dist, hitIndex); @@ -260,7 +260,7 @@ bool surfaceOffsetLinearDistance::cellSize else if ( sideMode_ == smOutside - && vTL[0] == volumeType::OUTSIDE + && vTL[0] == volumeType::outside ) { size = sizeFunction(hitPt, dist, hitIndex); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C index 38a05eaea8..2119b9a6b7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniform/uniform.C @@ -138,7 +138,7 @@ bool uniform::cellSize if ( sideMode_ == smInside - && vTL[0] == volumeType::INSIDE + && vTL[0] == volumeType::inside ) { size = surfaceCellSizeFunction_().interpolate(hitPt, index); @@ -148,7 +148,7 @@ bool uniform::cellSize else if ( sideMode_ == smOutside - && vTL[0] == volumeType::OUTSIDE + && vTL[0] == volumeType::outside ) { size = surfaceCellSizeFunction_().interpolate(hitPt, index); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C index 2e19dc278b..2208736444 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/cellSizeFunction/uniformDistance/uniformDistance.C @@ -162,7 +162,7 @@ bool uniformDistance::cellSize if ( sideMode_ == smInside - && vTL[0] == volumeType::INSIDE + && vTL[0] == volumeType::inside ) { size = surfaceCellSizeFunction_().interpolate(hitPt, index); @@ -172,7 +172,7 @@ bool uniformDistance::cellSize else if ( sideMode_ == smOutside - && vTL[0] == volumeType::OUTSIDE + && vTL[0] == volumeType::outside ) { size = surfaceCellSizeFunction_().interpolate(hitPt, index); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C index 215af57ae4..9e3143fc6d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C @@ -407,8 +407,8 @@ void Foam::conformalVoronoiMesh::createEdgePointGroupByCirculating } while ( - circ.circulate(CirculatorBase::CLOCKWISE), - circNormalDirs.circulate(CirculatorBase::CLOCKWISE) + circ.circulate(CirculatorBase::direction::clockwise), + circNormalDirs.circulate(CirculatorBase::direction::clockwise) ); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C index 6586bb32c9..430cd32344 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C @@ -266,7 +266,7 @@ Foam::labelList Foam::conformalVoronoiMesh::calcCellZones volTypeInsidePoint ); - if (volTypeInsidePoint[0] == volumeType::OUTSIDE) + if (volTypeInsidePoint[0] == volumeType::outside) { selectInside = false; } @@ -283,11 +283,11 @@ Foam::labelList Foam::conformalVoronoiMesh::calcCellZones if ( ( - volType[pointi] == volumeType::INSIDE + volType[pointi] == volumeType::inside && selectInside ) || ( - volType[pointi] == volumeType::OUTSIDE + volType[pointi] == volumeType::outside && !selectInside ) ) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C index 11d9fefc3c..1602ac2396 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C @@ -340,7 +340,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints ); } - } while (circ.circulate(CirculatorBase::CLOCKWISE)); + } while (circ.circulate(CirculatorBase::direction::clockwise)); addMasterAndSlavePoints ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 0e0f56628c..41b6bf6691 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -64,7 +64,7 @@ void Foam::conformationSurfaces::hasBoundedVolume List vTypes ( pts.size(), - volumeType::UNKNOWN + volumeType::unknown ); surface.getVolumeType(pts, vTypes); @@ -569,7 +569,7 @@ Foam::conformationSurfaces::conformationSurfaces referenceVolumeTypes_.setSize ( surfaces_.size(), - volumeType::UNKNOWN + volumeType::unknown ); Info<< endl @@ -666,7 +666,7 @@ Foam::Field Foam::conformationSurfaces::wellInOutSide List ( samplePts.size(), - volumeType::UNKNOWN + volumeType::unknown ) ); @@ -731,7 +731,7 @@ Foam::Field Foam::conformationSurfaces::wellInOutSide if ( !surface.hasVolumeType() - //&& surfaceVolumeTests[s][i] == volumeType::UNKNOWN + //&& surfaceVolumeTests[s][i] == volumeType::unknown ) { pointField sample(1, samplePts[i]); @@ -760,7 +760,7 @@ Foam::Field Foam::conformationSurfaces::wellInOutSide } } - if (surfaceVolumeTests[s][i] == volumeType::OUTSIDE) + if (surfaceVolumeTests[s][i] == volumeType::outside) { if ( @@ -772,7 +772,7 @@ Foam::Field Foam::conformationSurfaces::wellInOutSide break; } } - else if (surfaceVolumeTests[s][i] == volumeType::INSIDE) + else if (surfaceVolumeTests[s][i] == volumeType::inside) { if ( diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index 726bee382b..7cec301dc7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -357,11 +357,11 @@ tmp signedDistance volumeType vT = volType[i]; - if (vT == volumeType::OUTSIDE) + if (vT == volumeType::outside) { fld[pointi] = dist; } - else if (vT == volumeType::INSIDE) + else if (vT == volumeType::inside) { fld[i] = -dist; } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C index 685f6449a8..ea03108d99 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C @@ -112,7 +112,7 @@ class distanceCalc surfaces, samples, scalarField(1, great), - volumeType::OUTSIDE, + volumeType::outside, nearestSurfaces, distance ); diff --git a/applications/utilities/surface/surfaceSubset/surfaceSubset.C b/applications/utilities/surface/surfaceSubset/surfaceSubset.C index 3da5b8f071..d010d6e4ba 100644 --- a/applications/utilities/surface/surfaceSubset/surfaceSubset.C +++ b/applications/utilities/surface/surfaceSubset/surfaceSubset.C @@ -268,8 +268,8 @@ int main(int argc, char *argv[]) if ( outside - ? (t == volumeType::OUTSIDE) - : (t == volumeType::INSIDE) + ? (t == volumeType::outside) + : (t == volumeType::inside) ) { facesToSubset[facei] = true; diff --git a/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C b/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C index 78078faef4..1ff10c590f 100644 --- a/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C +++ b/src/OSspecific/POSIX/signals/sigStopAtWriteNow.C @@ -100,7 +100,7 @@ void Foam::sigStopAtWriteNow::sigHandler(int) Info<< "sigStopAtWriteNow :" << " setting up write and stop at end of the next iteration" << nl << endl; - runTimePtr_->stopAt(Time::saWriteNow); + runTimePtr_->stopAt(Time::stopAtControl::writeNow); //// Throw signal (to old handler) // raise(signal_); diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C index 3e9748ad10..78846a53de 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C @@ -101,7 +101,7 @@ bool Foam::dynamicIndexedOctree::overlaps point other; - if (octant & treeBoundBox::RIGHTHALF) + if (octant & treeBoundBox::octantBit::rightHalf) { other.x() = max.x(); } @@ -110,7 +110,7 @@ bool Foam::dynamicIndexedOctree::overlaps other.x() = min.x(); } - if (octant & treeBoundBox::TOPHALF) + if (octant & treeBoundBox::octantBit::topHalf) { other.y() = max.y(); } @@ -119,7 +119,7 @@ bool Foam::dynamicIndexedOctree::overlaps other.y() = min.y(); } - if (octant & treeBoundBox::FRONTHALF) + if (octant & treeBoundBox::octantBit::frontHalf) { other.z() = max.z(); } @@ -330,7 +330,7 @@ Foam::volumeType Foam::dynamicIndexedOctree::calcVolumeType const node& nod = nodes_[nodeI]; - volumeType myType = volumeType::UNKNOWN; + volumeType myType = volumeType::unknown; for (direction octant = 0; octant < nod.subNodes_.size(); octant++) { @@ -347,7 +347,7 @@ Foam::volumeType Foam::dynamicIndexedOctree::calcVolumeType { // Contents. Depending on position in box might be on either // side. - subType = volumeType::MIXED; + subType = volumeType::mixed; } else { @@ -366,13 +366,13 @@ Foam::volumeType Foam::dynamicIndexedOctree::calcVolumeType // Combine sub node types into type for treeNode. Result is 'mixed' if // types differ among subnodes. - if (myType == volumeType::UNKNOWN) + if (myType == volumeType::unknown) { myType = subType; } else if (subType != myType) { - myType = volumeType::MIXED; + myType = volumeType::mixed; } } return myType; @@ -392,20 +392,20 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType volumeType octantType = volumeType::type(nodeTypes_.get((nodeI<<3)+octant)); - if (octantType == volumeType::INSIDE) + if (octantType == volumeType::inside) { return octantType; } - else if (octantType == volumeType::OUTSIDE) + else if (octantType == volumeType::outside) { return octantType; } - else if (octantType == volumeType::UNKNOWN) + else if (octantType == volumeType::unknown) { // Can happen for e.g. non-manifold surfaces. return octantType; } - else if (octantType == volumeType::MIXED) + else if (octantType == volumeType::mixed) { labelBits index = nod.subNodes_[octant]; @@ -431,7 +431,7 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType << "Empty subnode has invalid volume type MIXED." << abort(FatalError); - return volumeType::UNKNOWN; + return volumeType::unknown; } } else @@ -443,7 +443,7 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType << "Node has invalid volume type " << octantType << abort(FatalError); - return volumeType::UNKNOWN; + return volumeType::unknown; } } @@ -457,11 +457,11 @@ Foam::volumeType Foam::dynamicIndexedOctree::getSide { if ((outsideNormal&vec) >= 0) { - return volumeType::OUTSIDE; + return volumeType::outside; } else { - return volumeType::INSIDE; + return volumeType::inside; } } @@ -725,7 +725,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint << abort(FatalError); } - if (faceID & treeBoundBox::LEFTBIT) + if (faceID & treeBoundBox::faceBit::left) { if (pushInside) { @@ -736,7 +736,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint perturbedPt[0] = bb.min()[0] - (perturbVec[0] + rootVSmall); } } - else if (faceID & treeBoundBox::RIGHTBIT) + else if (faceID & treeBoundBox::faceBit::right) { if (pushInside) { @@ -748,7 +748,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint } } - if (faceID & treeBoundBox::BOTTOMBIT) + if (faceID & treeBoundBox::faceBit::bottom) { if (pushInside) { @@ -759,7 +759,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint perturbedPt[1] = bb.min()[1] - (perturbVec[1] + rootVSmall); } } - else if (faceID & treeBoundBox::TOPBIT) + else if (faceID & treeBoundBox::faceBit::top) { if (pushInside) { @@ -771,7 +771,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint } } - if (faceID & treeBoundBox::BACKBIT) + if (faceID & treeBoundBox::faceBit::back) { if (pushInside) { @@ -782,7 +782,7 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint perturbedPt[2] = bb.min()[2] - (perturbVec[2] + rootVSmall); } } - else if (faceID & treeBoundBox::FRONTBIT) + else if (faceID & treeBoundBox::faceBit::front) { if (pushInside) { @@ -840,31 +840,31 @@ Foam::point Foam::dynamicIndexedOctree::pushPointIntoFace direction nFaces = 0; FixedList faceIndices; - if (ptFaceID & treeBoundBox::LEFTBIT) + if (ptFaceID & treeBoundBox::faceBit::left) { - faceIndices[nFaces++] = treeBoundBox::LEFT; + faceIndices[nFaces++] = treeBoundBox::faceId::left; } - else if (ptFaceID & treeBoundBox::RIGHTBIT) + else if (ptFaceID & treeBoundBox::faceBit::right) { - faceIndices[nFaces++] = treeBoundBox::RIGHT; + faceIndices[nFaces++] = treeBoundBox::faceId::right; } - if (ptFaceID & treeBoundBox::BOTTOMBIT) + if (ptFaceID & treeBoundBox::faceBit::bottom) { - faceIndices[nFaces++] = treeBoundBox::BOTTOM; + faceIndices[nFaces++] = treeBoundBox::faceId::bottom; } - else if (ptFaceID & treeBoundBox::TOPBIT) + else if (ptFaceID & treeBoundBox::faceBit::top) { - faceIndices[nFaces++] = treeBoundBox::TOP; + faceIndices[nFaces++] = treeBoundBox::faceId::top; } - if (ptFaceID & treeBoundBox::BACKBIT) + if (ptFaceID & treeBoundBox::faceBit::back) { - faceIndices[nFaces++] = treeBoundBox::BACK; + faceIndices[nFaces++] = treeBoundBox::faceId::back; } - else if (ptFaceID & treeBoundBox::FRONTBIT) + else if (ptFaceID & treeBoundBox::faceBit::front) { - faceIndices[nFaces++] = treeBoundBox::FRONT; + faceIndices[nFaces++] = treeBoundBox::faceId::front; } @@ -910,35 +910,35 @@ Foam::point Foam::dynamicIndexedOctree::pushPointIntoFace // 2. Snap it back onto the preferred face - if (keepFaceID == treeBoundBox::LEFT) + if (keepFaceID == treeBoundBox::faceId::left) { facePoint.x() = bb.min().x(); - faceID = treeBoundBox::LEFTBIT; + faceID = treeBoundBox::faceBit::left; } - else if (keepFaceID == treeBoundBox::RIGHT) + else if (keepFaceID == treeBoundBox::faceId::right) { facePoint.x() = bb.max().x(); - faceID = treeBoundBox::RIGHTBIT; + faceID = treeBoundBox::faceBit::right; } - else if (keepFaceID == treeBoundBox::BOTTOM) + else if (keepFaceID == treeBoundBox::faceId::bottom) { facePoint.y() = bb.min().y(); - faceID = treeBoundBox::BOTTOMBIT; + faceID = treeBoundBox::faceBit::bottom; } - else if (keepFaceID == treeBoundBox::TOP) + else if (keepFaceID == treeBoundBox::faceId::top) { facePoint.y() = bb.max().y(); - faceID = treeBoundBox::TOPBIT; + faceID = treeBoundBox::faceBit::top; } - else if (keepFaceID == treeBoundBox::BACK) + else if (keepFaceID == treeBoundBox::faceId::back) { facePoint.z() = bb.min().z(); - faceID = treeBoundBox::BACKBIT; + faceID = treeBoundBox::faceBit::back; } - else if (keepFaceID == treeBoundBox::FRONT) + else if (keepFaceID == treeBoundBox::faceId::front) { facePoint.z() = bb.max().z(); - faceID = treeBoundBox::FRONTBIT; + faceID = treeBoundBox::faceBit::front; } @@ -1027,7 +1027,7 @@ bool Foam::dynamicIndexedOctree::walkToNeighbour { // Walk tree to neighbouring node. Gets current position as node and octant // in this node and walks in the direction given by the facePointBits - // (combination of treeBoundBox::LEFTBIT, TOPBIT etc.) Returns false if + // (combination of treeBoundBox::left, top etc.) Returns false if // edge of tree hit. label oldNodeI = nodeI; @@ -1038,42 +1038,42 @@ bool Foam::dynamicIndexedOctree::walkToNeighbour // on the right. // Coordinate direction to test - const direction X = treeBoundBox::RIGHTHALF; - const direction Y = treeBoundBox::TOPHALF; - const direction Z = treeBoundBox::FRONTHALF; + const direction X = treeBoundBox::octantBit::rightHalf; + const direction Y = treeBoundBox::octantBit::topHalf; + const direction Z = treeBoundBox::octantBit::frontHalf; direction octantMask = 0; direction wantedValue = 0; - if ((faceID & treeBoundBox::LEFTBIT) != 0) + if ((faceID & treeBoundBox::faceBit::left) != 0) { // We want to go left so check if in right octant (i.e. x-bit is set) octantMask |= X; wantedValue |= X; } - else if ((faceID & treeBoundBox::RIGHTBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::right) != 0) { octantMask |= X; // wantedValue already 0 } - if ((faceID & treeBoundBox::BOTTOMBIT) != 0) + if ((faceID & treeBoundBox::faceBit::bottom) != 0) { // Want to go down so check for y-bit set. octantMask |= Y; wantedValue |= Y; } - else if ((faceID & treeBoundBox::TOPBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::top) != 0) { // Want to go up so check for y-bit not set. octantMask |= Y; } - if ((faceID & treeBoundBox::BACKBIT) != 0) + if ((faceID & treeBoundBox::faceBit::back) != 0) { octantMask |= Z; wantedValue |= Z; } - else if ((faceID & treeBoundBox::FRONTBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::front) != 0) { octantMask |= Z; } @@ -1093,7 +1093,7 @@ bool Foam::dynamicIndexedOctree::walkToNeighbour // +---+-+-+ // \ // - // e.g. ray is at (a) in octant 0(or 4) with faceIDs : LEFTBIT+TOPBIT. + // e.g. ray is at (a) in octant 0(or 4) with faceIDs : left+top. // If we would be in octant 1(or 5) we could go to the correct octant // in the same node by just flipping the x and y bits (exoring). // But if we are not in octant 1/5 we have to go up until we are. @@ -1271,32 +1271,32 @@ Foam::word Foam::dynamicIndexedOctree::faceString { desc = "noFace"; } - if (faceID & treeBoundBox::LEFTBIT) + if (faceID & treeBoundBox::faceBit::left) { if (!desc.empty()) desc += "+"; desc += "left"; } - if (faceID & treeBoundBox::RIGHTBIT) + if (faceID & treeBoundBox::faceBit::right) { if (!desc.empty()) desc += "+"; desc += "right"; } - if (faceID & treeBoundBox::BOTTOMBIT) + if (faceID & treeBoundBox::faceBit::bottom) { if (!desc.empty()) desc += "+"; desc += "bottom"; } - if (faceID & treeBoundBox::TOPBIT) + if (faceID & treeBoundBox::faceBit::top) { if (!desc.empty()) desc += "+"; desc += "top"; } - if (faceID & treeBoundBox::BACKBIT) + if (faceID & treeBoundBox::faceBit::back) { if (!desc.empty()) desc += "+"; desc += "back"; } - if (faceID & treeBoundBox::FRONTBIT) + if (faceID & treeBoundBox::faceBit::front) { if (!desc.empty()) desc += "+"; desc += "front"; @@ -2351,7 +2351,7 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType { if (nodes_.empty()) { - return volumeType::UNKNOWN; + return volumeType::unknown; } if (nodeTypes_.size() != 8*nodes_.size()) @@ -2359,36 +2359,36 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType // Calculate type for every octant of node. nodeTypes_.setSize(8*nodes_.size()); - nodeTypes_ = volumeType::UNKNOWN; + nodeTypes_ = volumeType::unknown; calcVolumeType(0); if (debug) { - label nUNKNOWN = 0; - label nMIXED = 0; - label nINSIDE = 0; - label nOUTSIDE = 0; + label nUnknown = 0; + label nMixed = 0; + label nInside = 0; + label nOutside = 0; forAll(nodeTypes_, i) { volumeType type = volumeType::type(nodeTypes_.get(i)); - if (type == volumeType::UNKNOWN) + if (type == volumeType::unknown) { - nUNKNOWN++; + nUnknown++; } - else if (type == volumeType::MIXED) + else if (type == volumeType::mixed) { - nMIXED++; + nMixed++; } - else if (type == volumeType::INSIDE) + else if (type == volumeType::inside) { - nINSIDE++; + nInside++; } - else if (type == volumeType::OUTSIDE) + else if (type == volumeType::outside) { - nOUTSIDE++; + nOutside++; } else { @@ -2400,10 +2400,10 @@ Foam::volumeType Foam::dynamicIndexedOctree::getVolumeType << " bb:" << bb() << " nodes_:" << nodes_.size() << " nodeTypes_:" << nodeTypes_.size() - << " nUNKNOWN:" << nUNKNOWN - << " nMIXED:" << nMIXED - << " nINSIDE:" << nINSIDE - << " nOUTSIDE:" << nOUTSIDE + << " nUnknown:" << nUnknown + << " nMixed:" << nMixed + << " nInside:" << nInside + << " nOutside:" << nOutside << endl; } } diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C index 41e80e9c05..eb881afc36 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C @@ -61,7 +61,7 @@ Foam::volumeType Foam::dynamicTreeDataPoint::getVolumeType const point& sample ) const { - return volumeType::UNKNOWN; + return volumeType::unknown; } diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 9b340317c8..2886465717 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -76,7 +76,7 @@ bool Foam::indexedOctree::overlaps point other; - if (octant & treeBoundBox::RIGHTHALF) + if (octant & treeBoundBox::octantBit::rightHalf) { other.x() = max.x(); } @@ -85,7 +85,7 @@ bool Foam::indexedOctree::overlaps other.x() = min.x(); } - if (octant & treeBoundBox::TOPHALF) + if (octant & treeBoundBox::octantBit::topHalf) { other.y() = max.y(); } @@ -94,7 +94,7 @@ bool Foam::indexedOctree::overlaps other.y() = min.y(); } - if (octant & treeBoundBox::FRONTHALF) + if (octant & treeBoundBox::octantBit::frontHalf) { other.z() = max.z(); } @@ -351,7 +351,7 @@ Foam::volumeType Foam::indexedOctree::calcVolumeType const node& nod = nodes_[nodeI]; - volumeType myType = volumeType::UNKNOWN; + volumeType myType = volumeType::unknown; for (direction octant = 0; octant < nod.subNodes_.size(); octant++) { @@ -368,7 +368,7 @@ Foam::volumeType Foam::indexedOctree::calcVolumeType { // Contents. Depending on position in box might be on either // side. - subType = volumeType::MIXED; + subType = volumeType::mixed; } else { @@ -384,13 +384,13 @@ Foam::volumeType Foam::indexedOctree::calcVolumeType // Combine sub node types into type for treeNode. Result is 'mixed' if // types differ among subnodes. - if (myType == volumeType::UNKNOWN) + if (myType == volumeType::unknown) { myType = subType; } else if (subType != myType) { - myType = volumeType::MIXED; + myType = volumeType::mixed; } } return myType; @@ -410,20 +410,20 @@ Foam::volumeType Foam::indexedOctree::getVolumeType volumeType octantType = volumeType::type(nodeTypes_.get((nodeI<<3)+octant)); - if (octantType == volumeType::INSIDE) + if (octantType == volumeType::inside) { return octantType; } - else if (octantType == volumeType::OUTSIDE) + else if (octantType == volumeType::outside) { return octantType; } - else if (octantType == volumeType::UNKNOWN) + else if (octantType == volumeType::unknown) { // Can happen for e.g. non-manifold surfaces. return octantType; } - else if (octantType == volumeType::MIXED) + else if (octantType == volumeType::mixed) { labelBits index = nod.subNodes_[octant]; @@ -446,10 +446,10 @@ Foam::volumeType Foam::indexedOctree::getVolumeType FatalErrorInFunction << "Sample:" << sample << " node:" << nodeI << " with bb:" << nodes_[nodeI].bb_ << nl - << "Empty subnode has invalid volume type MIXED." + << "Empty subnode has invalid volume type mixed." << abort(FatalError); - return volumeType::UNKNOWN; + return volumeType::unknown; } } else @@ -461,7 +461,7 @@ Foam::volumeType Foam::indexedOctree::getVolumeType << "Node has invalid volume type " << octantType << abort(FatalError); - return volumeType::UNKNOWN; + return volumeType::unknown; } } @@ -475,11 +475,11 @@ Foam::volumeType Foam::indexedOctree::getSide { if ((outsideNormal&vec) >= 0) { - return volumeType::OUTSIDE; + return volumeType::outside; } else { - return volumeType::INSIDE; + return volumeType::inside; } } @@ -747,7 +747,7 @@ Foam::point Foam::indexedOctree::pushPoint << abort(FatalError); } - if (faceID & treeBoundBox::LEFTBIT) + if (faceID & treeBoundBox::faceBit::left) { if (pushInside) { @@ -758,7 +758,7 @@ Foam::point Foam::indexedOctree::pushPoint perturbedPt[0] = bb.min()[0] - (perturbVec[0] + rootVSmall); } } - else if (faceID & treeBoundBox::RIGHTBIT) + else if (faceID & treeBoundBox::faceBit::right) { if (pushInside) { @@ -770,7 +770,7 @@ Foam::point Foam::indexedOctree::pushPoint } } - if (faceID & treeBoundBox::BOTTOMBIT) + if (faceID & treeBoundBox::faceBit::bottom) { if (pushInside) { @@ -781,7 +781,7 @@ Foam::point Foam::indexedOctree::pushPoint perturbedPt[1] = bb.min()[1] - (perturbVec[1] + rootVSmall); } } - else if (faceID & treeBoundBox::TOPBIT) + else if (faceID & treeBoundBox::faceBit::top) { if (pushInside) { @@ -793,7 +793,7 @@ Foam::point Foam::indexedOctree::pushPoint } } - if (faceID & treeBoundBox::BACKBIT) + if (faceID & treeBoundBox::faceBit::back) { if (pushInside) { @@ -804,7 +804,7 @@ Foam::point Foam::indexedOctree::pushPoint perturbedPt[2] = bb.min()[2] - (perturbVec[2] + rootVSmall); } } - else if (faceID & treeBoundBox::FRONTBIT) + else if (faceID & treeBoundBox::faceBit::front) { if (pushInside) { @@ -862,31 +862,31 @@ Foam::point Foam::indexedOctree::pushPointIntoFace direction nFaces = 0; FixedList faceIndices; - if (ptFaceID & treeBoundBox::LEFTBIT) + if (ptFaceID & treeBoundBox::faceBit::left) { - faceIndices[nFaces++] = treeBoundBox::LEFT; + faceIndices[nFaces++] = treeBoundBox::faceId::left; } - else if (ptFaceID & treeBoundBox::RIGHTBIT) + else if (ptFaceID & treeBoundBox::faceBit::right) { - faceIndices[nFaces++] = treeBoundBox::RIGHT; + faceIndices[nFaces++] = treeBoundBox::faceId::right; } - if (ptFaceID & treeBoundBox::BOTTOMBIT) + if (ptFaceID & treeBoundBox::faceBit::bottom) { - faceIndices[nFaces++] = treeBoundBox::BOTTOM; + faceIndices[nFaces++] = treeBoundBox::faceId::bottom; } - else if (ptFaceID & treeBoundBox::TOPBIT) + else if (ptFaceID & treeBoundBox::faceBit::top) { - faceIndices[nFaces++] = treeBoundBox::TOP; + faceIndices[nFaces++] = treeBoundBox::faceId::top; } - if (ptFaceID & treeBoundBox::BACKBIT) + if (ptFaceID & treeBoundBox::faceBit::back) { - faceIndices[nFaces++] = treeBoundBox::BACK; + faceIndices[nFaces++] = treeBoundBox::faceId::back; } - else if (ptFaceID & treeBoundBox::FRONTBIT) + else if (ptFaceID & treeBoundBox::faceBit::front) { - faceIndices[nFaces++] = treeBoundBox::FRONT; + faceIndices[nFaces++] = treeBoundBox::faceId::front; } @@ -932,35 +932,35 @@ Foam::point Foam::indexedOctree::pushPointIntoFace // 2. Snap it back onto the preferred face - if (keepFaceID == treeBoundBox::LEFT) + if (keepFaceID == treeBoundBox::faceId::left) { facePoint.x() = bb.min().x(); - faceID = treeBoundBox::LEFTBIT; + faceID = treeBoundBox::faceBit::left; } - else if (keepFaceID == treeBoundBox::RIGHT) + else if (keepFaceID == treeBoundBox::faceId::right) { facePoint.x() = bb.max().x(); - faceID = treeBoundBox::RIGHTBIT; + faceID = treeBoundBox::faceBit::right; } - else if (keepFaceID == treeBoundBox::BOTTOM) + else if (keepFaceID == treeBoundBox::faceId::bottom) { facePoint.y() = bb.min().y(); - faceID = treeBoundBox::BOTTOMBIT; + faceID = treeBoundBox::faceBit::bottom; } - else if (keepFaceID == treeBoundBox::TOP) + else if (keepFaceID == treeBoundBox::faceId::top) { facePoint.y() = bb.max().y(); - faceID = treeBoundBox::TOPBIT; + faceID = treeBoundBox::faceBit::top; } - else if (keepFaceID == treeBoundBox::BACK) + else if (keepFaceID == treeBoundBox::faceId::back) { facePoint.z() = bb.min().z(); - faceID = treeBoundBox::BACKBIT; + faceID = treeBoundBox::faceBit::back; } - else if (keepFaceID == treeBoundBox::FRONT) + else if (keepFaceID == treeBoundBox::faceId::front) { facePoint.z() = bb.max().z(); - faceID = treeBoundBox::FRONTBIT; + faceID = treeBoundBox::faceBit::front; } @@ -1048,7 +1048,7 @@ bool Foam::indexedOctree::walkToNeighbour { // Gets current position as node and octant in this node and walks in the // direction given by the facePointBits (combination of - // treeBoundBox::LEFTBIT, TOPBIT etc.) Returns false if edge of tree hit. + // treeBoundBox::left, top etc.) Returns false if edge of tree hit. label oldNodeI = nodeI; direction oldOctant = octant; @@ -1058,42 +1058,42 @@ bool Foam::indexedOctree::walkToNeighbour // on the right. // Coordinate direction to test - const direction X = treeBoundBox::RIGHTHALF; - const direction Y = treeBoundBox::TOPHALF; - const direction Z = treeBoundBox::FRONTHALF; + const direction X = treeBoundBox::octantBit::rightHalf; + const direction Y = treeBoundBox::octantBit::topHalf; + const direction Z = treeBoundBox::octantBit::frontHalf; direction octantMask = 0; direction wantedValue = 0; - if ((faceID & treeBoundBox::LEFTBIT) != 0) + if ((faceID & treeBoundBox::faceBit::left) != 0) { // We want to go left so check if in right octant (i.e. x-bit is set) octantMask |= X; wantedValue |= X; } - else if ((faceID & treeBoundBox::RIGHTBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::right) != 0) { octantMask |= X; // wantedValue already 0 } - if ((faceID & treeBoundBox::BOTTOMBIT) != 0) + if ((faceID & treeBoundBox::faceBit::bottom) != 0) { // Want to go down so check for y-bit set. octantMask |= Y; wantedValue |= Y; } - else if ((faceID & treeBoundBox::TOPBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::top) != 0) { // Want to go up so check for y-bit not set. octantMask |= Y; } - if ((faceID & treeBoundBox::BACKBIT) != 0) + if ((faceID & treeBoundBox::faceBit::back) != 0) { octantMask |= Z; wantedValue |= Z; } - else if ((faceID & treeBoundBox::FRONTBIT) != 0) + else if ((faceID & treeBoundBox::faceBit::front) != 0) { octantMask |= Z; } @@ -1113,7 +1113,7 @@ bool Foam::indexedOctree::walkToNeighbour // +---+-+-+ // \ // - // e.g. ray is at (a) in octant 0(or 4) with faceIDs : LEFTBIT+TOPBIT. + // e.g. ray is at (a) in octant 0(or 4) with faceIDs : left+top. // If we would be in octant 1(or 5) we could go to the correct octant // in the same node by just flipping the x and y bits (exoring). // But if we are not in octant 1/5 we have to go up until we are. @@ -1291,32 +1291,32 @@ Foam::word Foam::indexedOctree::faceString { desc = "noFace"; } - if (faceID & treeBoundBox::LEFTBIT) + if (faceID & treeBoundBox::faceBit::left) { if (!desc.empty()) desc += "+"; desc += "left"; } - if (faceID & treeBoundBox::RIGHTBIT) + if (faceID & treeBoundBox::faceBit::right) { if (!desc.empty()) desc += "+"; desc += "right"; } - if (faceID & treeBoundBox::BOTTOMBIT) + if (faceID & treeBoundBox::faceBit::bottom) { if (!desc.empty()) desc += "+"; desc += "bottom"; } - if (faceID & treeBoundBox::TOPBIT) + if (faceID & treeBoundBox::faceBit::top) { if (!desc.empty()) desc += "+"; desc += "top"; } - if (faceID & treeBoundBox::BACKBIT) + if (faceID & treeBoundBox::faceBit::back) { if (!desc.empty()) desc += "+"; desc += "back"; } - if (faceID & treeBoundBox::FRONTBIT) + if (faceID & treeBoundBox::faceBit::front) { if (!desc.empty()) desc += "+"; desc += "front"; @@ -2628,7 +2628,7 @@ Foam::volumeType Foam::indexedOctree::getVolumeType { if (nodes_.empty()) { - return volumeType::UNKNOWN; + return volumeType::unknown; } if (nodeTypes_.size() != 8*nodes_.size()) @@ -2636,36 +2636,36 @@ Foam::volumeType Foam::indexedOctree::getVolumeType // Calculate type for every octant of node. nodeTypes_.setSize(8*nodes_.size()); - nodeTypes_ = volumeType::UNKNOWN; + nodeTypes_ = volumeType::unknown; calcVolumeType(0); if (debug) { - label nUNKNOWN = 0; - label nMIXED = 0; - label nINSIDE = 0; - label nOUTSIDE = 0; + label nUnknown = 0; + label nMixed = 0; + label nInside = 0; + label nOutside = 0; forAll(nodeTypes_, i) { volumeType type = volumeType::type(nodeTypes_.get(i)); - if (type == volumeType::UNKNOWN) + if (type == volumeType::unknown) { - nUNKNOWN++; + nUnknown++; } - else if (type == volumeType::MIXED) + else if (type == volumeType::mixed) { - nMIXED++; + nMixed++; } - else if (type == volumeType::INSIDE) + else if (type == volumeType::inside) { - nINSIDE++; + nInside++; } - else if (type == volumeType::OUTSIDE) + else if (type == volumeType::outside) { - nOUTSIDE++; + nOutside++; } else { @@ -2677,10 +2677,10 @@ Foam::volumeType Foam::indexedOctree::getVolumeType << " bb:" << bb() << " nodes_:" << nodes_.size() << " nodeTypes_:" << nodeTypes_.size() - << " nUNKNOWN:" << nUNKNOWN - << " nMIXED:" << nMIXED - << " nINSIDE:" << nINSIDE - << " nOUTSIDE:" << nOUTSIDE + << " nUnknown:" << nUnknown + << " nMixed:" << nMixed + << " nInside:" << nInside + << " nOutside:" << nOutside << endl; } } diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H index 195146f639..1d7a32e398 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H @@ -204,7 +204,7 @@ public: ) const { NotImplemented; - return volumeType::UNKNOWN; + return volumeType::unknown; } //- Does (bb of) shape at index overlap bb diff --git a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H index 4a74265669..bcc6f15080 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/volumeType.H +++ b/src/OpenFOAM/algorithms/indexedOctree/volumeType.H @@ -59,10 +59,10 @@ public: //- Volume types enum type { - UNKNOWN = 0, - MIXED = 1, - INSIDE = 2, - OUTSIDE = 3 + unknown = 0, + mixed = 1, + inside = 2, + outside = 3 }; @@ -86,7 +86,7 @@ public: //- Construct null volumeType() : - t_(UNKNOWN) + t_(unknown) {} //- Construct from components diff --git a/src/OpenFOAM/containers/Circulators/Circulator/Circulator.H b/src/OpenFOAM/containers/Circulators/Circulator/Circulator.H index f19f313ea2..29231ea57b 100644 --- a/src/OpenFOAM/containers/Circulators/Circulator/Circulator.H +++ b/src/OpenFOAM/containers/Circulators/Circulator/Circulator.H @@ -49,7 +49,7 @@ Description Info<< "Iterate forwards over face : " << circ() << endl; - } while (circ.circulate(CirculatorBase::CLOCKWISE)); + } while (circ.circulate(CirculatorBase::direction::clockwise)); \endcode SourceFiles @@ -144,7 +144,11 @@ public: inline size_type size() const; //- Circulate around the list in the given direction - inline bool circulate(const CirculatorBase::direction dir = NONE); + inline bool circulate + ( + const CirculatorBase::direction dir = + CirculatorBase::direction::none + ); //- Set the fulcrum to the current position of the iterator inline void setFulcrumToIterator(); diff --git a/src/OpenFOAM/containers/Circulators/Circulator/CirculatorI.H b/src/OpenFOAM/containers/Circulators/Circulator/CirculatorI.H index 1e5cb1785b..27bc8788be 100644 --- a/src/OpenFOAM/containers/Circulators/Circulator/CirculatorI.H +++ b/src/OpenFOAM/containers/Circulators/Circulator/CirculatorI.H @@ -99,11 +99,11 @@ bool Foam::Circulator::circulate const CirculatorBase::direction dir ) { - if (dir == CirculatorBase::CLOCKWISE) + if (dir == CirculatorBase::direction::clockwise) { operator++(); } - else if (dir == CirculatorBase::ANTICLOCKWISE) + else if (dir == CirculatorBase::direction::anticlockwise) { operator--(); } diff --git a/src/OpenFOAM/containers/Circulators/CirculatorBase/CirculatorBase.H b/src/OpenFOAM/containers/Circulators/CirculatorBase/CirculatorBase.H index 4e9c9e68d9..f17cf12ce8 100644 --- a/src/OpenFOAM/containers/Circulators/CirculatorBase/CirculatorBase.H +++ b/src/OpenFOAM/containers/Circulators/CirculatorBase/CirculatorBase.H @@ -49,19 +49,19 @@ public: // Public data //- Direction type enumeration - enum direction + enum class direction { - NONE, - CLOCKWISE, - ANTICLOCKWISE + none, + clockwise, + anticlockwise }; // Constructors //- Construct null - CirculatorBase(){}; - + CirculatorBase() + {} }; diff --git a/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculator.H b/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculator.H index 73c767068e..6e2a3e340d 100644 --- a/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculator.H +++ b/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculator.H @@ -47,7 +47,7 @@ Description { Info<< "Iterate forwards over face : " << circ() << endl; - } while (circ.circulate(CirculatorBase::CLOCKWISE)); + } while (circ.circulate(CirculatorBase::direction::clockwise)); \endcode \code @@ -63,8 +63,11 @@ Description } while ( - circClockwise.circulate(CirculatorBase::CLOCKWISE), - circAnticlockwise.circulate(CirculatorBase::ANTICLOCKWISE) + circClockwise.circulate(CirculatorBase::direction::clockwise), + circAnticlockwise.circulate + ( + CirculatorBase::direction::anticlockwise + ) ); \endcode @@ -164,7 +167,11 @@ public: inline size_type size() const; //- Circulate around the list in the given direction - inline bool circulate(const CirculatorBase::direction dir = NONE); + inline bool circulate + ( + const CirculatorBase::direction dir = + CirculatorBase::direction::none + ); //- Set the fulcrum to the current position of the iterator inline void setFulcrumToIterator(); diff --git a/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculatorI.H b/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculatorI.H index 31cea7a95f..5c56b1bac7 100644 --- a/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculatorI.H +++ b/src/OpenFOAM/containers/Circulators/ConstCirculator/ConstCirculatorI.H @@ -102,11 +102,11 @@ bool Foam::ConstCirculator::circulate const CirculatorBase::direction dir ) { - if (dir == CirculatorBase::CLOCKWISE) + if (dir == CirculatorBase::direction::clockwise) { operator++(); } - else if (dir == CirculatorBase::ANTICLOCKWISE) + else if (dir == CirculatorBase::direction::anticlockwise) { operator--(); } diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 0a8d04cf44..33b98f0959 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -39,7 +39,7 @@ namespace Foam template<> const char* Foam::NamedEnum < - Foam::Time::stopAtControls, + Foam::Time::stopAtControl, 4 >::names[] = { @@ -52,7 +52,7 @@ namespace Foam template<> const char* Foam::NamedEnum < - Foam::Time::writeControls, + Foam::Time::writeControl, 5 >::names[] = { @@ -64,13 +64,13 @@ namespace Foam }; } -const Foam::NamedEnum +const Foam::NamedEnum Foam::Time::stopAtControlNames_; -const Foam::NamedEnum +const Foam::NamedEnum Foam::Time::writeControlNames_; -Foam::Time::fmtflags Foam::Time::format_(Foam::Time::general); +Foam::Time::format Foam::Time::format_(Foam::Time::format::general); int Foam::Time::precision_(6); @@ -350,8 +350,8 @@ Foam::Time::Time startTime_(0), endTime_(0), - stopAt_(saEndTime), - writeControl_(wcTimeStep), + stopAt_(stopAtControl::endTime), + writeControl_(writeControl::timeStep), writeInterval_(great), purgeWrite_(0), writeOnce_(false), @@ -426,8 +426,8 @@ Foam::Time::Time startTime_(0), endTime_(0), - stopAt_(saEndTime), - writeControl_(wcTimeStep), + stopAt_(stopAtControl::endTime), + writeControl_(writeControl::timeStep), writeInterval_(great), purgeWrite_(0), writeOnce_(false), @@ -509,8 +509,8 @@ Foam::Time::Time startTime_(0), endTime_(0), - stopAt_(saEndTime), - writeControl_(wcTimeStep), + stopAt_(stopAtControl::endTime), + writeControl_(writeControl::timeStep), writeInterval_(great), purgeWrite_(0), writeOnce_(false), @@ -588,8 +588,8 @@ Foam::Time::Time startTime_(0), endTime_(0), - stopAt_(saEndTime), - writeControl_(wcTimeStep), + stopAt_(stopAtControl::endTime), + writeControl_(writeControl::timeStep), writeInterval_(great), purgeWrite_(0), writeOnce_(false), @@ -852,13 +852,13 @@ bool Foam::Time::end() const } -bool Foam::Time::stopAt(const stopAtControls sa) const +bool Foam::Time::stopAt(const stopAtControl sa) const { const bool changed = (stopAt_ != sa); stopAt_ = sa; // adjust endTime - if (sa == saEndTime) + if (sa == stopAtControl::endTime) { controlDict_.lookup("endTime") >> endTime_; } @@ -945,7 +945,7 @@ void Foam::Time::setDeltaT(const scalar deltaT) functionObjects_.setTimeStep(); - if (writeControl_ == wcAdjustableRunTime) + if (writeControl_ == writeControl::adjustableRunTime) { adjustDeltaT(); } @@ -1025,7 +1025,11 @@ Foam::Time& Foam::Time::operator++() // Reduce so all decide the same. label flag = 0; - if (sigStopAtWriteNow_.active() && stopAt_ == saWriteNow) + if + ( + sigStopAtWriteNow_.active() + && stopAt_ == stopAtControl::writeNow + ) { flag += 1; } @@ -1037,7 +1041,7 @@ Foam::Time& Foam::Time::operator++() if (flag & 1) { - stopAt_ = saWriteNow; + stopAt_ = stopAtControl::writeNow; } if (flag & 2) { @@ -1049,12 +1053,12 @@ Foam::Time& Foam::Time::operator++() switch (writeControl_) { - case wcTimeStep: + case writeControl::timeStep: writeTime_ = !(timeIndex_ % label(writeInterval_)); break; - case wcRunTime: - case wcAdjustableRunTime: + case writeControl::runTime: + case writeControl::adjustableRunTime: { label writeIndex = label ( @@ -1070,7 +1074,7 @@ Foam::Time& Foam::Time::operator++() } break; - case wcCpuTime: + case writeControl::cpuTime: { label writeIndex = label ( @@ -1085,7 +1089,7 @@ Foam::Time& Foam::Time::operator++() } break; - case wcClockTime: + case writeControl::clockTime: { label writeIndex = label ( @@ -1105,16 +1109,16 @@ Foam::Time& Foam::Time::operator++() // Check if endTime needs adjustment to stop at the next run()/end() if (!end()) { - if (stopAt_ == saNoWriteNow) + if (stopAt_ == stopAtControl::noWriteNow) { endTime_ = value(); } - else if (stopAt_ == saWriteNow) + else if (stopAt_ == stopAtControl::writeNow) { endTime_ = value(); writeTime_ = true; } - else if (stopAt_ == saNextWrite && writeTime_ == true) + else if (stopAt_ == stopAtControl::nextWrite && writeTime_ == true) { endTime_ = value(); } diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index f0b01f8f4f..ee7af093b9 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.H @@ -86,26 +86,26 @@ class Time public: //- Write control options - enum writeControls + enum class writeControl { - wcTimeStep, - wcRunTime, - wcAdjustableRunTime, - wcClockTime, - wcCpuTime + timeStep, + runTime, + adjustableRunTime, + clockTime, + cpuTime }; //- Stop-run control options - enum stopAtControls + enum class stopAtControl { - saEndTime, //!< stop when Time reaches the prescribed endTime - saNoWriteNow, //!< set endTime to stop immediately w/o writing - saWriteNow, //!< set endTime to stop immediately w/ writing - saNextWrite //!< stop the next time data are written + endTime, //!< stop when Time reaches the prescribed endTime + noWriteNow, //!< set endTime to stop immediately w/o writing + writeNow, //!< set endTime to stop immediately w/ writing + nextWrite //!< stop the next time data are written }; //- Supported time directory name formats - enum fmtflags + enum class format { general = 0, fixed = ios_base::fixed, @@ -121,11 +121,11 @@ protected: scalar startTime_; mutable scalar endTime_; - static const NamedEnum stopAtControlNames_; - mutable stopAtControls stopAt_; + static const NamedEnum stopAtControlNames_; + mutable stopAtControl stopAt_; - static const NamedEnum writeControlNames_; - writeControls writeControl_; + static const NamedEnum writeControlNames_; + writeControl writeControl_; scalar writeInterval_; @@ -152,7 +152,7 @@ protected: //- Time directory name format - static fmtflags format_; + static format format_; //- Time directory name precision static int precision_; @@ -488,7 +488,7 @@ public: //- Adjust the current stopAtControl. Note that this value // only persists until the next time the dictionary is read. // Return true if the stopAtControl changed. - virtual bool stopAt(const stopAtControls) const; + virtual bool stopAt(const stopAtControl) const; //- Reset the time and time-index to those of the given time virtual void setTime(const Time&); diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index b8cbd052c1..bbe254fc95 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -258,7 +258,11 @@ void Foam::Time::readDict() if (controlDict_.readIfPresent("writeInterval", writeInterval_)) { - if (writeControl_ == wcTimeStep && label(writeInterval_) < 1) + if + ( + writeControl_ == writeControl::timeStep + && label(writeInterval_) < 1 + ) { FatalIOErrorInFunction(controlDict_) << "writeInterval < 1 for writeControl timeStep" @@ -275,8 +279,8 @@ void Foam::Time::readDict() { switch (writeControl_) { - case wcRunTime: - case wcAdjustableRunTime: + case writeControl::runTime: + case writeControl::adjustableRunTime: // Recalculate writeTimeIndex_ to be in units of current // writeInterval. writeTimeIndex_ = label @@ -311,15 +315,15 @@ void Foam::Time::readDict() if (formatName == "general") { - format_ = general; + format_ = format::general; } else if (formatName == "fixed") { - format_ = fixed; + format_ = format::fixed; } else if (formatName == "scientific") { - format_ = scientific; + format_ = format::scientific; } else { @@ -337,7 +341,7 @@ void Foam::Time::readDict() { stopAt_ = stopAtControlNames_.read(controlDict_.lookup("stopAt")); - if (stopAt_ == saEndTime) + if (stopAt_ == stopAtControl::endTime) { controlDict_.lookup("endTime") >> endTime_; } @@ -596,7 +600,7 @@ bool Foam::Time::writeNow() bool Foam::Time::writeAndEnd() { - stopAt_ = saWriteNow; + stopAt_ = stopAtControl::writeNow; endTime_ = value(); return writeNow(); diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 08bf8758cd..15d3af3a37 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -336,7 +336,7 @@ int Foam::face::compare(const face& a, const face& b) break; } - } while (bCirc.circulate(CirculatorBase::CLOCKWISE)); + } while (bCirc.circulate(CirculatorBase::direction::clockwise)); // If the circulator has stopped then faces a and b do not share a matching // point. Doesn't work on matching, single element face. @@ -355,8 +355,8 @@ int Foam::face::compare(const face& a, const face& b) } while ( - aCirc.circulate(CirculatorBase::CLOCKWISE), - bCirc.circulate(CirculatorBase::CLOCKWISE) + aCirc.circulate(CirculatorBase::direction::clockwise), + bCirc.circulate(CirculatorBase::direction::clockwise) ); // If the circulator has stopped then faces a and b matched. @@ -383,8 +383,8 @@ int Foam::face::compare(const face& a, const face& b) } while ( - aCirc.circulate(CirculatorBase::CLOCKWISE), - bCirc.circulate(CirculatorBase::ANTICLOCKWISE) + aCirc.circulate(CirculatorBase::direction::clockwise), + bCirc.circulate(CirculatorBase::direction::anticlockwise) ); // If the circulator has stopped then faces a and b matched. diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 2a5e8a0210..ac981ad8f3 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -627,12 +627,11 @@ Foam::label Foam::processorPolyPatch::matchFace return -1; } - enum CirculatorBase::direction circulateDirection - = CirculatorBase::CLOCKWISE; + CirculatorBase::direction circulateDirection = CirculatorBase::direction::clockwise; if (!sameOrientation) { - circulateDirection = CirculatorBase::ANTICLOCKWISE; + circulateDirection = CirculatorBase::direction::anticlockwise; } label matchFp = -1; @@ -679,7 +678,7 @@ Foam::label Foam::processorPolyPatch::matchFace } while ( - aCirc.circulate(CirculatorBase::CLOCKWISE), + aCirc.circulate(CirculatorBase::direction::clockwise), bCirc2.circulate(circulateDirection) ); diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C index bca62a3a41..9260b180b3 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C @@ -115,12 +115,12 @@ Foam::edgeList Foam::treeBoundBox::calcEdges(const label edgesArray[12][2]) Foam::FixedList Foam::treeBoundBox::calcFaceNormals() { FixedList normals; - normals[LEFT] = vector(-1, 0, 0); - normals[RIGHT] = vector( 1, 0, 0); - normals[BOTTOM] = vector( 0, -1, 0); - normals[TOP] = vector( 0, 1, 0); - normals[BACK] = vector( 0, 0, -1); - normals[FRONT] = vector( 0, 0, 1); + normals[faceId::left] = vector(-1, 0, 0); + normals[faceId::right] = vector( 1, 0, 0); + normals[faceId::bottom] = vector( 0, -1, 0); + normals[faceId::top] = vector( 0, 1, 0); + normals[faceId::back] = vector( 0, 0, -1); + normals[faceId::front] = vector( 0, 0, 1); return normals; } @@ -201,7 +201,7 @@ Foam::treeBoundBox Foam::treeBoundBox::subBbox point& bbMin = subBb.min(); point& bbMax = subBb.max(); - if (octant & treeBoundBox::RIGHTHALF) + if (octant & octantBit::rightHalf) { bbMin.x() = mid.x(); // mid -> max } @@ -210,7 +210,7 @@ Foam::treeBoundBox Foam::treeBoundBox::subBbox bbMax.x() = mid.x(); // min -> mid } - if (octant & treeBoundBox::TOPHALF) + if (octant & octantBit::topHalf) { bbMin.y() = mid.y(); // mid -> max } @@ -219,7 +219,7 @@ Foam::treeBoundBox Foam::treeBoundBox::subBbox bbMax.y() = mid.y(); // min -> mid } - if (octant & treeBoundBox::FRONTHALF) + if (octant & octantBit::frontHalf) { bbMin.z() = mid.z(); // mid -> max } @@ -280,7 +280,7 @@ bool Foam::treeBoundBox::intersects return false; } - if (ptBits & LEFTBIT) + if (ptBits & faceBit::left) { // Intersect with plane V=min, n=-1,0,0 if (Foam::mag(overallVec.x()) > vSmall) @@ -297,7 +297,7 @@ bool Foam::treeBoundBox::intersects pt.x() = min().x(); } } - else if (ptBits & RIGHTBIT) + else if (ptBits & faceBit::right) { // Intersect with plane V=max, n=1,0,0 if (Foam::mag(overallVec.x()) > vSmall) @@ -312,7 +312,7 @@ bool Foam::treeBoundBox::intersects pt.x() = max().x(); } } - else if (ptBits & BOTTOMBIT) + else if (ptBits & faceBit::bottom) { // Intersect with plane V=min, n=0,-1,0 if (Foam::mag(overallVec.y()) > vSmall) @@ -327,7 +327,7 @@ bool Foam::treeBoundBox::intersects pt.x() = min().y(); } } - else if (ptBits & TOPBIT) + else if (ptBits & faceBit::top) { // Intersect with plane V=max, n=0,1,0 if (Foam::mag(overallVec.y()) > vSmall) @@ -342,7 +342,7 @@ bool Foam::treeBoundBox::intersects pt.y() = max().y(); } } - else if (ptBits & BACKBIT) + else if (ptBits & faceBit::back) { // Intersect with plane V=min, n=0,0,-1 if (Foam::mag(overallVec.z()) > vSmall) @@ -357,7 +357,7 @@ bool Foam::treeBoundBox::intersects pt.z() = min().z(); } } - else if (ptBits & FRONTBIT) + else if (ptBits & faceBit::front) { // Intersect with plane V=max, n=0,0,1 if (Foam::mag(overallVec.z()) > vSmall) @@ -434,29 +434,29 @@ Foam::direction Foam::treeBoundBox::faceBits(const point& pt) const direction faceBits = 0; if (pt.x() == min().x()) { - faceBits |= LEFTBIT; + faceBits |= faceBit::left; } else if (pt.x() == max().x()) { - faceBits |= RIGHTBIT; + faceBits |= faceBit::right; } if (pt.y() == min().y()) { - faceBits |= BOTTOMBIT; + faceBits |= faceBit::bottom; } else if (pt.y() == max().y()) { - faceBits |= TOPBIT; + faceBits |= faceBit::top; } if (pt.z() == min().z()) { - faceBits |= BACKBIT; + faceBits |= faceBit::back; } else if (pt.z() == max().z()) { - faceBits |= FRONTBIT; + faceBits |= faceBit::front; } return faceBits; } @@ -468,29 +468,29 @@ Foam::direction Foam::treeBoundBox::posBits(const point& pt) const if (pt.x() < min().x()) { - posBits |= LEFTBIT; + posBits |= faceBit::left; } else if (pt.x() > max().x()) { - posBits |= RIGHTBIT; + posBits |= faceBit::right; } if (pt.y() < min().y()) { - posBits |= BOTTOMBIT; + posBits |= faceBit::bottom; } else if (pt.y() > max().y()) { - posBits |= TOPBIT; + posBits |= faceBit::top; } if (pt.z() < min().z()) { - posBits |= BACKBIT; + posBits |= faceBit::back; } else if (pt.z() > max().z()) { - posBits |= FRONTBIT; + posBits |= faceBit::front; } return posBits; } diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H index 9f1f0062b2..b2d74707a4 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H @@ -113,54 +113,66 @@ public: //- Bits used for octant/point coding. // Every octant/corner point is the combination of three faces. - enum octantBit + struct octantBit { - RIGHTHALF = 0x1 << 0, - TOPHALF = 0x1 << 1, - FRONTHALF = 0x1 << 2 + enum + { + rightHalf = 0x1 << 0, + topHalf = 0x1 << 1, + frontHalf = 0x1 << 2 + }; }; //- Face codes - enum faceId + struct faceId { - LEFT = 0, - RIGHT = 1, - BOTTOM = 2, - TOP = 3, - BACK = 4, - FRONT = 5 + enum + { + left = 0, + right = 1, + bottom = 2, + top = 3, + back = 4, + front = 5 + }; }; //- Bits used for face coding - enum faceBit + struct faceBit { - NOFACE = 0, - LEFTBIT = 0x1 << LEFT, //1 - RIGHTBIT = 0x1 << RIGHT, //2 - BOTTOMBIT = 0x1 << BOTTOM, //4 - TOPBIT = 0x1 << TOP, //8 - BACKBIT = 0x1 << BACK, //16 - FRONTBIT = 0x1 << FRONT, //32 + enum + { + noFace = 0, + left = 0x1 << faceId::left, //1 + right = 0x1 << faceId::right, //2 + bottom = 0x1 << faceId::bottom, //4 + top = 0x1 << faceId::top, //8 + back = 0x1 << faceId::back, //16 + front = 0x1 << faceId::front, //32 + }; }; //- Edges codes. - // E01 = edge between 0 and 1. - enum edgeId + // e01 = edge between 0 and 1. + struct edgeId { - E01 = 0, - E13 = 1, - E23 = 2, - E02 = 3, + enum + { + e01 = 0, + e13 = 1, + e23 = 2, + e02 = 3, - E45 = 4, - E57 = 5, - E67 = 6, - E46 = 7, + e45 = 4, + e57 = 5, + e67 = 6, + e46 = 7, - E04 = 8, - E15 = 9, - E37 = 10, - E26 = 11 + e04 = 8, + e15 = 9, + e37 = 10, + e26 = 11 + }; }; //- Face to point addressing diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H index a310407e89..4552035bd4 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H @@ -64,9 +64,9 @@ inline Foam::point Foam::treeBoundBox::corner(const direction octant) const { return point ( - (octant & RIGHTHALF) ? max().x() : min().x(), - (octant & TOPHALF) ? max().y() : min().y(), - (octant & FRONTHALF) ? max().z() : min().z() + (octant & octantBit::rightHalf) ? max().x() : min().x(), + (octant & octantBit::topHalf) ? max().y() : min().y(), + (octant & octantBit::frontHalf) ? max().z() : min().z() ); } @@ -90,17 +90,17 @@ inline Foam::direction Foam::treeBoundBox::subOctant if (pt.x() > mid.x()) { - octant |= treeBoundBox::RIGHTHALF; + octant |= octantBit::rightHalf; } if (pt.y() > mid.y()) { - octant |= treeBoundBox::TOPHALF; + octant |= octantBit::topHalf; } if (pt.z() > mid.z()) { - octant |= treeBoundBox::FRONTHALF; + octant |= octantBit::frontHalf; } return octant; @@ -133,7 +133,7 @@ inline Foam::direction Foam::treeBoundBox::subOctant if (pt.x() > mid.x()) { - octant |= treeBoundBox::RIGHTHALF; + octant |= octantBit::rightHalf; } else if (pt.x() == mid.x()) { @@ -142,7 +142,7 @@ inline Foam::direction Foam::treeBoundBox::subOctant if (pt.y() > mid.y()) { - octant |= treeBoundBox::TOPHALF; + octant |= octantBit::topHalf; } else if (pt.y() == mid.y()) { @@ -151,7 +151,7 @@ inline Foam::direction Foam::treeBoundBox::subOctant if (pt.z() > mid.z()) { - octant |= treeBoundBox::FRONTHALF; + octant |= octantBit::frontHalf; } else if (pt.z() == mid.z()) { @@ -179,40 +179,40 @@ inline Foam::direction Foam::treeBoundBox::subOctant if (pt.x() > mid.x()) { - octant |= treeBoundBox::RIGHTHALF; + octant |= octantBit::rightHalf; } else if (pt.x() == mid.x()) { onEdge = true; if (dir.x() > 0) { - octant |= treeBoundBox::RIGHTHALF; + octant |= octantBit::rightHalf; } } if (pt.y() > mid.y()) { - octant |= treeBoundBox::TOPHALF; + octant |= octantBit::topHalf; } else if (pt.y() == mid.y()) { onEdge = true; if (dir.y() > 0) { - octant |= treeBoundBox::TOPHALF; + octant |= octantBit::topHalf; } } if (pt.z() > mid.z()) { - octant |= treeBoundBox::FRONTHALF; + octant |= octantBit::frontHalf; } else if (pt.z() == mid.z()) { onEdge = true; if (dir.z() > 0) { - octant |= treeBoundBox::FRONTHALF; + octant |= octantBit::frontHalf; } } @@ -234,19 +234,19 @@ inline void Foam::treeBoundBox::searchOrder if (dist.x() < 0) { - octant |= treeBoundBox::RIGHTHALF; + octant |= octantBit::rightHalf; dist.x() *= -1; } if (dist.y() < 0) { - octant |= treeBoundBox::TOPHALF; + octant |= octantBit::topHalf; dist.y() *= -1; } if (dist.z() < 0) { - octant |= treeBoundBox::FRONTHALF; + octant |= octantBit::frontHalf; dist.z() *= -1; } @@ -258,42 +258,42 @@ inline void Foam::treeBoundBox::searchOrder { if (dist.y() < dist.z()) { - min = treeBoundBox::RIGHTHALF; - mid = treeBoundBox::TOPHALF; - max = treeBoundBox::FRONTHALF; + min = octantBit::rightHalf; + mid = octantBit::topHalf; + max = octantBit::frontHalf; } else if (dist.z() < dist.x()) { - min = treeBoundBox::FRONTHALF; - mid = treeBoundBox::RIGHTHALF; - max = treeBoundBox::TOPHALF; + min = octantBit::frontHalf; + mid = octantBit::rightHalf; + max = octantBit::topHalf; } else { - min = treeBoundBox::RIGHTHALF; - mid = treeBoundBox::FRONTHALF; - max = treeBoundBox::TOPHALF; + min = octantBit::rightHalf; + mid = octantBit::frontHalf; + max = octantBit::topHalf; } } else { if (dist.z() < dist.y()) { - min = treeBoundBox::FRONTHALF; - mid = treeBoundBox::TOPHALF; - max = treeBoundBox::RIGHTHALF; + min = octantBit::frontHalf; + mid = octantBit::topHalf; + max = octantBit::rightHalf; } else if (dist.x() < dist.z()) { - min = treeBoundBox::TOPHALF; - mid = treeBoundBox::RIGHTHALF; - max = treeBoundBox::FRONTHALF; + min = octantBit::topHalf; + mid = octantBit::rightHalf; + max = octantBit::frontHalf; } else { - min = treeBoundBox::TOPHALF; - mid = treeBoundBox::FRONTHALF; - max = treeBoundBox::RIGHTHALF; + min = octantBit::topHalf; + mid = octantBit::frontHalf; + max = octantBit::rightHalf; } } diff --git a/src/engine/engineTime/crankConRod/crankConRod.C b/src/engine/engineTime/crankConRod/crankConRod.C index 0e979e7d49..8683e8eb21 100644 --- a/src/engine/engineTime/crankConRod/crankConRod.C +++ b/src/engine/engineTime/crankConRod/crankConRod.C @@ -45,8 +45,8 @@ void Foam::crankConRod::timeAdjustment() if ( - writeControl_ == wcRunTime - || writeControl_ == wcAdjustableRunTime + writeControl_ == writeControl::runTime + || writeControl_ == writeControl::adjustableRunTime ) { writeInterval_ = degToTime(writeInterval_); diff --git a/src/finiteVolume/cfdTools/general/solutionControl/convergenceControl/convergenceControl/convergenceControl.C b/src/finiteVolume/cfdTools/general/solutionControl/convergenceControl/convergenceControl/convergenceControl.C index a350d458f9..1a02088d87 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/convergenceControl/convergenceControl/convergenceControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/convergenceControl/convergenceControl/convergenceControl.C @@ -102,7 +102,7 @@ bool Foam::convergenceControl::endIfConverged(Time& time) { if (time.writeTime()) { - time.stopAt(Time::saNoWriteNow); + time.stopAt(Time::stopAtControl::noWriteNow); time.setEndTime(time); } else diff --git a/src/functionObjects/utilities/abort/abort.C b/src/functionObjects/utilities/abort/abort.C index 0a1f16b8d6..8e14be2a51 100644 --- a/src/functionObjects/utilities/abort/abort.C +++ b/src/functionObjects/utilities/abort/abort.C @@ -143,7 +143,7 @@ bool Foam::functionObjects::abort::execute() { case actionType::noWriteNow : { - if (time_.stopAt(Time::saNoWriteNow)) + if (time_.stopAt(Time::stopAtControl::noWriteNow)) { Info<< "USER REQUESTED ABORT (timeIndex=" << time_.timeIndex() @@ -155,7 +155,7 @@ bool Foam::functionObjects::abort::execute() case actionType::writeNow : { - if (time_.stopAt(Time::saWriteNow)) + if (time_.stopAt(Time::stopAtControl::writeNow)) { Info<< "USER REQUESTED ABORT (timeIndex=" << time_.timeIndex() @@ -167,7 +167,7 @@ bool Foam::functionObjects::abort::execute() case actionType::nextWrite : { - if (time_.stopAt(Time::saNextWrite)) + if (time_.stopAt(Time::stopAtControl::nextWrite)) { Info<< "USER REQUESTED ABORT (timeIndex=" << time_.timeIndex() diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C index 017a828bef..72c0184324 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C @@ -1314,11 +1314,11 @@ void Foam::refinementSurfaces::findInside if ( ( - volType[pointi] == volumeType::INSIDE + volType[pointi] == volumeType::inside && selectionMethod == surfaceZonesInfo::INSIDE ) || ( - volType[pointi] == volumeType::OUTSIDE + volType[pointi] == volumeType::outside && selectionMethod == surfaceZonesInfo::OUTSIDE ) ) diff --git a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C index c6efa404d9..bf9384e3f0 100644 --- a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C @@ -331,11 +331,11 @@ void Foam::shellSurfaces::findHigherLevel ( ( modes_[shellI] == INSIDE - && volType[i] == volumeType::INSIDE + && volType[i] == volumeType::inside ) || ( modes_[shellI] == OUTSIDE - && volType[i] == volumeType::OUTSIDE + && volType[i] == volumeType::outside ) ) { diff --git a/src/meshTools/indexedOctree/treeDataEdge.C b/src/meshTools/indexedOctree/treeDataEdge.C index c6580e91db..4e97e11aeb 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.C +++ b/src/meshTools/indexedOctree/treeDataEdge.C @@ -134,7 +134,7 @@ Foam::volumeType Foam::treeDataEdge::getVolumeType const point& sample ) const { - return volumeType::UNKNOWN; + return volumeType::unknown; } diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C index ddd11d726c..375a3a428a 100644 --- a/src/meshTools/indexedOctree/treeDataFace.C +++ b/src/meshTools/indexedOctree/treeDataFace.C @@ -428,7 +428,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType // - tolerances are wrong. (if e.g. face has zero area) // - or (more likely) surface is not closed. - return volumeType::UNKNOWN; + return volumeType::unknown; } diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C index d2f6f2c80f..96592fa494 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.C +++ b/src/meshTools/indexedOctree/treeDataPoint.C @@ -94,7 +94,7 @@ Foam::volumeType Foam::treeDataPoint::getVolumeType const point& sample ) const { - return volumeType::UNKNOWN; + return volumeType::unknown; } diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C index 809b8ad9c9..0d92449be0 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C @@ -374,7 +374,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch::getVolumeType // - tolerances are wrong. (if e.g. face has zero area) // - or (more likely) surface is not closed. - return volumeType::UNKNOWN; + return volumeType::unknown; } diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.C b/src/meshTools/indexedOctree/treeDataTriSurface.C index 43881735c3..a94925a5f1 100644 --- a/src/meshTools/indexedOctree/treeDataTriSurface.C +++ b/src/meshTools/indexedOctree/treeDataTriSurface.C @@ -57,21 +57,21 @@ Foam::volumeType Foam::treeDataPrimitivePatch::getVolumeType if (t == triSurfaceTools::UNKNOWN) { - return volumeType::UNKNOWN; + return volumeType::unknown; } else if (t == triSurfaceTools::INSIDE) { - return volumeType::INSIDE; + return volumeType::inside; } else if (t == triSurfaceTools::OUTSIDE) { - return volumeType::OUTSIDE; + return volumeType::outside; } else { FatalErrorInFunction << "problem" << abort(FatalError); - return volumeType::UNKNOWN; + return volumeType::unknown; } } diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index 51024c628e..62e255e02b 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -847,7 +847,7 @@ Foam::List Foam::meshSearch::intersections bool Foam::meshSearch::isInside(const point& p) const { - return (boundaryTree().getVolumeType(p) == volumeType::INSIDE); + return (boundaryTree().getVolumeType(p) == volumeType::inside); } diff --git a/src/meshTools/searchableSurfaces/searchableBox/searchableBox.C b/src/meshTools/searchableSurfaces/searchableBox/searchableBox.C index 5ec7877945..eaae9803cf 100644 --- a/src/meshTools/searchableSurfaces/searchableBox/searchableBox.C +++ b/src/meshTools/searchableSurfaces/searchableBox/searchableBox.C @@ -602,7 +602,7 @@ void Foam::searchableBox::getVolumeType ) const { volType.setSize(points.size()); - volType = volumeType::INSIDE; + volType = volumeType::inside; forAll(points, pointi) { @@ -612,7 +612,7 @@ void Foam::searchableBox::getVolumeType { if (pt[dir] < min()[dir] || pt[dir] > max()[dir]) { - volType[pointi] = volumeType::OUTSIDE; + volType[pointi] = volumeType::outside; break; } } diff --git a/src/meshTools/searchableSurfaces/searchableCylinder/searchableCylinder.C b/src/meshTools/searchableSurfaces/searchableCylinder/searchableCylinder.C index 94ee6a6e8c..a79d87fa72 100644 --- a/src/meshTools/searchableSurfaces/searchableCylinder/searchableCylinder.C +++ b/src/meshTools/searchableSurfaces/searchableCylinder/searchableCylinder.C @@ -728,7 +728,7 @@ void Foam::searchableCylinder::getVolumeType ) const { volType.setSize(points.size()); - volType = volumeType::INSIDE; + volType = volumeType::inside; forAll(points, pointi) { @@ -742,12 +742,12 @@ void Foam::searchableCylinder::getVolumeType if (parallel < 0) { // left of point1 endcap - volType[pointi] = volumeType::OUTSIDE; + volType[pointi] = volumeType::outside; } else if (parallel > magDir_) { // right of point2 endcap - volType[pointi] = volumeType::OUTSIDE; + volType[pointi] = volumeType::outside; } else { @@ -756,11 +756,11 @@ void Foam::searchableCylinder::getVolumeType if (mag(v) > radius_) { - volType[pointi] = volumeType::OUTSIDE; + volType[pointi] = volumeType::outside; } else { - volType[pointi] = volumeType::INSIDE; + volType[pointi] = volumeType::inside; } } } diff --git a/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C b/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C index 501fb5c169..df44a127e0 100644 --- a/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C +++ b/src/meshTools/searchableSurfaces/searchableSphere/searchableSphere.C @@ -351,7 +351,7 @@ void Foam::searchableSphere::getVolumeType ) const { volType.setSize(points.size()); - volType = volumeType::INSIDE; + volType = volumeType::inside; forAll(points, pointi) { @@ -359,11 +359,11 @@ void Foam::searchableSphere::getVolumeType if (magSqr(pt - centre_) <= sqr(radius_)) { - volType[pointi] = volumeType::INSIDE; + volType[pointi] = volumeType::inside; } else { - volType[pointi] = volumeType::OUTSIDE; + volType[pointi] = volumeType::outside; } } } diff --git a/src/meshTools/searchableSurfaces/searchableSurfacesQueries/searchableSurfacesQueries.C b/src/meshTools/searchableSurfaces/searchableSurfacesQueries/searchableSurfacesQueries.C index 89aafb77e0..b98ca6203d 100644 --- a/src/meshTools/searchableSurfaces/searchableSurfacesQueries/searchableSurfacesQueries.C +++ b/src/meshTools/searchableSurfaces/searchableSurfacesQueries/searchableSurfacesQueries.C @@ -609,11 +609,11 @@ void Foam::searchableSurfacesQueries::signedDistance volumeType vT = volType[i]; - if (vT == volumeType::OUTSIDE) + if (vT == volumeType::outside) { distance[pointi] = dist; } - else if (vT == volumeType::INSIDE) + else if (vT == volumeType::inside) { distance[i] = -dist; } @@ -621,12 +621,12 @@ void Foam::searchableSurfacesQueries::signedDistance { switch (illegalHandling) { - case volumeType::OUTSIDE: + case volumeType::outside: { distance[pointi] = dist; break; } - case volumeType::INSIDE: + case volumeType::inside: { distance[pointi] = -dist; break; diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C index 9ebba317d6..730b6ce791 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C @@ -260,7 +260,7 @@ Foam::boolList Foam::triSurfaceSearch::calcInside { inside[sampleI] = false; } - else if (tree().getVolumeType(sample) == volumeType::INSIDE) + else if (tree().getVolumeType(sample) == volumeType::inside) { inside[sampleI] = true; } diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C index 7d82c6078d..b11bb8d8f1 100644 --- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C +++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C @@ -103,11 +103,11 @@ void Foam::distanceSurface::createGeometry() { volumeType vT = volType[i]; - if (vT == volumeType::OUTSIDE) + if (vT == volumeType::outside) { fld[i] = Foam::mag(cc[i] - nearest[i].hitPoint()); } - else if (vT == volumeType::INSIDE) + else if (vT == volumeType::inside) { fld[i] = -Foam::mag(cc[i] - nearest[i].hitPoint()); } @@ -156,11 +156,11 @@ void Foam::distanceSurface::createGeometry() { volumeType vT = volType[i]; - if (vT == volumeType::OUTSIDE) + if (vT == volumeType::outside) { fld[i] = Foam::mag(cc[i] - nearest[i].hitPoint()); } - else if (vT == volumeType::INSIDE) + else if (vT == volumeType::inside) { fld[i] = -Foam::mag(cc[i] - nearest[i].hitPoint()); } @@ -211,12 +211,12 @@ void Foam::distanceSurface::createGeometry() { volumeType vT = volType[i]; - if (vT == volumeType::OUTSIDE) + if (vT == volumeType::outside) { pointDistance_[i] = Foam::mag(pts[i] - nearest[i].hitPoint()); } - else if (vT == volumeType::INSIDE) + else if (vT == volumeType::inside) { pointDistance_[i] = -Foam::mag(pts[i] - nearest[i].hitPoint()); diff --git a/src/sixDoFRigidBodyState/sixDoFRigidBodyControl/sixDoFRigidBodyControl.C b/src/sixDoFRigidBodyState/sixDoFRigidBodyControl/sixDoFRigidBodyControl.C index b729ebc727..6fd18b6a4e 100644 --- a/src/sixDoFRigidBodyState/sixDoFRigidBodyControl/sixDoFRigidBodyControl.C +++ b/src/sixDoFRigidBodyState/sixDoFRigidBodyControl/sixDoFRigidBodyControl.C @@ -109,7 +109,7 @@ bool Foam::functionObjects::sixDoFRigidBodyControl::execute() && meanAngularVelocity_ < convergedAngularVelocity_ ) { - time_.stopAt(Time::saWriteNow); + time_.stopAt(Time::stopAtControl::writeNow); } return true;