OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

primitiveMesh Class Reference

Inheritance diagram for primitiveMesh:

Inheritance graph
[legend]
Collaboration diagram for primitiveMesh:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 85 of file primitiveMesh.H.


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 pointField & points () const
 Return mesh points.
const faceList & faces () const
 Return faces.
const labelList & faceOwner () const
 Face owner addresing.
const labelList & faceNeighbour () const
 Face neighbour addressing.
const cellShapeList & cellShapes () const
 Return cell shapes.
const edgeList & edges () const
 Return mesh edges.
const pointField & oldPoints () const
 Return old points.
const labelListList & cellCells () const
const labelListList & edgeCells () const
const labelListList & pointCells () const
const cellList & cells () const
const labelListList & edgeFaces () const
const labelListList & pointFaces () const
const labelListList & cellEdges () const
const labelListList & faceEdges () const
const labelListList & pointEdges () const
const labelListList & pointPoints () const
const labelListList & cellPoints () const
const vectorField & cellCentres () const
const vectorField & faceCentres () const
const scalarField & cellVolumes () const
const vectorField & faceAreas () const
tmp< scalarField > movePoints (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 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 checkUpperTriangular (const bool report=false, labelHashSet *setPtr=NULL) const
 Check face ordering.
bool checkClosedBoundary (const bool report=false) const
 Check boundary for closedness.
bool checkClosedCells (const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=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 checkFaceOrthogonality (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 checkPointNearness (const bool report, const scalar reportDistSqr, labelHashSet *setPtr=NULL) const
 Check for point-point-nearness,.
bool checkEdgeLength (const bool report, const scalar minLenSqr, labelHashSet *setPtr=NULL) const
 Check edge length.
bool checkCellDeterminant (const bool report=false, labelHashSet *setPtr=NULL) const
 Check cell determinant.
bool checkTopology (const bool report=false) const
 Check mesh topology for correctness.
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.
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

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

Static Public Attributes

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

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

ClassName ( "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 [inline]

Definition at line 44 of file primitiveMeshI.H.

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

Referenced by mapDistributePolyMesh::constructPatchMap(), and edgeVertex::edgeVertex().

Here is the call graph for this function:

Here is the caller graph for this function:

label nEdges (  )  const [inline]

Definition at line 50 of file primitiveMeshI.H.

Referenced by edgeVertex::edgeVertex().

Here is the caller graph for this function:

label nInternalFaces (  )  const [inline]

Definition at line 61 of file primitiveMeshI.H.

label nFaces (  )  const [inline]

Definition at line 67 of file primitiveMeshI.H.

label nCells (  )  const [inline]

Definition at line 73 of file primitiveMeshI.H.

const pointField& points (  )  const

Return mesh points.

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

Here is the caller graph for this function:

const faceList& faces (  )  const

Return faces.

Referenced by diagonalEdge::faceIndex1().

Here is the caller graph for this function:

const labelList & faceOwner (  )  const [inline]

Face owner addresing.

Definition at line 79 of file primitiveMeshI.H.

Referenced by centreEdge::interpolate().

Here is the caller graph for this function:

const labelList & faceNeighbour (  )  const [inline]

Face neighbour addressing.

Definition at line 85 of file primitiveMeshI.H.

const cellShapeList& cellShapes (  )  const

Return cell shapes.

const edgeList& edges (  )  const

Return mesh edges.

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

Here is the caller graph for this function:

static 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 pointField& oldPoints (  )  const

Return old points.

const labelListList& cellCells (  )  const

const labelListList& edgeCells (  )  const

const labelListList& pointCells (  )  const

const cellList& cells (  )  const

const labelListList& edgeFaces (  )  const

const labelListList& pointFaces (  )  const

const labelListList& cellEdges (  )  const

const labelListList& faceEdges (  )  const

const labelListList& pointEdges (  )  const

const labelListList& pointPoints (  )  const

const labelListList& cellPoints (  )  const

const vectorField& cellCentres (  )  const

Referenced by wallPoint::updateCell().

Here is the caller graph for this function:

const vectorField& faceCentres (  )  const

Referenced by wallPoint::updateFace().

Here is the caller graph for this function:

const scalarField& cellVolumes (  )  const

const vectorField& faceAreas (  )  const

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

Move points, returns volumes swept by faces in motion.

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.

Referenced by Cloud< Foam::solidParticle >::pMesh().

Here is the caller graph for this function:

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 checkUpperTriangular ( const bool  report = false,
labelHashSet *  setPtr = NULL 
) const

Check face ordering.

bool checkClosedBoundary ( const bool  report = false  )  const

Check boundary for closedness.

bool checkClosedCells ( const bool  report = false,
labelHashSet *  setPtr = NULL,
labelHashSet *  highAspectSetPtr = 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 checkFaceOrthogonality ( 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.

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

bool checkPoints ( const bool  report = false,
labelHashSet *  setPtr = NULL 
) const

Check for unused points.

bool checkPointNearness ( const bool  report,
const scalar  reportDistSqr,
labelHashSet *  setPtr = NULL 
) const

Check for point-point-nearness,.

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

bool checkEdgeLength ( const bool  report,
const scalar  minLenSqr,
labelHashSet *  setPtr = NULL 
) const

Check edge length.

bool checkCellDeterminant ( const bool  report = false,
labelHashSet *  setPtr = NULL 
) const

Check cell determinant.

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.

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.

static scalar setClosedThreshold ( const   scalar  )  [static]

Set the closedness ratio warning threshold.

static scalar setAspectThreshold ( const   scalar  )  [static]

Set the aspect ratio warning threshold.

static scalar setNonOrthThreshold ( const   scalar  )  [static]

Set the non-orthogonality warning threshold in degrees.

static scalar setSkewThreshold ( const   scalar  )  [static]

Set the skewness warning threshold as percentage.

of the face area vector

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.

Reimplemented in polyMesh.

void clearAddressing (  ) 

Clear topological data.

Reimplemented in polyMesh.

void clearOut (  ) 

Clear all geometry and addressing unnecessary for CFD.

Reimplemented in polyMesh, and fvMesh.

void clearPrimitives (  ) 

Clear primitive data. Access to points and faces.

will be denied

Reimplemented in polyMesh.

void clearAll (  ) 

Clear everyting primitive, geometry and addressing.


Member Data Documentation

const unsigned cellsPerEdge_ = 4 [static]

Estimated number of cells per edge.

Definition at line 323 of file primitiveMesh.H.

const unsigned cellsPerPoint_ = 8 [static]

Estimated number of cells per point.

Definition at line 326 of file primitiveMesh.H.

const unsigned facesPerCell_ = 6 [static]

Estimated number of faces per cell.

Definition at line 329 of file primitiveMesh.H.

const unsigned facesPerEdge_ = 4 [static]

Estimated number of faces per edge.

Definition at line 332 of file primitiveMesh.H.

const unsigned facesPerPoint_ = 12 [static]

Estimated number of faces per point.

Definition at line 335 of file primitiveMesh.H.

const unsigned edgesPerCell_ = 12 [static]

Estimated number of edges per cell.

Definition at line 338 of file primitiveMesh.H.

const unsigned edgesPerFace_ = 4 [static]

Estimated number of edges per cell.

Definition at line 341 of file primitiveMesh.H.

const unsigned edgesPerPoint_ = 6 [static]

Estimated number of edges per point.

Definition at line 344 of file primitiveMesh.H.

const unsigned pointsPerCell_ = 8 [static]

Estimated number of points per cell.

Definition at line 347 of file primitiveMesh.H.

const unsigned pointsPerFace_ = 4 [static]

Estimated number of points per face.

Definition at line 350 of file primitiveMesh.H.


The documentation for this class was generated from the following files: Copyright © 2000-2007 OpenCFD Ltd