OpenFOAM logo
Open Source CFD Toolkit

primitiveMesh Class Reference

Inheritance diagram for primitiveMesh:

Inheritance graph
[legend]
Collaboration diagram for primitiveMesh:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClassName ("primitiveMesh")
 primitiveMesh (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, const pointField &points, const faceList &faces, const labelList &faceOwner, const labelList &faceNeighbour)
 Construct from components.
virtual ~primitiveMesh ()
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, const pointField &points, const faceList &faces, const labelList &faceOwner, const labelList &faceNeighbour)
 Reset this primitiveMesh given a complete set of data.
void reset (const label nPoints, const label nInternalFaces, const label nFaces, const label nCells, const pointField &points, const faceList &faces, const labelList &faceOwner, const labelList &faceNeighbour, cellList &cells)
 Reset this primitiveMesh given a complete set of data and cells.
label nPoints () const
label nEdges () const
label nInternalFaces () const
label nFaces () const
label nCells () const
const pointFieldpoints () const
 Return mesh points.
const faceListfaces () const
 Return faces.
const labelListfaceOwner () const
 Face owner addresing.
const labelListfaceNeighbour () const
 Face neighbour addressing.
const cellShapeListcellShapes () const
 Return cell shapes.
const edgeListedges () const
 Return mesh edges.
const pointFieldoldPoints () const
 Return old points.
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.
bool isInternalFace (const label faceIndex) const
 Return true if given face label is internal to the mesh.
bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness.
bool checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cells for closedness.
bool checkFaceAreas (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative face areas.
bool checkCellVolumes (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for negative cell volumes.
bool checkFaceDotProduct (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for non-orthogonality.
bool checkFacePyramids (const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const
 Check face pyramid volume.
bool checkFaceSkewness (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face skewness.
bool checkFaceAngles (const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=NULL) const
 Check face angles.
bool checkFaceFlatness (const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
 Check face warpage: decompose face and check ratio between.
bool checkPoints (const bool report=false, labelHashSet *setPtr=NULL) const
 Check for unused points.
bool checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face ordering.
bool checkCellsZipUp (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell zip-up.
bool checkFaceVertices (const bool report=false, labelHashSet *setPtr=NULL) const
 Check uniqueness of face vertices.
bool checkFaceFaces (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face-face connectivity.
bool checkFloatingCells (const bool report=false, labelHashSet *setPtr=NULL) const
 Check unconnected cells.
bool checkTopology (const bool report=false) const
 Check mesh topology for correctness. Returns false for no error.
bool checkGeometry (const bool report=false) const
 Check mesh geometry (& implicitly topology) for correctness.
bool checkMesh (const bool report=false) const
 Check mesh for correctness. Returns false for no error.
bool checkMeshMotion (const pointField &newPoints, const bool report=false) const
 Check mesh motion for correctness given motion points.
boundBox bounds () const
 Return mesh bounding box.
bool pointInCellBB (const point &p, label celli) const
 Is the point in the cell bounding box.
bool pointInCell (const point &p, label celli) const
 Is the point in the cell.
label findNearestCell (const point &location) const
 Find the cell with the nearest cell centre to location.
label findCell (const point &location) const
 Find cell enclosing this location (-1 if not in mesh).
void printAllocated () const
 Print a list of all the currently allocated mesh data.
void clearGeom ()
 Clear geometry.
void clearAddressing ()
 Clear topological data.
void clearOut ()
 Clear all geometry and addressing unnecessary for CFD.
void clearPrimitives ()
 Clear primitive data. Access to points and faces.
void clearAll ()
 Clear everyting primitive, geometry and addressing.

Static Public Member Functions

void calcCells (cellList &, const unallocLabelList &own, const unallocLabelList &nei, const label nCells=-1)
 Helper function to calculate cell-face addressing from.
scalar setOrthWarn (const scalar)
 Set the non-orthogonality warning threshold in degrees.
scalar setSkewWarn (const scalar)
 Set the skewness warning threshold as percentage.
scalar setAspectWarn (const scalar)
 Set the aspect ratio warning threshold.

Static Public Attributes

const unsigned cellsPerEdge_ = 4
 Estimated number of cells per edge.
const unsigned cellsPerPoint_ = 8
 Estimated number of cells per point.
const unsigned facesPerCell_ = 6
 Estimated number of faces per cell.
const unsigned facesPerEdge_ = 4
 Estimated number of faces per edge.
const unsigned facesPerPoint_ = 12
 Estimated number of faces per point.
const unsigned edgesPerCell_ = 12
 Estimated number of edges per cell.
const unsigned edgesPerFace_ = 4
 Estimated number of edges per cell.
const unsigned edgesPerPoint_ = 6
 Estimated number of edges per point.
const unsigned pointsPerCell_ = 8
 Estimated number of points per cell.
const unsigned pointsPerFace_ = 4
 Estimated number of points per face.
const scalar closedTolerance_
 Tolerance for mesh and cell closedness.

Protected Member Functions

 primitiveMesh ()
 Construct null.

Constructor & Destructor Documentation

primitiveMesh  )  [protected]
 

Construct null.

primitiveMesh const label  nPoints,
const label  nInternalFaces,
const label  nFaces,
const label  nCells,
const pointField points,
const faceList faces,
const labelList faceOwner,
const labelList faceNeighbour
 

Construct from components.

virtual ~primitiveMesh  )  [virtual]
 


Member Function Documentation

boundBox bounds  )  const [inline]
 

Return mesh bounding box.

Definition at line 653 of file primitiveMesh.H.

void calcCells cellList ,
const unallocLabelList own,
const unallocLabelList 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.

const labelListList& cellCells  )  const
 

const vectorField& cellCentres  )  const
 

const labelListList& cellEdges  )  const
 

const labelListList& cellPoints  )  const
 

const cellList& cells  )  const
 

