Go to the documentation of this file.
76 const word& modelName,
117 p[i] = meshPoints[operator[](i)];
142 labelList modelToMesh(localFaces.size(), -1);
146 const face& localF = localFaces[i];
150 label meshFacei = cFaces[j];
152 if (allFaces[meshFacei] == localF)
154 modelToMesh[i] = meshFacei;
176 labelList modelToMesh(localEdges.size(), -1);
180 const edge&
e = localEdges[i];
184 label edgeI = cEdges[j];
186 if (allEdges[edgeI] ==
e)
188 modelToMesh[i] = edgeI;
201 return m->faces(*
this);
212 forAll(oldFaces, oldFacei)
214 const face&
f = oldFaces[oldFacei];
216 face& newF = newFaces[newFacei];
221 label prevVertI = -1;
227 if (vertI != prevVertI)
229 newF[newFp++] = vertI;
235 if ((newFp > 1) && (newF[newFp-1] == newF[0]))
248 newFaces.setSize(newFacei);
262 return m->edges(*
this);
286 return m->mag(*
this,
points);
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
List< label > labelList
A List of labels.
A class for handling words, derived from Foam::string.
point centre(const UList< point > &points) const
Centroid of the cell.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
labelList meshFaces(const faceList &allFaces, const cell &cFaces) const
Mesh face labels of this cell (in order of model)
faceList faces() const
Faces of this cell.
static const cellModel * ptr(const modelType model)
Look up pointer to cellModel by enumeration, or nullptr on failure.
#define forAll(list, i)
Loop across all elements in list.
labelList meshEdges(const edgeList &allEdges, const labelList &cEdges) const
Mesh edge labels of this cell (in order of model)
pointField points(const UList< point > &meshPoints) const
Return the points corresponding to this cellShape.
edgeList edges() const
Edges of this cellShape.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
autoPtr< cellShape > clone() const
Clone.
const Vector< Cmpt > & centre(const Foam::List< Vector< Cmpt >> &) const
Return *this (used for point which is a typedef to Vector<scalar>.
cellShape()
Construct null.
scalar mag(const UList< point > &points) const
Scalar magnitude.
label nFaces() const
Number of faces.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
label nEdges() const
Number of edges.
const dimensionedScalar e
Elementary charge.
label nPoints() const
Number of points.
faceList collapsedFaces() const
Collapsed faces of this cell.
A face is a list of labels corresponding to mesh vertices.
Maps a geometry to a set of cell primitives.
void setSize(const label newSize)
Alias for resize(const label)
A cell is defined as a list of faces with extra functionality.
const cellModel & model() const
Model reference.