Go to the documentation of this file.
48 const cell&
c = mesh_.cells()[cellI];
53 faceEdges.setSize(
c.size());
58 faceEdges[feI].setSize(faces[
c[feI]].size());
64 const face&
f = faces[
c[fI]];
68 const edge e =
f.faceEdge(eI);
72 if( vrt[vI] ==
f[eI] )
89 faceEdges[fI][eI] = eJ;
90 edgeFaces[eJ].append(fI);
96 faceEdges[fI][eI] = edges.
size();
107 if( edgeFaces[efI].size() != 2 )
110 Info <<
"Face " <<
c[fI] <<
" is " << faces[
c[fI]] <<
endl;
113 Info <<
"faceEdges " << faceEdges <<
endl;
114 Info <<
"edgeFaces " << edgeFaces <<
endl;
118 "void decomposeCells::findAddressingForCell"
119 "(const label, DynList<label, 32>&, DynList<edge, 64>&"
120 ", DynList<DynList<label, 8> >&"
121 ", DynList<DynList<label, 2>, 64>&) const"
122 ) <<
"Cell " << cellI <<
" is not topologically closed!"
135 const cell&
c = mesh_.cells()[cellI];
147 p += pointsAccess[
cp[cpI]];
150 topVertex = pointsAccess.
size();
153 # ifdef DEBUGDecompose
154 Info <<
"Top vertex is " << topVertex <<
endl;
168 # ifdef DEBUGDecompose
169 Info <<
"Starting decomposing cell " << cellI <<
endl;
170 Info <<
"Cell consists of faces " <<
c <<
endl;
172 Info <<
"Face " <<
c[fI] <<
" is " << faces[
c[fI]] <<
endl;
191 # ifdef DEBUGDecompose
192 Info <<
"Face " << faces[
c[fI]] <<
" is a base face" <<
endl;
194 const face&
f = faces[
c[fI]];
202 triFaces[pI][0] =
f.nextLabel(pI);
203 triFaces[pI][1] =
f[pI];
204 triFaces[pI][2] = topVertex;
208 if( owner[
c[fI]] == cellI )
210 cellFaces[cfI++] = faces[
c[fI]];
214 cellFaces[cfI++] = triFaces[tfI];
219 cellFaces[cfI++] = faces[
c[fI]].reverseFace();
224 rf[0] = triFaces[tfI][0];
225 rf[1] = triFaces[tfI][2];
226 rf[2] = triFaces[tfI][1];
227 cellFaces[cfI++] = rf;
231 # ifdef DEBUGDecompose
232 Info <<
"Cell for face is " << cellFaces <<
endl;
241 const edge e(
f[eI],
f[(eI+1)%
f.size()]);
260 if( eFaces[eI].size() != 2 )
261 Pout <<
"This pyrmid is not topologically closed" <<
endl;
const labelList & owner() const
owner and neighbour cells for faces
VRWGraphList facesOfNewCells_
#define forAll(list, i)
Loop across all elements in list.
label findTopVertex(const label cellI, const DynList< label, 32 > &vrt, const DynList< edge, 64 > &edges, const DynList< DynList< label, 2 >, 64 > &edgeFaces)
find the apex of the pyramids
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.
bool cp(const fileName &src, const fileName &dst)
Copy, recursively if necessary, the source to the destination.
bool contains(const T &e) const
check if the element is in the list (takes linear time)
void appendGraph(const GraphType &l)
Append a graph at the end of the graphList.
const faceListPMG & faces() const
access to faces
polyMeshGen & mesh_
reference to the mesh
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual Ostream & write(const token &)=0
Write next token to stream.
const cellListPMG & cells() const
access to cells
label size() const
return the number of used elements
void decomposeCellIntoPyramids(const label cellI)
errorManip< error > abort(error &err)
void append(const point &)
add a point at the end of the list
const double e
Elementary charge.
void findAddressingForCell(const label cellI, DynList< label, 32 > &vrt, DynList< edge, 64 > &edges, DynList< DynList< label, 8 > > &faceEdges, DynList< DynList< label, 2 >, 64 > &edgeFaces) const
create addressing needed to decompose the cell
A triangular face using a FixedList of labels corresponding to mesh vertices.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(const label)
Reset size of List.
const dimensionedScalar c
Speed of light in a vacuum.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
A cell is defined as a list of faces with extra functionality.
void clear()
Clear the list, i.e. set next free to zero.
void append(const T &e)
Append an element at the end of the list.
dimensionedScalar pos(const dimensionedScalar &ds)