Go to the documentation of this file.
57 # pragma omp parallel for schedule(dynamic, 100)
64 Info <<
"Point " << tetI <<
" has coordinates "
66 Info <<
"Tet of origin " << tetI <<
" has nodes "
67 << tets[tetI] <<
endl;
100 cellLabel[pointI] = nCells;
105 Info <<
"Number of cells " << nCells <<
endl;
118 if( cellLabel[
e[0]] < 0 && cellLabel[
e[1]] < 0 )
121 faceLabel[edgeI] = nFaces;
126 Info <<
"Number of mesh faces " << nFaces <<
endl;
136 if( faceLabel[edgeI] < 0 )
139 const label faceI = faceLabel[edgeI];
141 face&
f = faces[faceI];
149 const label cOwn = cellLabel[
e[0]];
150 const label cNei = cellLabel[
e[1]];
152 if( cOwn < 0 || ((cOwn > cNei) && (cNei != -1)) )
155 Info <<
"Reversing face " << cOwn <<
" " << cNei <<
endl;
162 ++nFacesInCell[cOwn];
164 ++nFacesInCell[cNei];
169 Info <<
"Setting cell sizes" <<
endl;
172 cells.setSize(nCells);
173 forAll(nFacesInCell, cellI)
175 cells[cellI].setSize(nFacesInCell[cellI]);
176 nFacesInCell[cellI] = 0;
185 if( faceLabel[edgeI] < 0 )
188 const label faceI = faceLabel[edgeI];
190 const label cOwn = cellLabel[
e[0]];
191 const label cNei = cellLabel[
e[1]];
194 cells[cOwn][nFacesInCell[cOwn]++] = faceI;
196 cells[cNei][nFacesInCell[cNei]++] = faceI;
200 Info <<
"Finished generating cells" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Ostream & endl(Ostream &os)
Add newline and flush stream.
const pointFieldPMG & points() const
access to points
label size() const
Size of the active part of the list.
cellListPMG & cellsAccess()
access to 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.
void clearAddressingData() const
clear addressing data
label size() const
Returns the number of rows.
void setSize(const label nElmts)
set the number of used elements
#define forAllRow(graph, rowI, index)
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
const LongList< point > & tetPoints() const
const double e
Elementary charge.
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A face is a list of labels corresponding to mesh vertices.
faceListPMG & facesAccess()
access to mesh faces
const LongList< partTet > & tets() const