127 const face& localF = localFaces[i];
131 label meshFacei = cFaces[j];
133 if (allFaces[meshFacei] == localF)
135 modelToMesh[i] = meshFacei;
161 const edge&
e = localEdges[i];
165 label edgeI = cEdges[j];
167 if (allEdges[edgeI] == e)
169 modelToMesh[i] = edgeI;
182 return m->
faces(*
this);
193 forAll(oldFaces, oldFacei)
195 const face&
f = oldFaces[oldFacei];
197 face& newF = newFaces[newFacei];
202 label prevVertI = -1;
208 if (vertI != prevVertI)
210 newF[newFp++] = vertI;
216 if ((newFp > 1) && (newF[newFp-1] == newF[0]))
229 newFaces.setSize(newFacei);
243 return m->
edges(*
this);
261 return m->
centre(*
this, points);
267 return m->
mag(*
this, points);
scalar mag(const pointField &) const
Scalar magnitude.
label nFaces() const
Return number of faces.
#define forAll(list, i)
Loop across all elements in list.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
labelList meshFaces(const faceList &allFaces, const cell &) const
Mesh face labels of this cell (in order of model)
A face is a list of labels corresponding to mesh vertices.
T & operator[](const label)
Return element of UList.
void collapse()
Collapse shape to correct one after removing duplicate vertices.
label nEdges() const
Return number of edges.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
vector centre(const labelList &pointLabels, const pointField &points) const
Vector centroid.
autoPtr< cellShape > clone() const
Clone.
pointField points(const pointField &meshPoints) const
Return the points corresponding to this cellShape.
labelList meshEdges(const edgeList &allEdges, const labelList &) const
Mesh edge labels of this cell (in order of model)
faceList faces() const
Faces of this cell.
cellShape()
Construct null.
label nEdges() const
Number of edges.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A class for handling words, derived from string.
List< label > labelList
A List of labels.
faceList collapsedFaces() const
Collapsed faces of this cell.
edgeList edges() const
Edges of this cellShape.
void setSize(const label)
Reset size of List.
const cellModel & model() const
Model reference.
scalar mag(const labelList &pointLabels, const pointField &points) const
Cell volume.
A cell is defined as a list of faces with extra functionality.
point centre(const pointField &) const
Centroid of the cell.
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
edgeList edges(const labelList &pointLabels) const
Return list of edges.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const doubleScalar e
Elementary charge.
label nFaces() const
Number of faces.
label size() const
Return the number of elements in the UList.
label nPoints() const
Number of points.
faceList faces(const labelList &pointLabels) const
Return list of faces.