primitiveMesh Class Referenceabstract

Cell-face mesh analysis engine. More...

Inheritance diagram for primitiveMesh:
[legend]

Public Member Functions

 ClassName ("primitiveMesh")
 
 primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Construct from components. More...
 
virtual ~primitiveMesh ()
 Destructor. More...
 
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
 Reset this primitiveMesh given the primitive array sizes. More...
 
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, cellList &cells)
 Reset this primitiveMesh given the primitive array sizes and cells. More...
 
void resetGeometry (pointField &&faceCentres, pointField &&faceAreas, pointField &&cellCentres, scalarField &&cellVolumes)
 Reset the local geometry. More...
 
virtual bool init (const bool doInit)
 Initialise all non-demand-driven data. More...
 
label nPoints () const noexcept
 Number of mesh points. More...
 
label nEdges () const
 Number of mesh edges. More...
 
label nFaces () const noexcept
 Number of mesh faces. More...
 
label nCells () const noexcept
 Number of mesh cells. More...
 
label nInternalFaces () const noexcept
 Number of internal faces. More...
 
label nBoundaryFaces () const noexcept
 Number of boundary faces (== nFaces - nInternalFaces) More...
 
label nInternalPoints () const noexcept
 Points not on boundary. More...
 
label nInternal0Edges () const
 
label nInternal1Edges () const
 Internal edges using 0 or 1 boundary point. More...
 
label nInternalEdges () const
 Internal edges using 0,1 or 2 boundary points. More...
 
virtual const pointFieldpoints () const =0
 Return mesh points. More...
 
virtual const faceListfaces () const =0
 Return faces. More...
 
virtual const labelListfaceOwner () const =0
 Face face-owner addressing. More...
 
virtual const labelListfaceNeighbour () const =0
 Face face-neighbour addressing. More...
 
virtual const pointFieldoldPoints () const =0
 Return old points for mesh motion. More...
 
const cellShapeListcellShapes () const
 Return cell shapes. More...
 
const edgeListedges () const
 Return mesh edges. Uses calcEdges. More...
 
const labelListListcellCells () const
 
const labelListListedgeCells () const
 
const labelListListpointCells () const
 
const cellListcells () const
 
const labelListListedgeFaces () const
 
const labelListListpointFaces () const
 
const labelListListcellEdges () const
 
const labelListListfaceEdges () const
 
const labelListListpointEdges () const
 
const labelListListpointPoints () const
 
const labelListListcellPoints () const
 
const vectorFieldcellCentres () const
 
const vectorFieldfaceCentres () const
 
const scalarFieldcellVolumes () const
 
const vectorFieldfaceAreas () const
 
tmp< scalarFieldmovePoints (const pointField &p, const pointField &oldP)
 Move points, returns volumes swept by faces in motion. More...
 
bool isInternalFace (const label faceIndex) const noexcept
 Return true if given face label is internal to the mesh. More...
 