const cellShapeList& cellShapes  )  const
 

Return cell shapes.

const scalarField& cellVolumes  )  const
 

bool checkCellsZipUp const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check cell zip-up.

bool checkCellVolumes const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check for negative cell volumes.

bool checkClosedBoundary const bool  report = false  )  const
 

Check boundary for closedness.

bool checkClosedCells const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check cells for closedness.

bool checkFaceAngles const bool  report = false,
const scalar  maxSin = 10,
labelHashSet setPtr = NULL
const
 

Check face angles.

bool checkFaceAreas const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check for negative face areas.

bool checkFaceDotProduct const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check for non-orthogonality.

bool checkFaceFaces const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check face-face connectivity.

bool checkFaceFlatness const bool  report,
const scalar  warnFlatness,
labelHashSet setPtr
const
 

Check face warpage: decompose face and check ratio between.

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

bool checkFacePyramids const bool  report = false,
const scalar  minPyrVol = -SMALL,
labelHashSet setPtr = NULL
const
 

Check face pyramid volume.

bool checkFaceSkewness const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check face skewness.

bool checkFaceVertices const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check uniqueness of face vertices.

bool checkFloatingCells const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check unconnected cells.

bool checkGeometry const bool  report = false  )  const
 

Check mesh geometry (& implicitly topology) for correctness.

Returns false for no error.

bool checkMesh const bool  report = false  )  const
 

Check mesh for correctness. Returns false for no error.

bool checkMeshMotion const pointField newPoints,
const bool  report = false
const
 

Check mesh motion for correctness given motion points.

bool checkPoints const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check for unused points.

bool checkTopology const bool  report = false  )  const
 

Check mesh topology for correctness. Returns false for no error.

bool checkUpperTriangular const bool  report = false,
labelHashSet setPtr = NULL
const
 

Check face ordering.

ClassName "primitiveMesh"   ) 
 

void clearAddressing  ) 
 

Clear topological data.

Reimplemented in polyMesh.

void clearAll  ) 
 

Clear everyting primitive, geometry and addressing.

void clearGeom  ) 
 

Clear geometry.

Reimplemented in polyMesh.

void clearOut  ) 
 

Clear all geometry and addressing unnecessary for CFD.

Reimplemented in polyMesh.

void clearPrimitives  ) 
 

Clear primitive data. Access to points and faces.

will be denied

Reimplemented in polyMesh.

const labelListList& edgeCells  )  const
 

const labelListList& edgeFaces  )  const
 

const edgeList& edges  )  const
 

Return mesh edges.

Referenced by primitiveMesh::nPoints(), and pointEdgePoint::updateEdge().

const vectorField& faceAreas  )  const
 

const vectorField& faceCentres  )  const
 

Referenced by wallPoint::updateFace().

const labelListList& faceEdges  )  const
 

const labelList & faceNeighbour  )  const [inline]
 

Face neighbour addressing.

Definition at line 85 of file primitiveMeshI.H.

const labelList & faceOwner  )  const [inline]
 

Face owner addresing.

