35Foam::label Foam::directionInfo::findEdge
37 const primitiveMesh&
mesh,
38 const labelList& edgeLabels,
43 forAll(edgeLabels, edgeLabelI)
45 label edgeI = edgeLabels[edgeLabelI];
47 if (
mesh.edges()[edgeI] == edge(v0, v1))
54 <<
"Cannot find an edge among " << edgeLabels <<
endl
55 <<
"that uses vertices " << v0
63Foam::label Foam::directionInfo::lowest
71 label a1 = (a + 1) % size;
79 label b1 = (
b + 1) % size;
84 <<
"Problem : a:" << a <<
" b:" <<
b <<
" size:" << size
97 const primitiveMesh&
mesh,
103 if ((edgeI < 0) || (edgeI >=
mesh.nEdges()))
106 <<
"Illegal edge label:" << edgeI
107 <<
" when projecting cut edge from cell " << celli
108 <<
" to face " << facei
121 label fpA =
f.
find(
e.start());
128 return lowest(
f.
size(), fpA, fpB);
164 fpA =
f.
find(e0.start());
165 fpB =
f.
find(e0.end());
167 if ((fpA != -1) && (fpB != -1))
169 return lowest(
f.
size(), fpA, fpB);
182 fpA =
f.
find(e1.start());
183 fpB =
f.
find(e1.end());
185 if ((fpA != -1) && (fpB != -1))
187 return lowest(
f.
size(), fpA, fpB);
191 <<
"Found connected faces " <<
mesh.
faces()[f0I] <<
" and "
193 <<
"But none seems to be connected to face " << facei
205Foam::Ostream& Foam::operator<<
219 reinterpret_cast<const char*
>(&
rhs.index_),
229Foam::Istream& Foam::operator>>
237 is >>
rhs.index_ >>
rhs.n_;
247 reinterpret_cast<char*
>(&
rhs.index_),
streamFormat format() const noexcept
Get the current stream format.
@ ASCII
"ascii" (normal default)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Ostream & write(const char c) override
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
iterator end() noexcept
Return an iterator to end traversing the UList.
void size(const label n)
Older name for setAddressableSize.
label find(const T &val) const
Find index of the first occurrence of the value.
Holds direction in which to split cell (in fact a local coordinate axes). Information is a label and ...
static label edgeToFaceIndex(const primitiveMesh &mesh, const label celli, const label facei, const label edgeI)
Given edge on hex cell find corresponding edge on face. Is either.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
label & end() noexcept
The end (second/last) vertex label.
label start() const noexcept
The start (first) vertex label.
A face is a list of labels corresponding to mesh vertices.
virtual const faceList & faces() const
Return raw faces.
Cell-face mesh analysis engine.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define forAll(list, i)
Loop across all elements in list.