virtual bool checkUpperTriangular (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check face ordering. More...
 
virtual bool checkCellsZipUp (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check cell zip-up. More...
 
virtual bool checkFaceVertices (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check uniqueness of face vertices. More...
 
virtual bool checkPoints (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check for unused points. More...
 
virtual bool checkFaceFaces (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check face-face connectivity. More...
 
virtual bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness. More...
 
virtual bool checkClosedCells (const bool report=false, labelHashSet *setPtr=nullptr, labelHashSet *highAspectSetPtr=nullptr, const Vector< label > &solutionD=Vector< label >::one) const
 Check cells for closedness. More...
 
virtual bool checkFaceAreas (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check for negative face areas. More...
 
virtual bool checkCellVolumes (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check for negative cell volumes. More...
 
virtual bool checkFaceOrthogonality (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check for non-orthogonality. More...
 
virtual bool checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=nullptr) const
 Check face pyramid volume. More...
 
virtual bool checkFaceSkewness (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check face skewness. More...
 
virtual bool checkFaceAngles (const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=nullptr) const
 Check face angles. More...
 
virtual bool checkFaceFlatness (const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage: decompose face and check ratio between. More...
 
virtual bool checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=nullptr) const
 Check for point-point-nearness,. More...
 
virtual bool checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=nullptr) const
 Check edge length. More...
 
virtual bool checkConcaveCells (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check for concave cells by the planes of faces. More...
 
virtual bool checkTopology (const bool report=false) const
 Check mesh topology for correctness. More...
 
virtual bool checkGeometry (const bool report=false) const
 Check mesh geometry (& implicitly topology) for correctness. More...
 
virtual bool checkMesh (const bool report=false) const
 Check mesh for correctness. Returns false for no error. More...
 
bool pointInCellBB (const point &p, label celli, scalar inflationFraction=0) const
 Return true if the point in the cell bounding box. More...
 
bool pointInCell (const point &p, label celli) const
 Return true if the point is in the cell. More...
 
label findNearestCell (const point &location) const
 Find the cell with the nearest cell centre to location. More...
 
label findCell (const point &location) const
 Find cell enclosing this location (-1 if not in mesh) More...
 
void printAllocated () const
 Print a list of all the currently allocated mesh data. More...
 
bool hasCellShapes () const noexcept
 
bool hasEdges () const noexcept
 
bool hasCellCells () const noexcept
 
bool hasEdgeCells () const noexcept
 
bool hasPointCells () const noexcept
 
bool hasCells () const noexcept
 
bool hasEdgeFaces () const noexcept
 
bool hasPointFaces () const noexcept
 
bool hasCellEdges () const noexcept
 
bool hasFaceEdges () const noexcept
 
bool hasPointEdges () const noexcept
 
bool hasPointPoints () const noexcept
 
bool hasCellPoints () const noexcept
 
bool hasCellCentres () const noexcept
 
bool hasFaceCentres () const noexcept
 
bool hasCellVolumes () const noexcept
 
bool hasFaceAreas () const noexcept
 
const labelListcellCells (const label celli, DynamicList< label > &) const
 cellCells using cells. More...
 
const labelListcellCells (const label celli) const
 
const labelListcellPoints (const label celli, labelHashSet &, DynamicList< label > &) const
 cellPoints using cells More...
 
const labelListcellPoints (const label celli) const
 
const labelListpointCells (const label pointi, DynamicList< label > &) const
 pointCells using pointFaces More...
 
const labelListpointCells (const label pointi) const
 
const labelListpointPoints (const label pointi, DynamicList< label > &) const
 pointPoints using edges, pointEdges More...
 
const labelListpointPoints (const label pointi) const
 
const labelListfaceEdges (const label facei, DynamicList< label > &) const
 faceEdges using pointFaces, edges, pointEdges More...
 
const labelListfaceEdges (const label facei) const
 
const labelListedgeFaces (const label edgeI, DynamicList< label > &) const
 edgeFaces using pointFaces, edges, pointEdges More...
 
const labelListedgeFaces (const label edgeI) const
 
const labelListedgeCells (const label edgeI, DynamicList< label > &) const
 edgeCells using pointFaces, edges, pointEdges More...
 
const labelListedgeCells (const label edgeI) const
 
const labelListcellEdges (const label celli, labelHashSet &, DynamicList< label > &) const
 cellEdges using cells, pointFaces, edges, pointEdges More...
 
const labelListcellEdges (const label celli) const
 
virtual void updateGeom ()
 Update all geometric data. More...
 
void clearGeom ()
 Clear geometry. More...
 
void clearCellGeom ()
 Clear cell-based geometry only. More...
 
void clearAddressing ()
 Clear topological data. More...
 
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD. More...
 

Static Public Member Functions

static void calcCells (cellList &, const labelUList &own, const labelUList &nei, const label nCells=-1)
 Helper function to calculate cell-face addressing from. More...
 
static bool calcPointOrder (label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
 Helper function to calculate point ordering. Returns true. More...
 
static scalar setClosedThreshold (const scalar)
 Set the closedness ratio warning threshold. More...
 
static scalar setAspectThreshold (const scalar)
 Set the aspect ratio warning threshold. More...
 
static scalar setNonOrthThreshold (const scalar)
 Set the non-orthogonality warning threshold in degrees. More...
 
static scalar setSkewThreshold (const scalar)
 Set the skewness warning threshold as percentage. More...
 

Static Public Attributes

static const unsigned cellsPerEdge_ = 4
 Estimated number of cells per edge. More...
 
static const unsigned cellsPerPoint_ = 8
 Estimated number of cells per point. More...
 
static const unsigned facesPerCell_ = 6
 Estimated number of faces per cell. More...
 
static const unsigned facesPerEdge_ = 4
 Estimated number of faces per edge. More...
 
static const unsigned facesPerPoint_ = 12
 Estimated number of faces per point. More...
 
static const unsigned edgesPerCell_ = 12
 Estimated number of edges per cell. More...
 
static const unsigned edgesPerFace_ = 4
 Estimated number of edges per cell. More...
 
static const unsigned edgesPerPoint_ = 6
 Estimated number of edges per point. More...
 
static const unsigned pointsPerCell_ = 8
 Estimated number of points per cell. More...
 
static const unsigned pointsPerFace_ = 4
 Estimated number of points per face. More...
 

Protected Member Functions

void calcFaceCentresAndAreas () const
 Calculate face centres and areas. More...
 
void calcCellCentresAndVols () const
 Calculate cell centres and volumes. More...
 
void calcEdgeVectors () const
 Calculate edge vectors. More...
 
bool checkDuplicateFaces (const label, const Map< label > &, label &nBaffleFaces, labelHashSet *) const
 Check if all points on face are shared with another face. More...
 
bool checkCommonOrder (const label, const Map< label > &, labelHashSet *) const
 Check that shared points are in consecutive order. More...
 
bool checkClosedBoundary (const vectorField &areas, const bool report, const bitSet &internalOrCoupledFaces) const
 Check boundary for closedness. More...
 
bool checkClosedCells (const vectorField &faceAreas, const scalarField &cellVolumes, const bool report, labelHashSet *setPtr, labelHashSet *aspectSetPtr, const Vector< label > &meshD) const
 Check cells for closedness. More...
 
bool checkFaceAreas (const vectorField &faceAreas, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check for negative face areas. More...
 
bool checkCellVolumes (const scalarField &vols, const bool report, const bool detailedReport, labelHashSet *setPtr) const
 Check for negative cell volumes. More...
 
bool checkFaceOrthogonality (const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
 Check for non-orthogonality. More...
 
bool checkFacePyramids (const pointField &points, const vectorField &ctrs, const bool report, const bool detailedReport, const scalar minPyrVol, labelHashSet *setPtr) const
 Check face pyramid volume. More...
 
bool checkFaceSkewness (const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
 Check face skewness. More...
 
bool checkFaceAngles (const pointField &points, const vectorField &faceAreas, const bool report, const scalar maxDeg, labelHashSet *setPtr) const
 Check face angles. More...
 
bool checkFaceFlatness (const pointField &points, const vectorField &faceCentres, const vectorField &faceAreas, const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage. More...
 
bool checkConcaveCells (const vectorField &fAreas, const pointField &fCentres, const bool report, labelHashSet *setPtr) const
 Check for concave cells by the planes of faces. More...
 
 primitiveMesh ()
 Construct null. More...
 

Static Protected Attributes

static scalar closedThreshold_ = 1.0e-6
 Static data to control mesh checking. More...
 
static scalar aspectThreshold_ = 1000
 Aspect ratio warning threshold. More...
 
static scalar nonOrthThreshold_ = 70
 Non-orthogonality warning threshold in deg. More...
 
static scalar skewThreshold_ = 4
 Skewness warning threshold. More...
 
static scalar planarCosAngle_ = 1.0e-6
 Threshold where faces are considered coplanar. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ primitiveMesh() [1/2]

primitiveMesh ( )
protected

Construct null.

Definition at line 40 of file primitiveMesh.C.

◆ primitiveMesh() [2/2]

primitiveMesh ( const label  nPoints,
const label  nInternalFaces,
const label  nFaces,
const label  nCells 
)

Construct from components.

Definition at line 78 of file primitiveMesh.C.

◆ ~primitiveMesh()

~primitiveMesh ( )
virtual

Destructor.

Definition at line 119 of file primitiveMesh.C.

Member Function Documentation

◆ calcFaceCentresAndAreas()

void calcFaceCentresAndAreas ( ) const
protected

Calculate face centres and areas.

Definition at line 40 of file primitiveMeshFaceCentresAndAreas.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, primitiveMeshTools::makeFaceCentresAndAreas(), primitiveMesh::nFaces(), primitiveMesh::points(), and Foam::Pout.

Here is the call graph for this function:

◆ calcCellCentresAndVols()

void calcCellCentresAndVols ( ) const
protected

Calculate cell centres and volumes.

Definition at line 37 of file primitiveMeshCellCentresAndVols.C.

References Foam::abort(), cellVols, Foam::expressions::patchExpr::debug, Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), Foam::FatalError, FatalErrorInFunction, primitiveMeshTools::makeCellCentresAndVols(), primitiveMesh::nCells(), and Foam::Pout.

Here is the call graph for this function:

◆ calcEdgeVectors()

void calcEdgeVectors ( ) const
protected

Calculate edge vectors.

◆ checkDuplicateFaces()

bool checkDuplicateFaces ( const label  facei,
const Map< label > &  nCommonPoints,
label &  nBaffleFaces,
labelHashSet setPtr 
) const
protected

Check if all points on face are shared with another face.

Definition at line 1302 of file primitiveMeshCheck.C.

References forAllConstIters(), and HashSet< Key, Hash >::insert().

Here is the call graph for this function:

◆ checkCommonOrder()

bool checkCommonOrder ( const label  facei,
const Map< label > &  nCommonPoints,
labelHashSet setPtr 
) const
protected

Check that shared points are in consecutive order.

Definition at line 1343 of file primitiveMeshCheck.C.

References forAll, forAllConstIters(), HashSet< Key, Hash >::insert(), and Foam::labelMax.

Here is the call graph for this function:

◆ checkClosedBoundary() [1/2]

bool checkClosedBoundary ( const vectorField areas,
const bool  report,
const bitSet internalOrCoupledFaces 
) const
protected

Check boundary for closedness.

Definition at line 49 of file primitiveMeshCheck.C.

References Foam::cmptMag(), Foam::cmptMax(), Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), Foam::Info, Foam::mag(), reduce(), PackedList< Width >::size(), and Foam::Zero.

Referenced by primitiveMesh::checkClosedBoundary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkClosedCells() [1/2]

bool checkClosedCells ( const vectorField faceAreas,
const scalarField cellVolumes,
const bool  report,
labelHashSet setPtr,
labelHashSet aspectSetPtr,
const Vector< label > &  meshD 
) const
protected

Check cells for closedness.

Definition at line 100 of file primitiveMeshCheck.C.

References Foam::constant::universal::c, cells, Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), Foam::nl, and reduce().

Here is the call graph for this function:

◆ checkFaceAreas() [1/2]

bool checkFaceAreas ( const vectorField faceAreas,
const bool  report,
const bool  detailedReport,
labelHashSet setPtr 
) const
protected

Check for negative face areas.

Definition at line 228 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), Foam::min(), Foam::Pout, and reduce().

Here is the call graph for this function:

◆ checkCellVolumes() [1/2]

bool checkCellVolumes ( const scalarField vols,
const bool  report,
const bool  detailedReport,
labelHashSet setPtr 
) const
protected

Check for negative cell volumes.

Definition at line 301 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::gSum(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), Foam::Pout, and reduce().

Here is the call graph for this function:

◆ checkFaceOrthogonality() [1/2]

bool checkFaceOrthogonality ( const vectorField fAreas,
const vectorField cellCtrs,
const bool  report,
labelHashSet setPtr 
) const
protected

Check for non-orthogonality.

Definition at line 366 of file primitiveMeshCheck.C.

References Foam::acos(), Foam::cos(), Foam::expressions::patchExpr::debug, DebugInFunction, Foam::degToRad(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::min(), Foam::radToDeg(), reduce(), and Foam::sum().

Here is the call graph for this function:

◆ checkFacePyramids() [1/2]

bool checkFacePyramids ( const pointField points,
const vectorField ctrs,
const bool  report,
const bool  detailedReport,
const scalar  minPyrVol,
labelHashSet setPtr 
) const
protected

Check face pyramid volume.

Definition at line 470 of file primitiveMeshCheck.C.

References cells, Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::nl, points, Foam::Pout, and reduce().

Here is the call graph for this function:

◆ checkFaceSkewness() [1/2]

bool checkFaceSkewness ( const pointField points,
const vectorField fCtrs,
const vectorField fAreas,
const vectorField cellCtrs,
const bool  report,
labelHashSet setPtr 
) const
protected

Check face skewness.

Definition at line 567 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), points, and reduce().

Here is the call graph for this function:

◆ checkFaceAngles() [1/2]

bool checkFaceAngles ( const pointField points,
const vectorField faceAreas,
const bool  report,
const scalar  maxDeg,
labelHashSet setPtr 
) const
protected

Check face angles.

Allows a slight non-convexity. E.g. maxDeg = 10 allows for angles < 190 (or 10 degrees concavity) (if truly concave and points not visible from face centre the face-pyramid check in checkMesh will fail)

Definition at line 635 of file primitiveMeshCheck.C.

References Foam::asin(), Foam::expressions::patchExpr::debug, DebugInFunction, Foam::degToRad(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), points, Foam::radToDeg(), reduce(), and Foam::sin().

Here is the call graph for this function:

◆ checkFaceFlatness() [1/2]

bool checkFaceFlatness ( const pointField points,
const vectorField faceCentres,
const vectorField faceAreas,
const bool  report,
const scalar  warnFlatness,
labelHashSet setPtr 
) const
protected

Check face warpage.

Definition at line 710 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::min(), points, and reduce().

Here is the call graph for this function:

◆ checkConcaveCells() [1/2]

bool checkConcaveCells ( const vectorField fAreas,
const pointField fCentres,
const bool  report,
labelHashSet setPtr 
) const
protected

Check for concave cells by the planes of faces.

Definition at line 810 of file primitiveMeshCheck.C.

References Foam::constant::universal::c, cells, Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), and reduce().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "primitiveMesh"  )

◆ reset() [1/2]

void reset ( const label  nPoints,
const label  nInternalFaces,
const label  nFaces,
const label  nCells 
)

Reset this primitiveMesh given the primitive array sizes.

Definition at line 207 of file primitiveMesh.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), nPoints, and Foam::Pout.

Referenced by VoidFraction< CloudType >::preEvolve(), and adjointBoundaryCondition< Type >::setBoundaryContributionPtr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset() [2/2]

void reset ( const label  nPoints,
const label  nInternalFaces,
const label  nFaces,
const label  nCells,
cellList cells 
)

Reset this primitiveMesh given the primitive array sizes and cells.

Definition at line 263 of file primitiveMesh.C.

References nPoints, and reset().

Here is the call graph for this function:

◆ resetGeometry()

void resetGeometry ( pointField &&  faceCentres,
pointField &&  faceAreas,
pointField &&  cellCentres,
scalarField &&  cellVolumes 
)

Reset the local geometry.

Definition at line 284 of file primitiveMesh.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::Pout.

Referenced by stabilisedFvGeometryScheme::movePoints(), highAspectRatioFvGeometryScheme::movePoints(), and averageNeighbourFvGeometryScheme::movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

virtual bool init ( const bool  doInit)
inlinevirtual

Initialise all non-demand-driven data.

Reimplemented in polyMesh, dynamicOversetFvMesh, interfaceTrackingFvMesh, fvMesh, dynamicRefineFvMesh, dynamicFvMesh, movingConeTopoFvMesh, dynamicMotionSolverFvMeshAMI, dynamicMultiMotionSolverFvMesh, dynamicMotionSolverFvMesh, dynamicMotionSolverTopoFvMesh, and dynamicMotionSolverListFvMesh.

Definition at line 475 of file primitiveMesh.H.

Referenced by polyMesh::init().

Here is the caller graph for this function:

◆ nPoints()

Foam::label nPoints ( ) const
inlinenoexcept

Number of mesh points.

Definition at line 37 of file primitiveMeshI.H.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), sensitivitySurface::addGeometricSens(), snappyLayerDriver::addLayers(), polyTopoChange::addMesh(), sensitivitySurfacePoints::assembleSensitivities(), motionSmootherAlgo::avg(), polyTopoChange::changeMesh(), pointZone::checkParallelSync(), componentDisplacementMotionSolver::componentDisplacementMotionSolver(), distanceSurface::createGeometry(), displacementInterpolationMotionSolver::curPoints(), edgeVertex::edgeToEVert(), polyMeshFilter::filterEdges(), edgeVertex::getEdge(), Foam::getMeshPointRef(), globalIndexAndTransform::globalIndexAndTransform(), hexRef8::hexRef8(), hexRef8Data::hexRef8Data(), dynamicMultiMotionSolverFvMesh::init(), edgeVertex::isEdge(), localPointRegion::localPointRegion(), polyTopoChange::makeMesh(), pointBitSet::maxSize(), pointSet::maxSize(), pointZoneSet::maxSize(), primitiveMesh::pointFaces(), points0MotionSolver::points0MotionSolver(), pointSet::pointSet(), parseDriver::pointSize(), pointZoneSet::pointZoneSet(), polyMesh::polyMesh(), fvMeshDistribute::printMeshInfo(), isoAlpha::reconstruct(), processorMeshes::reconstructPoints(), motionSmootherAlgo::setDisplacement(), Foam::simpleGeometricFilter(), pointMesh::size(), sixDoFRigidBodyMotionSolver::solve(), rigidBodyMeshMotionSolver::solve(), hexRef8Data::sync(), pointSet::sync(), syncTools::syncPointList(), weightedPosition::syncPoints(), meshRefinement::testSyncPointList(), trackingInverseDistance::update(), inverseDistance::update(), and edgeVertex::vertToEVert().

Here is the caller graph for this function:

◆ nEdges()

Foam::label nEdges ( ) const
inline

Number of mesh edges.

Definition at line 67 of file primitiveMeshI.H.

Referenced by primitiveMesh::edgeCells(), primitiveMesh::edgeFaces(), edgeVertex::edgeToEVert(), directionInfo::edgeToFaceIndex(), syncTools::getMasterEdges(), addPatchCellLayer::globalEdgeFaces(), edgeVertex::isEdge(), syncTools::syncEdgeList(), and faBoundaryMesh::whichPatch().

Here is the caller graph for this function:

◆ nFaces()

Foam::label nFaces ( ) const
inlinenoexcept

Number of mesh faces.

Definition at line 90 of file primitiveMeshI.H.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), snappyLayerDriver::addLayers(), meshRefinement::addPatch(), curvatureSeparation::calcCosAngle(), primitiveMesh::calcFaceCentresAndAreas(), waveMethod::calculate(), polyTopoChange::changeMesh(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkVolRatio(), curvatureSeparation::correct(), structuredDecomp::decompose(), decompositionMethod::decompose(), snappyLayerDriver::doLayers(), snappySnapDriver::doSnap(), faceMapper::faceMapper(), faceSet::faceSet(), faceZoneSet::faceZoneSet(), fvFieldReconstructor::fvFieldReconstructor(), syncTools::getInternalOrCoupledFaces(), syncTools::getInternalOrMasterFaces(), syncTools::getMasterFaces(), polyTopoChange::makeMesh(), volSurfaceMapping::mapInternalToSurface(), mappedPatchFieldBase< scalar >::mappedField(), volSurfaceMapping::mapToField(), volSurfaceMapping::mapToSurface(), volSurfaceMapping::mapToVolume(), faceBoolSet::maxSize(), faceBitSet::maxSize(), faceSet::maxSize(), faceZoneSet::maxSize(), snappyLayerDriver::mergePatchFacesUndo(), stabilisedFvGeometryScheme::movePoints(), snappySnapDriver::preSmoothPatch(), fvMeshDistribute::printMeshInfo(), regionSplit::regionSplit(), snappySnapDriver::repatchToSurface(), snappySnapDriver::scaleMesh(), decompositionMethod::setConstraints(), meshRefinement::subsetBaffles(), faceSet::sync(), faceZoneSet::sync(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), wallBoundedStreamLine::track(), mappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), mappedFixedInternalValueFvPatchField< Type >::updateCoeffs(), Sampled< Type >::value(), and polyBoundaryMesh::whichPatch().

◆ nCells()

Foam::label nCells ( ) const
inlinenoexcept

Number of mesh cells.

Definition at line 96 of file primitiveMeshI.H.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), snappyLayerDriver::addLayers(), polyTopoChange::addMesh(), nearWallFields::calcAddressing(), primitiveMesh::calcCellCentresAndVols(), waveMethod::calculate(), cellCuts::cellCuts(), cellMapper::cellMapper(), primitiveMesh::cellPoints(), cellSet::cellSet(), cellZoneSet::cellZoneSet(), polyTopoChange::changeMesh(), ensightCells::classify(), drippingInjection::correct(), structuredDecomp::decompose(), randomDecomp::decompose(), decompositionMethod::decompose(), refinementHistory::distribute(), snappyLayerDriver::doLayers(), snappyRefineDriver::doRefine(), meshRefinement::findRegions(), fvFieldReconstructor::fvFieldReconstructor(), cellCellStencil::globalCellCells(), hexRef8::hexRef8(), hexRef8Data::hexRef8Data(), dynamicOversetFvMesh::interpolate(), isoSurfaceTopo::isoSurfaceTopo(), polyTopoChange::makeMesh(), mappedPatchFieldBase< scalar >::mappedField(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), trackingInverseDistance::markDonors(), inverseDistance::markDonors(), meshToMeshMethod::maskCells(), cellBitSet::maxSize(), cellZoneSet::maxSize(), cellSet::maxSize(), stabilisedFvGeometryScheme::movePoints(), cellTable::operator=(), cuttingPlane::performCut(), polyMesh::polyMesh(), fvMeshDistribute::printMeshInfo(), isoAlpha::reconstruct(), refinementHistory::refinementHistory(), CuthillMcKeeRenumber::renumber(), zoltanRenumber::renumber(), SloanRenumber::renumber(), springRenumber::renumber(), Foam::simpleGeometricFilter(), parseDriver::size(), reconstructionSchemes::surface(), syncTools::swapBoundaryCellList(), hexRef8Data::sync(), cellVolumeWeight::update(), dynamicOversetFvMesh::updateAddressing(), Sampled< Type >::value(), meshToMeshMethod::writeConnectivity(), and cellCellStencil::zoneID().

◆ nInternalFaces()

Foam::label nInternalFaces ( ) const
inlinenoexcept

Number of internal faces.

Definition at line 78 of file primitiveMeshI.H.

Referenced by polyMeshAdder::add(), snappyLayerDriver::addLayers(), polyTopoChange::addMesh(), decompositionMethod::calcCellCells(), polyDualMesh::calcFeatures(), deltaBoundary::cellCenters_d(), meshRefinement::checkCoupledFaceZones(), polyBoundaryMesh::checkDefinition(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), faceZone::checkParallelSync(), polyMeshGeometry::checkVolRatio(), inverseFaceDistanceDiffusivity::correct(), inversePointDistanceDiffusivity::correct(), decompositionMethod::decompose(), snappyLayerDriver::doLayers(), faceCoupleInfo::faceCoupleInfo(), FacePostProcessing< CloudType >::FacePostProcessing(), localPointRegion::findDuplicateFacePairs(), localPointRegion::findDuplicateFaces(), volPointInterpolation::flatBoundaryField(), boundaryMesh::getNearest(), cellCellStencil::globalCellCells(), cellToCellStencil::insertFaceCells(), cellToFaceStencil::insertFaceCells(), isoSurfaceTopo::isoSurfaceTopo(), fvMeshAdder::MapSurfaceField(), fvMeshTools::newMesh(), polyMeshAdder::patchFacePairs(), boundaryMesh::patchify(), fvMeshDistribute::printCoupleInfo(), fvMeshDistribute::printMeshInfo(), RemoveParcels< CloudType >::RemoveParcels(), fvMeshSubset::setCellSubset(), fvSurfaceMapper::size(), faceZoneSet::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), cellToCellStencil::validBoundaryFaces(), cellToFaceStencil::validBoundaryFaces(), and polyBoundaryMesh::whichPatch().

Here is the caller graph for this function:

◆ nBoundaryFaces()

◆ nInternalPoints()

Foam::label nInternalPoints ( ) const
inlinenoexcept

Points not on boundary.

Definition at line 31 of file primitiveMeshI.H.

◆ nInternal0Edges()

Foam::label nInternal0Edges ( ) const
inline

Internal edges (i.e. not on boundary face) using no boundary point

Definition at line 43 of file primitiveMeshI.H.

◆ nInternal1Edges()

Foam::label nInternal1Edges ( ) const
inline

Internal edges using 0 or 1 boundary point.

Definition at line 51 of file primitiveMeshI.H.

◆ nInternalEdges()

Foam::label nInternalEdges ( ) const
inline

Internal edges using 0,1 or 2 boundary points.

Definition at line 59 of file primitiveMeshI.H.

Referenced by faBoundaryMesh::checkDefinition().

Here is the caller graph for this function:

◆ points()

virtual const pointField& points ( ) const
pure virtual

Return mesh points.

Implemented in polyMesh.

Referenced by primitiveMesh::calcFaceCentresAndAreas(), boundaryMesh::getNearest(), treeDataFace::findNearestOp::operator()(), and treeDataFace::findIntersectOp::operator()().

Here is the caller graph for this function:

◆ faces()

virtual const faceList& faces ( ) const
pure virtual

Return faces.

Implemented in polyMesh.

Referenced by boundaryMesh::getNearest(), treeDataFace::findNearestOp::operator()(), treeDataFace::findIntersectOp::operator()(), and primitiveMesh::pointFaces().

Here is the caller graph for this function:

◆ faceOwner()

virtual const labelList& faceOwner ( ) const
pure virtual

Face face-owner addressing.

Implemented in polyMesh.

Referenced by primitiveMesh::pointInCell().

Here is the caller graph for this function:

◆ faceNeighbour()

virtual const labelList& faceNeighbour ( ) const
pure virtual

Face face-neighbour addressing.

Implemented in polyMesh.

◆ oldPoints()

virtual const pointField& oldPoints ( ) const
pure virtual

Return old points for mesh motion.

Implemented in polyMesh.

◆ cellShapes()

const Foam::cellShapeList & cellShapes ( ) const

Return cell shapes.

Definition at line 353 of file primitiveMesh.C.

◆ edges()

◆ calcCells()

void calcCells ( cellList cellFaceAddr,
const labelUList own,
const labelUList nei,
const label  nCells = -1 
)
static

Helper function to calculate cell-face addressing from.

face-cell addressing. If nCells is not provided it will scan for the maximum.

Definition at line 33 of file primitiveMeshCells.C.

References forAll, Foam::max(), List< T >::setSize(), and Foam::Zero.

Here is the call graph for this function:

◆ calcPointOrder()

bool calcPointOrder ( label &  nInternalPoints,
labelList pointMap,
const faceList faces,
const label  nInternalFaces,
const label  nPoints 
)
static

Helper function to calculate point ordering. Returns true.

if points already ordered, false and fills pointMap (old to new). Map splits points into those not used by any boundary face and those that are.

Definition at line 128 of file primitiveMesh.C.

References f(), forAll, nPoints, and List< T >::setSize().

Here is the call graph for this function:

◆ cellCells() [1/3]

const Foam::labelListList & cellCells ( ) const

Definition at line 102 of file primitiveMeshCellCells.C.

Referenced by meshToMeshMethod::appendNbrCells().

Here is the caller graph for this function:

◆ edgeCells() [1/3]

const Foam::labelListList & edgeCells ( ) const

Definition at line 34 of file primitiveMeshEdgeCells.C.

References Foam::abort(), primitiveMesh::cellEdges(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::invertManyToMany(), primitiveMesh::nEdges(), and Foam::Pout.

Here is the call graph for this function:

◆ pointCells() [1/3]

const Foam::labelListList & pointCells ( ) const

Definition at line 110 of file primitiveMeshPointCells.C.

Referenced by deltaBoundary::cellCenters_d(), primitiveMesh::cellPoints(), cellDistFuncs::correctBoundaryPointCells(), and volPointInterpolation::interpolateDimensionedInternalField().

Here is the caller graph for this function:

◆ cells()

◆ edgeFaces() [1/3]

const Foam::labelListList & edgeFaces ( ) const

Definition at line 34 of file primitiveMeshEdgeFaces.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), primitiveMesh::faceEdges(), Foam::FatalError, FatalErrorInFunction, Foam::invertManyToMany(), primitiveMesh::nEdges(), and Foam::Pout.

Referenced by addPatchCellLayer::calcExtrudeInfo(), boundaryMesh::setFeatureEdges(), meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointFaces()

const Foam::labelListList & pointFaces ( ) const

Definition at line 34 of file primitiveMeshPointFaces.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), primitiveMesh::faces(), Foam::invertManyToMany(), primitiveMesh::nPoints(), and Foam::Pout.

Referenced by deltaBoundary::cellCenters_d(), decompositionMethod::decompose(), and perfectInterface::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cellEdges() [1/3]

const Foam::labelListList & cellEdges ( ) const

Definition at line 115 of file primitiveMeshCellEdges.C.

Referenced by polyDualMesh::calcFeatures(), geomCellLooper::cut(), primitiveMesh::edgeCells(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ faceEdges() [1/3]

const Foam::labelListList & faceEdges ( ) const

Definition at line 528 of file primitiveMeshEdges.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), f(), forAll, Foam::Pout, and List< T >::setSize().

Referenced by primitiveMesh::edgeFaces(), faMatrix< Type >::setValuesFromList(), and directionInfo::updateCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointEdges()

const Foam::labelListList & pointEdges ( ) const

Definition at line 516 of file primitiveMeshEdges.C.

Referenced by snappyLayerDriver::addLayers(), addPatchCellLayer::calcExtrudeInfo(), searchableExtrudedCircle::findParametricNearest(), and addPatchCellLayer::globalEdgeFaces().

Here is the caller graph for this function:

◆ pointPoints() [1/3]

const Foam::labelListList & pointPoints ( ) const

Definition at line 93 of file primitiveMeshPointPoints.C.

◆ cellPoints() [1/3]

const Foam::labelListList & cellPoints ( ) const

Definition at line 34 of file primitiveMeshCellPoints.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::invertManyToMany(), primitiveMesh::nCells(), primitiveMesh::pointCells(), and Foam::Pout.

Referenced by tetOverlapVolume::overlappingCells(), meshCutAndRemove::setRefinement(), and Foam::simpleGeometricFilter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cellCentres()

const Foam::vectorField & cellCentres ( ) const

Definition at line 84 of file primitiveMeshCellCentresAndVols.C.

References primitiveMesh::updateGeom().

Referenced by polyMeshAdder::add(), polyTopoChange::addMesh(), snappySnapDriver::avgCellCentres(), DarcyForchheimer::calcTransformModelData(), waveMethod::calculate(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), structuredDecomp::decompose(), decompositionMethod::decompose(), mappedPatchBase::facePoint(), mappedPatchBase::findLocalSamples(), mapNearestMethod::findNearestCell(), Foam::getMeshPointRef(), cellCellStencil::globalCellCells(), volPointInterpolation::interpolateDimensionedInternalField(), isoSurfacePoint::isoSurfacePoint(), trackingInverseDistance::markDonors(), inverseDistance::markDonors(), highAspectRatioFvGeometryScheme::movePoints(), averageNeighbourFvGeometryScheme::movePoints(), treeDataCell::findNearestOp::operator()(), sampledSet::pushIn(), patchInjectionBase::setPositionAndCell(), tetIndices::tet(), meshToMeshData::updateCell(), sweepData::updateCell(), wallPoint::updateCell(), refinementDistanceData::updateCell(), wallPoints::updateCell(), polyMesh::updateMesh(), reactingOneDim::updateqr(), meshToMeshMethod::writeConnectivity(), cellBitSet::writeDebug(), and cellSet::writeDebug().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceCentres()

◆ cellVolumes()

const Foam::scalarField & cellVolumes ( ) const

Definition at line 96 of file primitiveMeshCellCentresAndVols.C.

References primitiveMesh::updateGeom().

Referenced by polyTopoChange::changeMesh(), layerAdditionRemoval::changeTopology(), InflationInjection< CloudType >::InflationInjection(), polyTopoChange::makeMesh(), highAspectRatioFvGeometryScheme::movePoints(), averageNeighbourFvGeometryScheme::movePoints(), and elasticityMotionSolver::solve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceAreas()

const Foam::vectorField & faceAreas ( ) const

Definition at line 89 of file primitiveMeshFaceCentresAndAreas.C.

References primitiveMesh::updateGeom().

Referenced by decompositionMethod::calcCellCells(), primitiveMesh::calcCellCentresAndVols(), layerAdditionRemoval::changeTopology(), primitiveMesh::checkClosedBoundary(), extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil(), boundaryMesh::getNearest(), fvMesh::makeSf(), highAspectRatioFvGeometryScheme::movePoints(), averageNeighbourFvGeometryScheme::movePoints(), and primitiveMesh::pointInCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ movePoints()

Foam::tmp< Foam::scalarField > movePoints ( const pointField p,
const pointField oldP 
)

Move points, returns volumes swept by faces in motion.

Definition at line 322 of file primitiveMesh.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, nPoints, and tmp< T >::ref().

Referenced by polyMesh::movePoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInternalFace()

◆ checkUpperTriangular()

bool checkUpperTriangular ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check face ordering.

Definition at line 916 of file primitiveMeshCheck.C.

References Foam::constant::universal::c, cells, Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::labelMax, and reduce().

Here is the call graph for this function:

◆ checkCellsZipUp()

bool checkCellsZipUp ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check cell zip-up.

Definition at line 1074 of file primitiveMeshCheck.C.

References Foam::constant::universal::c, cells, Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), reduce(), and Foam::Zero.

