diff --git a/applications/test/nearWallDist-wave/testWallDistData.C b/applications/test/nearWallDist-wave/testWallDistData.C index cb742f435f..0b94dfa216 100644 --- a/applications/test/nearWallDist-wave/testWallDistData.C +++ b/applications/test/nearWallDist-wave/testWallDistData.C @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedVector("n", dimLength, wallPoint::greatPoint) + dimensionedVector("n", dimLength, point::max) ); // Fill wall patches with unit normal diff --git a/applications/test/syncTools/syncToolsTest.C b/applications/test/syncTools/syncToolsTest.C index 320b4e6f61..fb225ac397 100644 --- a/applications/test/syncTools/syncToolsTest.C +++ b/applications/test/syncTools/syncToolsTest.C @@ -187,8 +187,6 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) ); const pointField& localPoints = allBoundary.localPoints(); - const point greatPoint(GREAT, GREAT, GREAT); - // Point data // ~~~~~~~~~~ @@ -196,7 +194,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { // Create some data. Use slightly perturbed positions. Map sparseData; - pointField fullData(mesh.nPoints(), greatPoint); + pointField fullData(mesh.nPoints(), point::max); forAll(localPoints, i) { @@ -222,7 +220,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) mesh, fullData, minEqOp(), - greatPoint, + point::max, true // apply separation ); @@ -232,7 +230,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { const point& fullPt = fullData[meshPointI]; - if (fullPt != greatPoint) + if (fullPt != point::max) { const point& sparsePt = sparseData[meshPointI]; @@ -272,7 +270,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { // Create some data. Use slightly perturbed positions. EdgeMap sparseData; - pointField fullData(mesh.nEdges(), greatPoint); + pointField fullData(mesh.nEdges(), point::max); const edgeList& edges = allBoundary.edges(); const labelList meshEdges = allBoundary.meshEdges @@ -307,7 +305,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) mesh, fullData, minEqOp(), - greatPoint, + point::max, true ); @@ -317,7 +315,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen) { const point& fullPt = fullData[meshEdgeI]; - if (fullPt != greatPoint) + if (fullPt != point::max) { const point& sparsePt = sparseData[mesh.edges()[meshEdgeI]]; @@ -364,8 +362,6 @@ void testPointSync(const polyMesh& mesh, Random& rndGen) { Info<< nl << "Testing point-wise data synchronisation." << endl; - const point greatPoint(GREAT, GREAT, GREAT); - // Test position. { @@ -379,7 +375,7 @@ void testPointSync(const polyMesh& mesh, Random& rndGen) mesh, syncedPoints, minEqOp(), - greatPoint, + point::max, true ); @@ -444,8 +440,6 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen) const edgeList& edges = mesh.edges(); - const point greatPoint(GREAT, GREAT, GREAT); - // Test position. { @@ -463,7 +457,7 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen) mesh, syncedMids, minEqOp(), - greatPoint, + point::max, true ); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C index d6e68ea880..1521784089 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C @@ -162,15 +162,13 @@ void Foam::domainDecomposition::distributeCells() // somewhere in the middle of the domain which might not be anywhere // near any of the cells. - const point greatPoint(GREAT, GREAT, GREAT); - - pointField regionCentres(globalRegion.nRegions(), greatPoint); + pointField regionCentres(globalRegion.nRegions(), point::max); forAll(globalRegion, cellI) { label regionI = globalRegion[cellI]; - if (regionCentres[regionI] == greatPoint) + if (regionCentres[regionI] == point::max) { regionCentres[regionI] = cellCentres()[cellI]; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index e1b94f504d..afc98d8426 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -34,7 +34,6 @@ License #include "polyAddFace.H" #include "polyModifyFace.H" #include "polyAddCell.H" -#include "wallPoint.H" #include "globalIndex.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -713,14 +712,14 @@ void Foam::addPatchCellLayer::setRefinement } { - pointField d(mesh_.nPoints(), wallPoint::greatPoint); + pointField d(mesh_.nPoints(), vector::max); UIndirectList(d, meshPoints) = firstLayerDisp; syncTools::syncPointList ( mesh_, d, minEqOp(), - wallPoint::greatPoint, + vector::max, false ); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index 3da4d9f514..c8aa31c398 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -49,14 +49,6 @@ namespace Foam } -const Foam::point Foam::polyTopoChange::greatPoint -( - GREAT, - GREAT, - GREAT -); - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Renumber with special handling for merged items (marked with <-1) @@ -2695,7 +2687,7 @@ void Foam::polyTopoChange::removePoint << abort(FatalError); } - points_[pointI] = greatPoint; + points_[pointI] = point::max; pointMap_[pointI] = -1; if (mergePointI >= 0) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H index a5ffe331d5..a446244d4d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H @@ -45,7 +45,7 @@ Description - no item can be removed more than once. - removed cell: cell set to 0 faces. - removed face: face set to 0 vertices. - - removed point: coordinate set to greatPoint (GREAT,GREAT,GREAT). + - removed point: coordinate set to vector::max (VGREAT,VGREAT,VGREAT). Note that this might give problems if this value is used already. To see if point is equal to above value we don't use == (which might give problems with roundoff error) but instead compare the individual component @@ -98,12 +98,6 @@ template class CompactListList; class polyTopoChange { - // Static data members - - //- Value of deleted point - static const point greatPoint; - - // Private data //- Whether to allow referencing illegal points/cells/faces diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H index 118733ce42..541f19152c 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H @@ -33,9 +33,9 @@ inline bool Foam::polyTopoChange::pointRemoved(const label pointI) const const point& pt = points_[pointI]; return - pt.x() > 0.5*greatPoint.x() - && pt.y() > 0.5*greatPoint.y() - && pt.z() > 0.5*greatPoint.z(); + pt.x() > 0.5*vector::max.x() + && pt.y() > 0.5*vector::max.y() + && pt.z() > 0.5*vector::max.z(); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C index 1227601854..78108a6523 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C @@ -33,7 +33,6 @@ License #include "polyAddPoint.H" #include "polyModifyFace.H" #include "syncTools.H" -#include "wallPoint.H" // only to use 'greatPoint' #include "faceSet.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -570,7 +569,7 @@ void Foam::removePoints::getUnrefimentSet { label savedPointI = -savedFace[fp]-1; - if (savedPoints_[savedPointI] == wallPoint::greatPoint) + if (savedPoints_[savedPointI] == vector::max) { FatalErrorIn ( @@ -745,7 +744,7 @@ void Foam::removePoints::setUnrefinement { label localI = localPoints[i]; - if (savedPoints_[localI] == wallPoint::greatPoint) + if (savedPoints_[localI] == vector::max) { FatalErrorIn ( @@ -767,7 +766,7 @@ void Foam::removePoints::setUnrefinement ); // Mark the restored points so they are not restored again. - savedPoints_[localI] = wallPoint::greatPoint; + savedPoints_[localI] = vector::max; } forAll(localFaces, i) diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C b/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C index b9df955be1..48cae70939 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C @@ -26,7 +26,6 @@ License #include "nearWallDistNoSearch.H" #include "fvMesh.H" -#include "wallPoint.H" #include "wallFvPatch.H" #include "surfaceFields.H" diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H index 02eba5afbe..ce23fa5601 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H @@ -38,7 +38,6 @@ SourceFiles #include "autoPtr.H" #include "dictionary.H" -#include "wallPoint.H" #include "searchableSurfaces.H" #include "refinementSurfaces.H" #include "shellSurfaces.H" @@ -95,9 +94,9 @@ class autoHexMeshDriver void operator()(vector& x, const vector& y) const { - if (y != wallPoint::greatPoint) + if (y != point::max) { - if (x == wallPoint::greatPoint) + if (x == point::max) { x = y; } diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index d416d11033..021568e461 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -991,7 +991,7 @@ void Foam::autoLayerDriver::handleFeatureAngle if (minCos < 1-SMALL) { // Normal component of normals of connected faces. - vectorField edgeNormal(mesh.nEdges(), wallPoint::greatPoint); + vectorField edgeNormal(mesh.nEdges(), point::max); const labelListList& edgeFaces = pp.edgeFaces(); @@ -1016,7 +1016,7 @@ void Foam::autoLayerDriver::handleFeatureAngle mesh, edgeNormal, nomalsCombine(), - wallPoint::greatPoint, // null value + point::max, // null value false // no separation ); @@ -1040,7 +1040,7 @@ void Foam::autoLayerDriver::handleFeatureAngle const vector& n = edgeNormal[meshEdgeI]; - if (n != wallPoint::greatPoint) + if (n != point::max) { scalar cos = n & pp.faceNormals()[eFaces[0]]; @@ -1640,7 +1640,7 @@ void Foam::autoLayerDriver::syncPatchDisplacement meshPoints, patchDisp, minEqOp(), - wallPoint::greatPoint, // null value + point::max, // null value false // no separation ); diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H index 748f26d85e..8f1e27334b 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H @@ -37,7 +37,6 @@ SourceFiles #define autoLayerDriver_H #include "meshRefinement.H" -#include "wallPoint.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,7 +49,6 @@ class pointSet; class motionSmoother; class addPatchCellLayer; class pointData; -class wallPoint; class faceSet; class layerParameters; @@ -81,9 +79,9 @@ class autoLayerDriver void operator()(vector& x, const vector& y) const { - if (y != wallPoint::greatPoint) + if (y != point::max) { - if (x == wallPoint::greatPoint) + if (x == point::max) { x = y; } diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H index 9366afbe4a..e17049bf2a 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H @@ -26,7 +26,6 @@ License #include "polyMesh.H" #include "transform.H" -#include "wallPoint.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -138,10 +137,10 @@ inline bool Foam::pointData::update // Null constructor inline Foam::pointData::pointData() : - origin_(wallPoint::greatPoint), + origin_(point::max), distSqr_(GREAT), s_(GREAT), - v_(wallPoint::greatPoint) + v_(point::max) {} @@ -199,7 +198,7 @@ inline const Foam::vector& Foam::pointData::v() const inline bool Foam::pointData::valid() const { - return origin_ != wallPoint::greatPoint; + return origin_ != point::max; } diff --git a/src/meshTools/PointEdgeWave/pointEdgePoint.C b/src/meshTools/PointEdgeWave/pointEdgePoint.C index ad0fc3869c..c06fbac765 100644 --- a/src/meshTools/PointEdgeWave/pointEdgePoint.C +++ b/src/meshTools/PointEdgeWave/pointEdgePoint.C @@ -26,10 +26,6 @@ License #include "pointEdgePoint.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -Foam::point Foam::pointEdgePoint::greatPoint(GREAT, GREAT, GREAT); - // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // Foam::Ostream& Foam::operator<< diff --git a/src/meshTools/PointEdgeWave/pointEdgePoint.H b/src/meshTools/PointEdgeWave/pointEdgePoint.H index 1e83edd1d9..50e58e55f3 100644 --- a/src/meshTools/PointEdgeWave/pointEdgePoint.H +++ b/src/meshTools/PointEdgeWave/pointEdgePoint.H @@ -92,12 +92,6 @@ class pointEdgePoint public: - // Static data members - - //- initial point far away. - static point greatPoint; - - // Constructors //- Construct null diff --git a/src/meshTools/PointEdgeWave/pointEdgePointI.H b/src/meshTools/PointEdgeWave/pointEdgePointI.H index 72842946e2..f4af10b8d4 100644 --- a/src/meshTools/PointEdgeWave/pointEdgePointI.H +++ b/src/meshTools/PointEdgeWave/pointEdgePointI.H @@ -117,7 +117,7 @@ inline bool Foam::pointEdgePoint::update // Null constructor inline Foam::pointEdgePoint::pointEdgePoint() : - origin_(greatPoint), + origin_(point::max), distSqr_(GREAT) {} @@ -158,7 +158,7 @@ inline Foam::scalar Foam::pointEdgePoint::distSqr() const inline bool Foam::pointEdgePoint::valid() const { - return origin_ != greatPoint; + return origin_ != point::max; } diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C index b22a110be6..00d22e1895 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.C +++ b/src/meshTools/cellDist/patchWave/patchDataWave.C @@ -106,7 +106,7 @@ Foam::label Foam::patchDataWave::getValues distance_[cellI] = dist; - //cellData_[cellI] = wallPoint::greatPoint; + //cellData_[cellI] = point::max; cellData_[cellI] = cellInfo[cellI].data(); nIllegal++; @@ -153,7 +153,7 @@ Foam::label Foam::patchDataWave::getValues patchField[patchFaceI] = dist; - //patchDataField[patchFaceI] = wallPoint::greatPoint; + //patchDataField[patchFaceI] = point::max; patchDataField[patchFaceI] = faceInfo[meshFaceI].data(); nIllegal++; diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.C b/src/meshTools/cellDist/wallPoint/wallPoint.C index 168a401f30..3b1d1ccc87 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.C +++ b/src/meshTools/cellDist/wallPoint/wallPoint.C @@ -26,11 +26,6 @@ License #include "wallPoint.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -Foam::point Foam::wallPoint::greatPoint(GREAT, GREAT, GREAT); - - // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::wallPoint& wDist) diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 82d6b385af..3d88795392 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -87,12 +87,6 @@ class wallPoint public: - // Static data members - - //- initial point far away. - static point greatPoint; - - // Constructors //- Construct null diff --git a/src/meshTools/cellDist/wallPoint/wallPointI.H b/src/meshTools/cellDist/wallPoint/wallPointI.H index abc400db1c..7d1c115679 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -84,7 +84,7 @@ inline bool Foam::wallPoint::update // Null constructor inline Foam::wallPoint::wallPoint() : - origin_(greatPoint), + origin_(point::max), distSqr_(GREAT) {} @@ -131,7 +131,7 @@ inline Foam::scalar& Foam::wallPoint::distSqr() inline bool Foam::wallPoint::valid() const { - return origin_ != greatPoint; + return origin_ != point::max; } diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index a3888f856e..8f1343f4fe 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -800,9 +800,7 @@ void Foam::isoSurface::calcSnappedPoint const pointField& pts = mesh_.points(); const pointField& cc = mesh_.cellCentres(); - - const point greatPoint(VGREAT, VGREAT, VGREAT); - pointField collapsedPoint(mesh_.nPoints(), greatPoint); + pointField collapsedPoint(mesh_.nPoints(), point::max); // Work arrays @@ -966,7 +964,7 @@ void Foam::isoSurface::calcSnappedPoint // Synchronise snap location - syncUnseparatedPoints(collapsedPoint, greatPoint); + syncUnseparatedPoints(collapsedPoint, point::max); snappedPoint.setSize(mesh_.nPoints()); @@ -974,7 +972,7 @@ void Foam::isoSurface::calcSnappedPoint forAll(collapsedPoint, pointI) { - if (collapsedPoint[pointI] != greatPoint) + if (collapsedPoint[pointI] != point::max) { snappedPoint[pointI] = snappedPoints.size(); snappedPoints.append(collapsedPoint[pointI]); diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C index d534603b0f..4a71ac2265 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C @@ -630,8 +630,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint labelList& snappedPoint ) const { - const point greatPoint(VGREAT, VGREAT, VGREAT); - pointField collapsedPoint(mesh_.nPoints(), greatPoint); + pointField collapsedPoint(mesh_.nPoints(), point::max); // Work arrays @@ -764,7 +763,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint mesh_, collapsedPoint, minEqOp(), - greatPoint, + point::max, true // are coordinates so separate ); @@ -773,7 +772,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint forAll(collapsedPoint, pointI) { - if (collapsedPoint[pointI] != greatPoint) + if (collapsedPoint[pointI] != point::max) { snappedPoint[pointI] = snappedPoints.size(); snappedPoints.append(collapsedPoint[pointI]);