Definition at line 79 of file primitiveMeshI.H.

Referenced by centreEdge::interpolate().

const faceList& faces  )  const
 

Return faces.

Referenced by diagonalEdge::faceIndex1().

label findCell const point location  )  const
 

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

label findNearestCell const point location  )  const
 

Find the cell with the nearest cell centre to location.

bool isInternalFace const label  faceIndex  )  const [inline]
 

Return true if given face label is internal to the mesh.

Definition at line 91 of file primitiveMeshI.H.

tmp<scalarField> movePoints const pointField p,
const pointField oldP
 

Move points, returns volumes swept by faces in motion.

label nCells  )  const [inline]
 

Definition at line 73 of file primitiveMeshI.H.

Referenced by pointMesh::nPoints(), elementMesh::size(), and volMesh::size().

label nEdges  )  const [inline]
 

Definition at line 50 of file primitiveMeshI.H.

label nFaces  )  const [inline]
 

Definition at line 67 of file primitiveMeshI.H.

Referenced by areaMesh::size().

label nInternalFaces  )  const [inline]
 

Definition at line 61 of file primitiveMeshI.H.

Referenced by surfaceMesh::size().

label nPoints  )  const [inline]
 

Definition at line 44 of file primitiveMeshI.H.

References primitiveMesh::edges(), and UList::size().

Referenced by edgeVertex::isEdge(), tetPointMesh::size(), and pointMesh::size().

Here is the call graph for this function:

const pointField& oldPoints  )  const
 

Return old points.

const labelListList& pointCells  )  const
 

const labelListList& pointEdges  )  const
 

const labelListList& pointFaces  )  const
 

bool pointInCell const point p,
label  celli
const
 

Is the point in the cell.

bool pointInCellBB const point p,
label  celli
const
 

Is the point in the cell bounding box.

const labelListList& pointPoints  )  const
 

const pointField& points  )  const
 

Return mesh points.

Referenced by pointEdgePoint::updateEdge(), and pointEdgePoint::updatePoint().

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,
const pointField points,
const faceList faces,
const labelList faceOwner,
const labelList faceNeighbour,
cellList cells
 

Reset this primitiveMesh given a complete set of data and cells.

void reset const label  nPoints,
const label  nInternalFaces,
const label  nFaces,
const label  nCells,
const pointField points,
const faceList faces,
const labelList faceOwner,
const labelList faceNeighbour
 

Reset this primitiveMesh given a complete set of data.

scalar setAspectWarn const   scalar  )  [static]
 

Set the aspect ratio warning threshold.

scalar setOrthWarn const   scalar  )  [static]
 

Set the non-orthogonality warning threshold in degrees.

scalar setSkewWarn const   scalar  )  [static]
 

Set the skewness warning threshold as percentage.

of the face area vector


Member Data Documentation

const unsigned cellsPerEdge_ = 4 [static]
 

Estimated number of cells per edge.

Definition at line 325 of file primitiveMesh.H.

const unsigned cellsPerPoint_ = 8 [static]
 

Estimated number of cells per point.

Definition at line 328 of file primitiveMesh.H.

const scalar closedTolerance_ [static]
 

Tolerance for mesh and cell closedness.

Definition at line 355 of file primitiveMesh.H.

const unsigned edgesPerCell_ = 12 [static]
 

Estimated number of edges per cell.

Definition at line 340 of file primitiveMesh.H.

const unsigned edgesPerFace_ = 4 [static]
 

Estimated number of edges per cell.

Definition at line 343 of file primitiveMesh.H.

const unsigned edgesPerPoint_ = 6 [static]
 

Estimated number of edges per point.

Definition at line 346 of file primitiveMesh.H.

const unsigned facesPerCell_ = 6 [static]
 

Estimated number of faces per cell.

Definition at line 331 of file primitiveMesh.H.

const unsigned facesPerEdge_ = 4 [static]
 

Estimated number of faces per edge.

Definition at line 334 of file primitiveMesh.H.

const unsigned facesPerPoint_ = 12 [static]
 

Estimated number of faces per point.

Definition at line 337 of file primitiveMesh.H.

const unsigned pointsPerCell_ = 8 [static]
 

Estimated number of points per cell.

Definition at line 349 of file primitiveMesh.H.

const unsigned pointsPerFace_ = 4 [static]
 

Estimated number of points per face.

Definition at line 352 of file primitiveMesh.H.


The documentation for this class was generated from the following files:
For further information go to www.openfoam.org