Here is the call graph for this function:

◆ checkFaceVertices()

bool checkFaceVertices ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check uniqueness of face vertices.

Definition at line 1167 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), nPoints, and reduce().

Here is the call graph for this function:

◆ checkPoints()

bool checkPoints ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check for unused points.

Definition at line 1235 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), and reduce().

Here is the call graph for this function:

◆ checkFaceFaces()

bool checkFaceFaces ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check face-face connectivity.

Definition at line 1504 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), forAll, Foam::Info, and reduce().

Here is the call graph for this function:

◆ checkClosedBoundary() [2/2]

bool checkClosedBoundary ( const bool  report = false) const
virtual

Check boundary for closedness.

Definition at line 1599 of file primitiveMeshCheck.C.

References primitiveMesh::checkClosedBoundary(), and primitiveMesh::faceAreas().

Here is the call graph for this function:

◆ checkClosedCells() [2/2]

bool checkClosedCells ( const bool  report = false,
labelHashSet setPtr = nullptr,
labelHashSet highAspectSetPtr = nullptr,
const Vector< label > &  solutionD = Vector<label>::one 
) const
virtual

Check cells for closedness.

Definition at line 1606 of file primitiveMeshCheck.C.

◆ checkFaceAreas() [2/2]

bool checkFaceAreas ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check for negative face areas.

