63 const cellModel& model,
64 const FixedList<label, N>& labels,
80 const cellModel& model,
103 m(cellModel::ptr(model))
116 const bool doCollapse
120 m(cellModel::ptr(model))
131 const word& modelName,
133 const bool doCollapse
137 m(cellModel::ptr(modelName))
204 labelList modelToMesh(localFaces.size(), -1);
210 for (
const label meshFacei : cFaces)
212 if (allFaces[meshFacei] == localF)
214 modelToMesh[i] = meshFacei;
235 labelList modelToMesh(localEdges.size(), -1);
241 for (
const label edgei : cEdges)
243 if (allEdges[edgei] ==
e)
245 modelToMesh[i] = edgei;
257 return m->
face(modelFacei, *
this);
263 return m->faces(*
this);
280 label prevVerti = -1;
282 for (
const label verti :
f)
284 if (verti != prevVerti)
286 newF[newFp++] = verti;
291 if ((newFp > 1) && (newF[newFp-1] == newF[0]))
303 newFaces.resize(newFacei);
311 return m->
edge(modelEdgei, *
this);
317 return m->edges(*
this);
323 return m->centre(*
this,
points);
329 return m->mag(*
this,
points);
337 const bool doCollapse
353 const cellModel& model,
354 const FixedList<label, N>& labels,
355 const bool doCollapse
void size(const label n)
Older name for setAddressableSize.
label nPoints() const noexcept
Number of points.
A face is a list of labels corresponding to mesh vertices.
void resize(const label len)
Adjust allocated size of list.
List< edge > edgeList
List of edge.
void collapse()
Collapse shape to correct one after removing duplicate vertices.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr face() noexcept=default
Default construct.
autoPtr< cellShape > clone() const
Clone.
labelList meshEdges(const edgeList &allEdges, const labelList &cEdges) const
Mesh edge labels of this cell (in order of model)
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
faceList faces() const
Faces of this cell.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
label nEdges() const
Number of edges.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
labelList meshFaces(const faceList &allFaces, const cell &cFaces) const
Mesh face labels of this cell (in order of model)
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
pointField points(const UList< point > &meshPoints) const
The points corresponding to this shape.
Foam::edge edge(const label modelEdgei) const
The edge for the specified model edge.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label size() const noexcept
The number of elements in the container.
faceList collapsedFaces() const
Collapsed faces of this cell.
edgeList edges() const
Edges of this shape.
modelType
Enumeration of commonly used cellModel types.
const cellModel & model() const
Model reference.
A cell is defined as a list of faces with extra functionality.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
Maps a geometry to a set of cell primitives.
edge()
Default construct, with invalid vertex labels (-1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
label nFaces() const
Number of faces.
List< label > labelList
A List of labels.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
constexpr cellShape() noexcept
Default construct. Empty shape, no cell model.
scalar mag(const UList< point > &points) const
Scalar magnitude.
Foam::face face(const label modelFacei) const
The face for the specified model face.
point centre(const UList< point > &points) const
Centroid of the cell.