33void Foam::primitiveMesh::calcCellCells()
const
39 Pout<<
"primitiveMesh::calcCellCells() : calculating cellCells"
56 <<
"cellCells already calculated"
75 ccPtr_ = std::make_unique<labelListList>(ncc.size());
76 auto& cellCellAddr = *ccPtr_;
81 forAll(cellCellAddr, celli)
83 cellCellAddr[celli].resize(ncc[celli]);
89 label ownCelli = own[facei];
90 label neiCelli = nei[facei];
92 cellCellAddr[ownCelli][ncc[ownCelli]++] = neiCelli;
93 cellCellAddr[neiCelli][ncc[neiCelli]++] = ownCelli;
115 DynamicList<label>& storage
120 return cellCells()[celli];
130 for (
const label facei : cFaces)
132 if (facei < nInternalFaces())
134 if (own[facei] == celli)
136 storage.push_back(nei[facei]);
140 storage.push_back(own[facei]);
152 return cellCells(celli, labels_);
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.
void clear()
Clear the list, i.e. set size to zero.
A cell is defined as a list of faces with extra functionality.
bool hasCellCells() const noexcept
virtual const labelList & faceOwner() const =0
Face face-owner addressing.
virtual const labelList & faceNeighbour() const =0
Face face-neighbour addressing.
label nInternalFaces() const noexcept
Number of internal faces.
const labelListList & cellCells() const
label nCells() const noexcept
Number of mesh cells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.