Definition at line 1626 of file primitiveMeshCheck.C.

◆ checkCellVolumes() [2/2]

bool checkCellVolumes ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check for negative cell volumes.

Definition at line 1642 of file primitiveMeshCheck.C.

◆ checkFaceOrthogonality() [2/2]

bool checkFaceOrthogonality ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check for non-orthogonality.

Reimplemented in polyMesh.

Definition at line 1658 of file primitiveMeshCheck.C.

◆ checkFacePyramids() [2/2]

bool checkFacePyramids ( const bool  report = false,
const scalar  minPyrVol = -SMALL,
labelHashSet setPtr = nullptr 
) const
virtual

Check face pyramid volume.

Definition at line 1674 of file primitiveMeshCheck.C.

References points.

◆ checkFaceSkewness() [2/2]

bool checkFaceSkewness ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check face skewness.

Reimplemented in polyMesh.

Definition at line 1693 of file primitiveMeshCheck.C.

References points.

◆ checkFaceAngles() [2/2]

bool checkFaceAngles ( const bool  report = false,
const scalar  maxSin = 10,
labelHashSet setPtr = nullptr 
) const
virtual

Check face angles.

Definition at line 1711 of file primitiveMeshCheck.C.

References points.

◆ checkFaceFlatness() [2/2]

