33void Foam::primitiveMesh::calcPointPoints()
const
37 Pout<<
"primitiveMesh::calcPointPoints() : "
38 <<
"calculating pointPoints"
55 <<
"pointPoints already calculated"
63 ppPtr_ = std::make_unique<labelListList>(pe.size());
68 pp[pointi].setSize(pe[pointi].size());
72 if (
e[pe[pointi][ppi]].start() == pointi)
74 pp[pointi][ppi] =
e[pe[pointi][ppi]].end();
76 else if (
e[pe[pointi][ppi]].
end() == pointi)
78 pp[pointi][ppi] =
e[pe[pointi][ppi]].start();
83 <<
"something wrong with edges"
108 DynamicList<label>& storage
111 if (hasPointPoints())
113 return pointPoints()[pointi];
117 const edgeList& edges = this->edges();
118 const labelList& pEdges = pointEdges()[pointi];
122 if (storage.capacity() < pEdges.size())
124 storage.setCapacity(pEdges.size());
127 for (
const label edgei : pEdges)
129 storage.push_back(edges[edgei].otherVertex(pointi));
142 return pointPoints(pointi, labels_);
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void push_back(const T &val)
Copy append an element to the end of this list.
label capacity() const noexcept
Size of the underlying storage.
void setCapacity(const label len)
Alter the size of the underlying storage.
void size(const label n)
Older name for setAddressableSize.
bool hasPointPoints() const noexcept
const labelListList & pointEdges() const
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const labelListList & pointPoints() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edge > edgeList
List of edge.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
#define forAll(list, i)
Loop across all elements in list.