Go to the documentation of this file.
51 bool Foam::hexCellLooper::walkHex
54 const label startFacei,
55 const label startEdgeI,
61 label facei = startFacei;
63 label edgeI = startEdgeI;
71 Pout<<
" walkHex : inserting cut onto edge:" << edgeI
77 loopWeights[cutI] = 0.5;
87 if (edgeI == startEdgeI)
97 Pout<<
"hexCellLooper::walkHex" <<
"Problem : cell:" << celli
98 <<
" collected loop:";
100 Pout<<
"loopWeights:" << loopWeights <<
endl;
110 void Foam::hexCellLooper::makeFace
119 facePoints.setSize(loop.size());
120 faceVerts.setSize(loop.size());
124 label
cut = loop[cutI];
128 label edgeI = getEdge(
cut);
136 loopWeights[cutI]*v1 + (1.0-loopWeights[cutI])*v0;
140 label vertI = getVertex(
cut);
145 faceVerts[cutI] = cutI;
188 loopWeights.setSize(4);
190 success = walkHex(celli, face0, edgeI, loop, loopWeights);
212 <<
"could not cut cell " << celli <<
endl;
214 fileName cutsFile(
"hexCellLooper_" +
name(celli) +
".obj");
216 Pout<<
"hexCellLooper : writing cell to " << cutsFile <<
endl;
237 label elem = loop[elemI];
239 if (loopSet.found(elem))
244 loopSet.insert(elem);
248 face faceVerts(loop.size());
251 makeFace(loop, loopWeights, faceVerts, facePoints);
253 if ((faceVerts.mag(facePoints) < SMALL) || (loop.size() < 3))
256 <<
" on points:" << facePoints <<
endl
268 const plane& cutPlane,
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
virtual const pointField & points() const
Return raw points.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A class for handling file names.
virtual bool cut(const vector &refDir, const label celli, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const
Create cut along circumference of celli. Gets current mesh cuts.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
static label edgeToEVert(const primitiveMesh &mesh, const label edgeI)
Convert edgeI to eVert.
word name(const complex &c)
Return string representation of complex.
Implementation of cellLooper. Does pure geometric cut through cell.
Patchify triangles based on orientation w.r.t other (triangulated or triangulatable) surfaces.
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
Output to file stream, using an OSstream.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar e
Elementary charge.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
Various functions to operate on Lists.
Maps a geometry to a set of cell primitives.
virtual bool cut(const vector &refDir, const label celli, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const
Create cut along circumference of celli. Gets current mesh cuts.
vector point
Point is a vector.
Ostream & writeCuts(Ostream &os, const labelList &, const scalarField &) const
Write cut descriptions to Ostream.
void setSize(const label newSize)
Alias for resize(const label)
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
const polyMesh & mesh() const