bool checkFaceFlatness ( const bool  report,
const scalar  warnFlatness,
labelHashSet setPtr 
) const
virtual

Check face warpage: decompose face and check ratio between.

magnitude of sum of triangle areas and sum of magnitude of triangle areas.

Definition at line 1729 of file primitiveMeshCheck.C.

References points.

◆ checkPointNearness()

bool checkPointNearness ( const bool  report,
const scalar  reportDistSqr,
labelHashSet setPtr = nullptr 
) const
virtual

Check for point-point-nearness,.

e.g. colocated points which may be part of baffles.

Definition at line 35 of file primitiveMeshCheckPointNearness.C.

References Foam::endl(), SortableList< T >::indices(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::magSqr(), points, reduce(), and Foam::sqrt().

Here is the call graph for this function:

◆ checkEdgeLength()

bool checkEdgeLength ( const bool  report,
const scalar  minLenSqr,
labelHashSet setPtr = nullptr 
) const
virtual

Check edge length.

Definition at line 34 of file primitiveMeshCheckEdgeLength.C.

References Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::magSqr(), Foam::max(), Foam::min(), nPoints, points, reduce(), Foam::sqr(), and Foam::sqrt().

Here is the call graph for this function:

◆ checkConcaveCells() [2/2]

bool checkConcaveCells ( const bool  report = false,
labelHashSet setPtr = nullptr 
) const
virtual

Check for concave cells by the planes of faces.

Definition at line 1748 of file primitiveMeshCheck.C.

◆ checkTopology()

bool checkTopology ( const bool  report = false) const
virtual

Check mesh topology for correctness.

Returns false for no error.

Definition at line 1763 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ checkGeometry()

bool checkGeometry ( const bool  report = false) const
virtual

Check mesh geometry (& implicitly topology) for correctness.

Returns false for no error.

Definition at line 1793 of file primitiveMeshCheck.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ checkMesh()

bool checkMesh ( const bool  report = false) const
virtual

Check mesh for correctness. Returns false for no error.

Definition at line 1825 of file primitiveMeshCheck.C.

References Foam::checkGeometry(), Foam::checkTopology(), Foam::expressions::patchExpr::debug, DebugInFunction, Foam::endl(), and Foam::Info.

Referenced by attachPolyTopoChanger::attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setClosedThreshold()

Foam::scalar setClosedThreshold ( const scalar  val)
static

Set the closedness ratio warning threshold.

Definition at line 1851 of file primitiveMeshCheck.C.

◆ setAspectThreshold()

Foam::scalar setAspectThreshold ( const scalar  val)
static

Set the aspect ratio warning threshold.

Definition at line 1860 of file primitiveMeshCheck.C.

◆ setNonOrthThreshold()

Foam::scalar setNonOrthThreshold ( const scalar  val)
static

Set the non-orthogonality warning threshold in degrees.

Definition at line 1869 of file primitiveMeshCheck.C.

◆ setSkewThreshold()

Foam::scalar setSkewThreshold ( const scalar  val)
static

Set the skewness warning threshold as percentage.

of the face area vector

Definition at line 1878 of file primitiveMeshCheck.C.

◆ pointInCellBB()

bool pointInCellBB ( const point p,
label  celli,
scalar  inflationFraction = 0 
) const

Return true if the point in the cell bounding box.

The bounding box may be isotropically inflated by the fraction inflationFraction

Definition at line 36 of file primitiveMeshFindCell.C.

References cells, boundBox::contains(), boundBox::inflate(), p, and points.

Here is the call graph for this function:

◆ pointInCell()

bool pointInCell ( const point p,
label  celli 
) const

Return true if the point is in the cell.

Definition at line 61 of file primitiveMeshFindCell.C.

References primitiveMesh::cells(), f(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), primitiveMesh::faceOwner(), forAll, and p.

Referenced by polyMesh::pointInCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNearestCell()

Foam::label findNearestCell ( const point location) const

Find the cell with the nearest cell centre to location.

Definition at line 88 of file primitiveMeshFindCell.C.

References Foam::magSqr().

Here is the call graph for this function:

◆ findCell()

Foam::label findCell ( const point location) const

Find cell enclosing this location (-1 if not in mesh)

Definition at line 115 of file primitiveMeshFindCell.C.

References n.

◆ printAllocated()

void printAllocated ( ) const

Print a list of all the currently allocated mesh data.

Definition at line 33 of file primitiveMeshClear.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ hasCellShapes()

bool hasCellShapes ( ) const
inlinenoexcept

Definition at line 111 of file primitiveMeshI.H.

◆ hasEdges()

bool hasEdges ( ) const
inlinenoexcept

Definition at line 117 of file primitiveMeshI.H.

◆ hasCellCells()

bool hasCellCells ( ) const
inlinenoexcept

Definition at line 123 of file primitiveMeshI.H.

◆ hasEdgeCells()

bool hasEdgeCells ( ) const
inlinenoexcept

Definition at line 129 of file primitiveMeshI.H.

◆ hasPointCells()

bool hasPointCells ( ) const
inlinenoexcept

Definition at line 135 of file primitiveMeshI.H.

◆ hasCells()

bool hasCells ( ) const
inlinenoexcept

Definition at line 141 of file primitiveMeshI.H.

◆ hasEdgeFaces()

bool hasEdgeFaces ( ) const
inlinenoexcept

Definition at line 147 of file primitiveMeshI.H.

◆ hasPointFaces()

bool hasPointFaces ( ) const
inlinenoexcept

Definition at line 153 of file primitiveMeshI.H.

◆ hasCellEdges()

bool hasCellEdges ( ) const
inlinenoexcept

Definition at line 159 of file primitiveMeshI.H.

◆ hasFaceEdges()

bool hasFaceEdges ( ) const
inlinenoexcept

Definition at line 165 of file primitiveMeshI.H.

◆ hasPointEdges()

bool hasPointEdges ( ) const
inlinenoexcept

Definition at line 171 of file primitiveMeshI.H.

◆ hasPointPoints()

bool hasPointPoints ( ) const
inlinenoexcept

Definition at line 177 of file primitiveMeshI.H.

◆ hasCellPoints()

bool hasCellPoints ( ) const
inlinenoexcept

Definition at line 183 of file primitiveMeshI.H.

◆ hasCellCentres()

bool hasCellCentres ( ) const
inlinenoexcept

Definition at line 189 of file primitiveMeshI.H.

Referenced by stabilisedFvGeometryScheme::movePoints(), highAspectRatioFvGeometryScheme::movePoints(), and cyclicACMIPolyPatch::resetAMI().

Here is the caller graph for this function:

◆ hasFaceCentres()

bool hasFaceCentres ( ) const
inlinenoexcept

Definition at line 195 of file primitiveMeshI.H.

Referenced by stabilisedFvGeometryScheme::movePoints(), and highAspectRatioFvGeometryScheme::movePoints().

Here is the caller graph for this function:

◆ hasCellVolumes()

bool hasCellVolumes ( ) const
inlinenoexcept

Definition at line 201 of file primitiveMeshI.H.

Referenced by stabilisedFvGeometryScheme::movePoints(), and highAspectRatioFvGeometryScheme::movePoints().

Here is the caller graph for this function:

◆ hasFaceAreas()

bool hasFaceAreas ( ) const
inlinenoexcept

Definition at line 207 of file primitiveMeshI.H.

Referenced by stabilisedFvGeometryScheme::movePoints(), highAspectRatioFvGeometryScheme::movePoints(), and cyclicACMIPolyPatch::resetAMI().

Here is the caller graph for this function:

◆ cellCells() [2/3]

const Foam::labelList & cellCells ( const label  celli,
DynamicList< label > &  storage 
) const

cellCells using cells.

Definition at line 114 of file primitiveMeshCellCells.C.

References DynamicList< T, SizeMin >::append(), cells, DynamicList< T, SizeMin >::clear(), and forAll.

Here is the call graph for this function:

◆ cellCells() [3/3]

const Foam::labelList & cellCells ( const label  celli) const

Definition at line 153 of file primitiveMeshCellCells.C.

◆ cellPoints() [2/3]

const Foam::labelList & cellPoints ( const label  celli,
labelHashSet set,
DynamicList< label > &  storage 
) const

cellPoints using cells

Definition at line 62 of file primitiveMeshCellPoints.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::capacity(), cells, DynamicList< T, SizeMin >::clear(), Foam::BitOps::set(), and DynamicList< T, SizeMin >::setCapacity().

Here is the call graph for this function:

◆ cellPoints() [3/3]

const Foam::labelList & cellPoints ( const label  celli) const

Definition at line 98 of file primitiveMeshCellPoints.C.

◆ pointCells() [2/3]

const Foam::labelList & pointCells ( const label  pointi,
DynamicList< label > &  storage 
) const

pointCells using pointFaces

Definition at line 122 of file primitiveMeshPointCells.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), forAll, n, pFaces, DynamicList< T, SizeMin >::setSize(), and Foam::sort().

