Go to the documentation of this file.
97 const word& modelName,
134 return labelList::size();
170 labelList modelToMesh(localFaces.size(), -1);
176 for (
const label meshFacei : cFaces)
178 if (allFaces[meshFacei] == localF)
180 modelToMesh[i] = meshFacei;
201 labelList modelToMesh(localEdges.size(), -1);
207 for (
const label edgei : cEdges)
209 if (allEdges[edgei] ==
e)
211 modelToMesh[i] = edgei;
223 return m->
face(modelFacei, *
this);
229 return m->faces(*
this);
246 label prevVerti = -1;
248 for (
const label verti :
f)
250 if (verti != prevVerti)
252 newF[newFp++] = verti;
257 if ((newFp > 1) && (newF[newFp-1] == newF[0]))
269 newFaces.resize(newFacei);
277 return m->
edge(modelEdgei, *
this);
283 return m->edges(*
this);
295 return m->mag(*
this,
points);
303 const bool doCollapse
321 const bool doCollapse
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
A class for handling words, derived from Foam::string.
void resize(const label len)
Adjust allocated size of list.
point centre(const UList< point > &points) const
Centroid of the cell.
constexpr cellShape() noexcept
Default construct. Empty shape, no cell model.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
edge()
Default construct, with invalid point labels (-1)
labelList meshFaces(const faceList &allFaces, const cell &cFaces) const
Mesh face labels of this cell (in order of model)
Foam::face face(const label modelFacei) const
The face for the specified model face.
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
The points corresponding to this shape.
edgeList edges() const
Edges of this shape.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Foam::edge edge(const label modelEdgei) const
The edge for the specified model edge.
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>.
scalar mag(const UList< point > &points) const
Scalar magnitude.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
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.
A 1D vector of objects of type <T> with a fixed length <N>.
const dimensionedScalar e
Elementary charge.
faceList collapsedFaces() const
Collapsed faces of this cell.
label nPoints() const noexcept
Number of points.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
Maps a geometry to a set of cell primitives.
constexpr face() noexcept=default
Default construct.
A cell is defined as a list of faces with extra functionality.
const cellModel & model() const
Model reference.