Go to the documentation of this file.
33 void Foam::polyMesh::initMesh()
42 if (neighbour_.size() == owner_.size())
48 if (neighbour_[facei] == -1)
65 if (owner_[facei] < 0)
68 <<
"Illegal cell label " << owner_[facei]
69 <<
" in neighbour addressing for face " << facei
78 if (neighbour_[facei] < 0)
81 <<
"Illegal cell label " << neighbour_[facei]
82 <<
" in neighbour addressing for face " << facei
107 owner_.
note() = meshInfo;
108 neighbour_.
note() = meshInfo;
112 void Foam::polyMesh::initMesh(
cellList&
c)
119 owner_.setSize(faces_.size(), -1);
120 neighbour_.setSize(faces_.size(), -1);
122 boolList markedFaces(faces_.size(),
false);
124 label nInternalFaces = 0;
133 if (cellfaces[facei] < 0)
136 <<
"Illegal face label " << cellfaces[facei]
137 <<
" in cell " << celli
141 if (!markedFaces[cellfaces[facei]])
144 owner_[cellfaces[facei]] = celli;
145 markedFaces[cellfaces[facei]] =
true;
150 neighbour_[cellfaces[facei]] = celli;
159 neighbour_.setSize(nInternalFaces);
171 const string meshInfo
176 +
" nInternalFaces:" +
Foam::name(this->nInternalFaces())
179 owner_.note() = meshInfo;
180 neighbour_.note() = meshInfo;
int debug
Static debugging option.
List< label > labelList
A List of labels.
#define InfoInFunction
Report an information message using Foam::Info.
label nInternalFaces() const
Number of internal faces.
label nFaces() const
Number of mesh faces.
List< bool > boolList
A List of bools.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
label nCells() const
Number of mesh cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const complex &c)
Return string representation of complex.
List< cell > cellList
A List of cells.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const string & note() const
Return the optional note.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label nPoints() const
Number of mesh points.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
const dimensionedScalar c
Speed of light in a vacuum.
void setSize(const label newSize)
Alias for resize(const label)