35 Foam::label Foam::directionInfo::findEdge
37 const primitiveMesh&
mesh,
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
63 Foam::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,
106 <<
"Illegal edge label:" << edgeI
107 <<
" when projecting cut edge from cell " << celli
108 <<
" to face " << facei
121 label fpA =
f.
find(
e.start());
122 label fpB =
f.
find(
e.end());
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
208 const directionInfo& rhs
213 os << rhs.index_ << rhs.n_;
219 reinterpret_cast<const char*>(&rhs.index_),
220 sizeof(directionInfo)
237 is >> rhs.index_ >> rhs.n_;
239 else if (!is.checkLabelSize<>() || !is.checkScalarSize<>())
253 reinterpret_cast<char*>(&rhs.index_),
254 sizeof(directionInfo)
void size(const label n)
Older name for setAddressableSize.
virtual Ostream & write(const char c) override
Write character.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar e
Elementary charge.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
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.
virtual const faceList & faces() const
Return raw faces.
errorManip< error > abort(error &err)
label nEdges() const
Number of mesh edges.
label find(const T &val) const
Find index of the first occurrence of the value.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label readRawLabel(Istream &is)
Read raw label from binary stream.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
List< label > labelList
A List of labels.
streamFormat format() const noexcept
Get the current stream format.