Here is the call graph for this function:

◆ pointCells() [3/3]

const Foam::labelList & pointCells ( const label  pointi) const

Definition at line 176 of file primitiveMeshPointCells.C.

◆ pointPoints() [2/3]

const Foam::labelList & pointPoints ( const label  pointi,
DynamicList< label > &  storage 
) const

pointPoints using edges, pointEdges

Definition at line 105 of file primitiveMeshPointPoints.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::capacity(), DynamicList< T, SizeMin >::clear(), forAll, and DynamicList< T, SizeMin >::setCapacity().

Here is the call graph for this function:

◆ pointPoints() [3/3]

const Foam::labelList & pointPoints ( const label  pointi) const

Definition at line 137 of file primitiveMeshPointPoints.C.

◆ faceEdges() [2/3]

const Foam::labelList & faceEdges ( const label  facei,
DynamicList< label > &  storage 
) const

faceEdges using pointFaces, edges, pointEdges

Definition at line 590 of file primitiveMeshEdges.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::capacity(), DynamicList< T, SizeMin >::clear(), f(), forAll, and DynamicList< T, SizeMin >::setCapacity().

Here is the call graph for this function:

◆ faceEdges() [3/3]

const Foam::labelList & faceEdges ( const label  facei) const

Definition at line 625 of file primitiveMeshEdges.C.

