51 cellShapesPtr_(nullptr),
69 cellCentresPtr_(nullptr),
70 faceCentresPtr_(nullptr),
71 cellVolumesPtr_(nullptr),
72 faceAreasPtr_(nullptr),
73 magFaceAreasPtr_(nullptr)
80 const label nInternalFaces,
88 nInternalFaces_(nInternalFaces),
92 cellShapesPtr_(
nullptr),
110 cellCentresPtr_(
nullptr),
111 faceCentresPtr_(
nullptr),
112 cellVolumesPtr_(
nullptr),
113 faceAreasPtr_(
nullptr),
114 magFaceAreasPtr_(
nullptr)
130 label& nInternalPoints,
133 const label nInternalFaces,
147 label nBoundaryPoints = 0;
148 for (
label facei = nInternalFaces; facei < faces.
size(); facei++)
150 const face&
f = faces[facei];
154 label pointi = f[fp];
156 if (oldToNew[pointi] == -1)
158 oldToNew[pointi] = nBoundaryPoints++;
165 nInternalPoints = nPoints - nBoundaryPoints;
170 if (oldToNew[pointi] != -1)
180 label internalPointi = 0;
186 const face&
f = faces[facei];
190 label pointi = f[fp];
192 if (oldToNew[pointi] == -1)
194 if (pointi >= nInternalPoints)
198 oldToNew[pointi] = internalPointi++;
210 const label nInternalFaces,
219 nInternal0Edges_ = -1;
220 nInternal1Edges_ = -1;
221 nInternalEdges_ = -1;
246 nInternalPoints_ = -1;
251 Pout<<
"primitiveMesh::reset : mesh reset to" 252 <<
" nInternalPoints:" << nInternalPoints_
253 <<
" nPoints:" << nPoints_
254 <<
" nEdges:" << nEdges_
255 <<
" nInternalFaces:" << nInternalFaces_
256 <<
" nFaces:" << nFaces_
257 <<
" nCells:" << nCells_
266 const label nInternalFaces,
287 const label nInternalFaces,
314 <<
"Cannot move points: size of given point list smaller " 315 <<
"than the number of active points" 327 sweptVols[facei] = f[facei].sweptVol(oldPoints, newPoints);
344 return *cellShapesPtr_;
#define forAll(list, i)
Loop across all elements in list.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label nInternalFaces() const
T & ref() const
Return non-const reference or generate a fatal error.
label nInternalPoints() const
Points not on boundary.
void size(const label)
Override size to be inconsistent with allocated storage.
const cellShapeList & cellShapes() const
Return cell shapes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
primitiveMesh()
Construct null.
void clearGeom()
Clear geometry.
tmp< scalarField > movePoints(const pointField &p, const pointField &oldP)
Move points, returns volumes swept by faces in motion.
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.
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.
prefixOSstream Pout(cout, "Pout")
virtual const faceList & faces() const =0
Return faces.
A class for managing temporary objects.
static bool calcPointOrder(label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
Helper function to calculate point ordering. Returns true.
List< cell > cellList
list of cells