69 cellCentresPtr_(NULL),
70 faceCentresPtr_(NULL),
71 cellVolumesPtr_(NULL),
79 const label nInternalFaces,
87 nInternalFaces_(nInternalFaces),
109 cellCentresPtr_(NULL),
110 faceCentresPtr_(NULL),
111 cellVolumesPtr_(NULL),
128 label& nInternalPoints,
131 const label nInternalFaces,
145 label nBoundaryPoints = 0;
146 for (
label facei = nInternalFaces; facei < faces.
size(); facei++)
148 const face&
f = faces[facei];
152 label pointi = f[fp];
154 if (oldToNew[pointi] == -1)
156 oldToNew[pointi] = nBoundaryPoints++;
163 nInternalPoints = nPoints - nBoundaryPoints;
168 if (oldToNew[pointi] != -1)
178 label internalPointi = 0;
184 const face&
f = faces[facei];
188 label pointi = f[fp];
190 if (oldToNew[pointi] == -1)
192 if (pointi >= nInternalPoints)
196 oldToNew[pointi] = internalPointi++;
208 const label nInternalFaces,
217 nInternal0Edges_ = -1;
218 nInternal1Edges_ = -1;
219 nInternalEdges_ = -1;
244 nInternalPoints_ = -1;
249 Pout<<
"primitiveMesh::reset : mesh reset to" 250 <<
" nInternalPoints:" << nInternalPoints_
251 <<
" nPoints:" << nPoints_
252 <<
" nEdges:" << nEdges_
253 <<
" nInternalFaces:" << nInternalFaces_
254 <<
" nFaces:" << nFaces_
255 <<
" nCells:" << nCells_
264 const label nInternalFaces,
285 const label nInternalFaces,
312 <<
"Cannot move points: size of given point list smaller " 313 <<
"than the number of active points" 325 sweptVols[facei] = f[facei].sweptVol(oldPoints, newPoints);
342 return *cellShapesPtr_;
A simple container for copying or transferring objects of type <T>.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
primitiveMesh()
Construct null.
const cellShapeList & cellShapes() const
Return cell shapes.
void clearGeom()
Clear geometry.
tmp< scalarField > movePoints(const pointField &p, const pointField &oldP)
Move points, returns volumes swept by faces in motion.
label nInternalPoints() const
Points not on boundary.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
prefixOSstream Pout(cout,"Pout")
defineTypeNameAndDebug(combustionModel, 0)
virtual ~primitiveMesh()
Destructor.
void setSize(const label)
Reset size of List.
Template functions to aid in the implementation of demand driven data.
virtual const faceList & faces() const =0
Return faces.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
static bool calcPointOrder(label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
Helper function to calculate point ordering. Returns true.
label nInternalFaces() const
List< cell > cellList
list of cells