◆ edgeFaces() [2/3]

const Foam::labelList & edgeFaces ( const label  edgeI,
DynamicList< label > &  storage 
) const

edgeFaces using pointFaces, edges, pointEdges

Definition at line 61 of file primitiveMeshEdgeFaces.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), Foam::constant::electromagnetic::e, and f().

Here is the call graph for this function:

◆ edgeFaces() [3/3]

const Foam::labelList & edgeFaces ( const label  edgeI) const

Definition at line 126 of file primitiveMeshEdgeFaces.C.

◆ edgeCells() [2/3]

const Foam::labelList & edgeCells ( const label  edgeI,
DynamicList< label > &  storage 
) const

edgeCells using pointFaces, edges, pointEdges

Definition at line 60 of file primitiveMeshEdgeCells.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), and forAll.

Here is the call graph for this function:

◆ edgeCells() [3/3]

const Foam::labelList & edgeCells ( const label  edgeI) const

Definition at line 129 of file primitiveMeshEdgeCells.C.

◆ cellEdges() [2/3]

const Foam::labelList & cellEdges ( const label  celli,
labelHashSet set,
DynamicList< label > &  storage 
) const

cellEdges using cells, pointFaces, edges, pointEdges

Definition at line 632 of file primitiveMeshEdges.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::capacity(), cells, DynamicList< T, SizeMin >::clear(), Foam::BitOps::set(), and DynamicList< T, SizeMin >::setCapacity().

