109 const face& localF = localFaces[i];
113 label meshFacei = cFaces[j];
115 if (allFaces[meshFacei] == localF)
117 modelToMesh[i] = meshFacei;
143 const edge&
e = localEdges[i];
147 label edgeI = cEdges[j];
149 if (allEdges[edgeI] == e)
151 modelToMesh[i] = edgeI;
164 return m->
faces(*
this);
175 forAll(oldFaces, oldFacei)
177 const face&
f = oldFaces[oldFacei];
179 face& newF = newFaces[newFacei];
184 label prevVertI = -1;
190 if (vertI != prevVertI)
192 newF[newFp++] = vertI;
198 if ((newFp > 1) && (newF[newFp-1] == newF[0]))
211 newFaces.setSize(newFacei);
225 return m->
edges(*
this);
243 return m->
centre(*
this, points);
249 return m->
mag(*
this, points);
label nFaces() const
Return number of faces.
const cellModel & model() const
Model reference.
scalar mag(const pointField &) const
Scalar magnitude.
#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.
const double e
Elementary charge.
T & operator[](const label)
Return element of UList.
void collapse()
Collapse shape to correct one after removing duplicate vertices.
label nFaces() const
Number of faces.
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.
label nEdges() const
Number of edges.
faceList faces(const labelList &pointLabels) const
Return list of faces.
scalar mag(const labelList &pointLabels, const pointField &points) const
Cell volume.
vector centre(const labelList &pointLabels, const pointField &points) const
Vector centroid.
faceList collapsedFaces() const
Collapsed faces of this cell.
cellShape()
Construct null.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
autoPtr< cellShape > clone() const
Clone.
edgeList edges(const labelList &pointLabels) const
Return list of edges.
pointField points(const pointField &meshPoints) const
Return the points corresponding to this cellShape.
List< label > labelList
A List of labels.
edgeList edges() const
Edges of this cellShape.
labelList meshFaces(const faceList &allFaces, const cell &) const
Mesh face labels of this cell (in order of model)
label size() const
Return the number of elements in the UList.
void setSize(const label)
Reset size of List.
faceList faces() const
Faces of this cell.
point centre(const pointField &) const
Centroid of the cell.
A cell is defined as a list of faces with extra functionality.
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
label nEdges() const
Return number of edges.
label nPoints() const
Number of points.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
labelList meshEdges(const edgeList &allEdges, const labelList &) const
Mesh edge labels of this cell (in order of model)