33 void Foam::polyMesh::initMesh()
39 if (neighbour_.
size() == owner_.
size())
45 if (neighbour_[facei] == -1)
62 if (owner_[facei] < 0)
65 <<
"Illegal cell label " << owner_[facei]
66 <<
" in owner addressing for face " << facei
75 if (neighbour_[facei] < 0)
78 <<
"Illegal cell label " << neighbour_[facei]
79 <<
" in neighbour addressing for face " << facei
104 owner_.
note() = meshInfo;
105 neighbour_.
note() = meshInfo;
109 void Foam::polyMesh::initMesh(
cellList&
c)
113 owner_.setSize(faces_.size(), -1);
114 neighbour_.setSize(faces_.size(), -1);
116 boolList markedFaces(faces_.size(),
false);
118 label nInternalFaces = 0;
127 if (cellfaces[facei] < 0)
130 <<
"Illegal face label " << cellfaces[facei]
131 <<
" in cell " << celli
135 if (!markedFaces[cellfaces[facei]])
138 owner_[cellfaces[facei]] = celli;
139 markedFaces[cellfaces[facei]] =
true;
144 neighbour_[cellfaces[facei]] = celli;
153 neighbour_.setSize(nInternalFaces);
165 const string meshInfo
170 +
" nInternalFaces:" +
Foam::name(this->nInternalFaces())
173 owner_.note() = meshInfo;
174 neighbour_.note() = meshInfo;
void size(const label n)
Older name for setAddressableSize.
List< cell > cellList
List of cell.
errorManipArg< error, int > exit(error &err, const int errNo=1)
label nPoints() const noexcept
Number of mesh points.
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.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const string & note() const noexcept
Return the optional note.
label nFaces() const noexcept
Number of mesh faces.
#define forAll(list, i)
Loop across all elements in list.
void setSize(const label n)
Alias for resize()
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define DebugInFunction
Report an information message using Foam::Info.
label nInternalFaces() const noexcept
Number of internal faces.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
label nCells() const noexcept
Number of mesh cells.
const dimensionedScalar c
Speed of light in a vacuum.
List< label > labelList
A List of labels.
List< bool > boolList
A List of bools.