50 #ifndef primitiveMesh_H
51 #define primitiveMesh_H
82 label nInternalPoints_;
88 mutable label nInternal0Edges_;
91 mutable label nInternal1Edges_;
94 mutable label nInternalEdges_;
97 mutable label nEdges_;
100 label nInternalFaces_;
186 void calcCellShapes()
const;
189 void calcCellCells()
const;
192 void calcPointCells()
const;
195 void calcCells()
const;
198 void calcCellEdges()
const;
201 void calcPointPoints()
const;
206 void calcEdges(
const bool doFaceEdges)
const;
208 void clearOutEdges();
220 static label findFirstCommonElementFromSortedLists
230 void calcFaceCentresAndAreas()
const;
233 void makeFaceCentresAndAreas
242 void calcCellCentresAndVols()
const;
245 void makeCellCentresAndVols
254 void calcEdgeVectors()
const;
263 template<
class Class,
class Type>
266 const Type& (Class::*method)()
const,
267 const Type& (Class::*otherMethod)()
const
272 template<
class Class,
class Type,
class OtherType>
275 const Type& (Class::*method)()
const,
276 const OtherType& (Class::*otherMethod)()
const
434 static void calcCells
507 scalar inflationFraction = 0
Cell-face mesh analysis engine.
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
static bool calcPointOrder(label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
Helper function to calculate point ordering. Returns true.
label findNearestCell(const point &location) const
Find the cell with the nearest cell centre to location.
primitiveMesh()
Construct null.
const labelListList & pointEdges() const
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
const labelListList & cellEdges() const
bool pointInCell(const point &p, label celli) const
Return true if the point is in the cell.
const vectorField & faceCentres() const
virtual const faceList & faces() const =0
Return faces.
label nInternalPoints() const
Points not on boundary.
const labelListList & pointCells() const
static const unsigned facesPerEdge_
Estimated number of faces per edge.
const scalarField & cellVolumes() const
void clearGeom()
Clear geometry.
bool pointInCellBB(const point &p, label celli, scalar inflationFraction=0) const
Return true if the point in the cell bounding box.
label nInternalFaces() const
static const unsigned edgesPerCell_
Estimated number of edges per cell.
const vectorField & cellCentres() const
virtual ~primitiveMesh()
Destructor.
const cellShapeList & cellShapes() const
Return cell shapes.
static const unsigned facesPerPoint_
Estimated number of faces per point.
virtual const labelList & faceOwner() const =0
Face face-owner addressing.
label findCell(const point &location) const
Find cell enclosing this location (-1 if not in mesh)
static const unsigned pointsPerFace_
Estimated number of points per face.
ClassName("primitiveMesh")
Runtime type information.
const labelListList & cellCells() const
const labelListList & cellPoints() const
static bool isMethod(const Type &(Class::*method)() const, const Type &(Class::*otherMethod)() const)
Test if the supplied methods are the same. Same type overload.
void clearAddressing()
Clear topological data.
static const unsigned cellsPerPoint_
Estimated number of cells per point.
static const unsigned cellsPerEdge_
Estimated number of cells per edge.
void operator=(const primitiveMesh &)=delete
Disallow default bitwise assignment.
bool has(const Type &(primitiveMesh::*method)() const) const
Return whether the result of the given method has been allocated.
const scalarField & magFaceAreas() const
void printAllocated() const
Print a list of all the currently allocated mesh data.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
static const unsigned edgesPerPoint_
Estimated number of edges per point.
const labelListList & pointFaces() const
virtual const labelList & faceNeighbour() const =0
Face face-neighbour addressing.
tmp< scalarField > movePoints(const pointField &p, const pointField &oldP)
Move points, returns volumes swept by faces in motion.
static const unsigned pointsPerCell_
Estimated number of points per cell.
static const unsigned facesPerCell_
Estimated number of faces per cell.
virtual const pointField & points() const =0
Return mesh points.
const labelListList & edgeFaces() const
const labelListList & pointPoints() const
const labelListList & faceEdges() const
const labelListList & edgeCells() const
const vectorField & faceAreas() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
static const unsigned edgesPerFace_
Estimated number of edges per cell.
const cellList & cells() const
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
label nInternal0Edges() const
Internal edges (i.e. not on boundary face) using.
virtual const pointField & oldPoints() const =0
Return old points for mesh motion.
A class for managing temporary objects.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const scalarField & cellVols