Here is the call graph for this function:

◆ cellEdges() [3/3]

const Foam::labelList & cellEdges ( const label  celli) const

Definition at line 667 of file primitiveMeshEdges.C.

◆ updateGeom()

void updateGeom ( )
virtual

Update all geometric data.

Reimplemented in fvMesh.

Definition at line 365 of file primitiveMesh.C.

Referenced by primitiveMesh::cellCentres(), primitiveMesh::cellVolumes(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), basicFvGeometryScheme::movePoints(), and highAspectRatioFvGeometryScheme::movePoints().

Here is the caller graph for this function:

◆ clearGeom()

void clearGeom ( )

Clear geometry.

Definition at line 127 of file primitiveMeshClear.C.

References Foam::expressions::patchExpr::debug, Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Pout.

Referenced by polyMesh::clearGeom(), and polyMesh::updateGeomPoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearCellGeom()

void clearCellGeom ( )

Clear cell-based geometry only.

Use with care! currently used by cyclicACMI

Definition at line 143 of file primitiveMeshClear.C.

References Foam::expressions::patchExpr::debug, Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Pout.

Referenced by cyclicACMIPolyPatch::resetAMI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearAddressing()

void clearAddressing ( )

Clear topological data.

Definition at line 157 of file primitiveMeshClear.C.

References Foam::expressions::patchExpr::debug, Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Pout.

Referenced by polyMesh::clearAddressing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearOut()

void clearOut ( )

Clear all geometry and addressing unnecessary for CFD.

Definition at line 186 of file primitiveMeshClear.C.

Member Data Documentation

◆ closedThreshold_

Foam::scalar closedThreshold_ = 1.0e-6
staticprotected

Static data to control mesh checking.

Cell closedness warning threshold

set as the fraction of un-closed area to closed area

Definition at line 238 of file primitiveMesh.H.

◆ aspectThreshold_

Foam::scalar aspectThreshold_ = 1000
staticprotected

Aspect ratio warning threshold.

Definition at line 241 of file primitiveMesh.H.

◆ nonOrthThreshold_

Foam::scalar nonOrthThreshold_ = 70
staticprotected

Non-orthogonality warning threshold in deg.

Definition at line 244 of file primitiveMesh.H.

◆ skewThreshold_

Foam::scalar skewThreshold_ = 4
staticprotected

Skewness warning threshold.

Definition at line 247 of file primitiveMesh.H.

◆ planarCosAngle_

Foam::scalar planarCosAngle_ = 1.0e-6
staticprotected

Threshold where faces are considered coplanar.

Definition at line 250 of file primitiveMesh.H.

◆ cellsPerEdge_

const unsigned cellsPerEdge_ = 4
static

Estimated number of cells per edge.

Definition at line 398 of file primitiveMesh.H.

◆ cellsPerPoint_

const unsigned cellsPerPoint_ = 8
static

Estimated number of cells per point.

Definition at line 401 of file primitiveMesh.H.

◆ facesPerCell_

const unsigned facesPerCell_ = 6
static

Estimated number of faces per cell.

Definition at line 404 of file primitiveMesh.H.

◆ facesPerEdge_

const unsigned facesPerEdge_ = 4
static

Estimated number of faces per edge.

Definition at line 407 of file primitiveMesh.H.

◆ facesPerPoint_

const unsigned facesPerPoint_ = 12
static

Estimated number of faces per point.

Definition at line 410 of file primitiveMesh.H.

◆ edgesPerCell_

const unsigned edgesPerCell_ = 12
static

Estimated number of edges per cell.

Definition at line 413 of file primitiveMesh.H.

◆ edgesPerFace_

const unsigned edgesPerFace_ = 4
static

Estimated number of edges per cell.

Definition at line 416 of file primitiveMesh.H.

◆ edgesPerPoint_

const unsigned edgesPerPoint_ = 6
static

Estimated number of edges per point.

Definition at line 419 of file primitiveMesh.H.

◆ pointsPerCell_

const unsigned pointsPerCell_ = 8
static

Estimated number of points per cell.

Definition at line 422 of file primitiveMesh.H.

◆ pointsPerFace_

const unsigned pointsPerFace_ = 4
static

Estimated number of points per face.

Definition at line 425 of file primitiveMesh.H.


The documentation for this class was generated from the following files: