Go to the documentation of this file.
52 const label startFaceI,
53 const label startEdgeI,
59 label faceI = startFaceI;
61 label edgeI = startEdgeI;
69 Pout<<
" walkHex : inserting cut onto edge:" << edgeI
70 <<
" vertices:" <<
mesh().edges()[edgeI] <<
endl;
74 loop[cutI] = edgeToEVert(edgeI);
75 loopWeights[cutI] = 0.5;
85 if (edgeI == startEdgeI)
95 Pout<<
"hexCellLooper::walkHex" <<
"Problem : cell:" << cellI
96 <<
" collected loop:";
97 writeCuts(
Pout, loop, loopWeights);
98 Pout<<
"loopWeights:" << loopWeights <<
endl;
119 facePoints.setSize(loop.
size());
136 loopWeights[cutI]*v1 + (1.0-loopWeights[cutI])*v0;
142 facePoints[cutI] =
mesh().points()[vertI];
145 faceVerts[cutI] = cutI;
195 loopWeights.setSize(4);
197 success = walkHex(cellI, face0, edgeI, loop, loopWeights);
219 <<
"could not cut cell " << cellI <<
endl;
221 fileName cutsFile(
"hexCellLooper_" +
name(cellI) +
".obj");
223 Pout<<
"hexCellLooper : writing cell to " << cutsFile <<
endl;
244 label elem = loop[elemI];
246 if (loopSet.
found(elem))
258 makeFace(loop, loopWeights, faceVerts, facePoints);
260 if ((faceVerts.
mag(facePoints) < SMALL) || (loop.
size() < 3))
263 <<
" on points:" << facePoints <<
endl
275 const plane& cutPlane,
const cellShapeList & cellShapes
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.
A class for handling file names.
List< label > labelList
A List of labels.
scalar mag(const pointField &) const
Magnitude of face area.
#define forAll(list, i)
Loop across all elements in list.
bool walkHex(const label cellI, const label startFaceI, const label startEdgeI, labelList &loop, scalarField &loopWeights) const
Walk across faces of hex. Update loop/loopWeights with edges cut.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
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.
virtual ~hexCellLooper()
Destructor.
Mesh consisting of general polyhedral cells.
void makeFace(const labelList &loop, const scalarField &loopWeights, labelList &faceVerts, pointField &facePoints) const
Convert loop into face and points.
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
A static collection of cell models, and a means of looking them up.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
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.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
hexCellLooper(const hexCellLooper &)
Disallow default bitwise copy construct.
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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...
const dimensionedScalar e
Elementary charge.
bool insert(const Key &key)
Insert a new entry.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
Various functions to operate on Lists.
void size(const label)
Override size to be inconsistent with allocated storage.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.
stressControl lookup("compactNormalStress") >> compactNormalStress
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.