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];
156 if (oldToNew[pointi] == -1)
158 oldToNew[pointi] = nBoundaryPoints++;
165 nInternalPoints =
nPoints - nBoundaryPoints;
170 if (oldToNew[pointi] != -1)
172 oldToNew[pointi] += nInternalPoints;
180 label internalPointi = 0;
184 for (
label facei = 0; facei < nInternalFaces; facei++)
186 const face&
f = faces[facei];
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;
223 nInternalFaces_ = nInternalFaces;
228 label nInternalPoints;
231 bool isOrdered = calcPointOrder
242 nInternalPoints_ = nInternalPoints;
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.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A face is a list of labels corresponding to mesh vertices.
Cell-face mesh analysis engine.
static bool calcPointOrder(label &nInternalPoints, labelList &pointMap, const faceList &, const label nInternalFaces, const label nPoints)
Helper function to calculate point ordering. Returns true.
primitiveMesh()
Construct null.
virtual ~primitiveMesh()
Destructor.
const cellShapeList & cellShapes() const
Return cell shapes.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
tmp< scalarField > movePoints(const pointField &p, const pointField &oldP)
Move points, returns volumes swept by faces in motion.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< cell > cellList
list of cells
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineTypeNameAndDebug(combustionModel, 0)
prefixOSstream Pout(cout, "Pout")