33 void Foam::CFCCellToCellStencil::calcFaceBoundaryData
47 label facei = pp.start();
59 else if (isA<emptyPolyPatch>(pp))
64 neiGlobal[bFacei] = -1;
84 void Foam::CFCCellToCellStencil::calcCellStencil
89 const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
90 const labelList& own = mesh().faceOwner();
91 const labelList& nei = mesh().faceNeighbour();
98 calcFaceBoundaryData(neiGlobal);
104 globalCellCells.setSize(mesh().nCells());
105 forAll(globalCellCells, celli)
107 const cell& cFaces = mesh().cells()[celli];
109 labelList& cCells = globalCellCells[celli];
111 cCells.
setSize(cFaces.size()+1);
116 cCells[nNbr++] = globalNumbering().toGlobal(celli);
121 label facei = cFaces[i];
123 if (mesh().isInternalFace(facei))
125 label nbrCelli = own[facei];
126 if (nbrCelli == celli)
128 nbrCelli = nei[facei];
130 cCells[nNbr++] = globalNumbering().toGlobal(nbrCelli);
134 label nbrCelli = neiGlobal[facei-mesh().nInternalFaces()];
137 cCells[nNbr++] = nbrCelli;
141 cCells.setSize(nNbr);
153 calcCellStencil(*
this);
#define forAll(list, i)
Loop across all elements in list.
CFCCellToCellStencil(const polyMesh &mesh)
Construct from mesh.
void setSize(const label)
Reset size of List.
baseclass for extended cell centred addressing. Contains per cell a list of neighbouring cells and/or...
const globalIndex & globalNumbering() const
Global numbering for cells and boundary faces.
const polyMesh & mesh() const
label toGlobal(const label i) const
From local to global.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label nInternalFaces() const
const fvPatchList & patches
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< labelList > labelListList
A List of labelList.