51 auto* ctorPtr = wordConstructorTable(
type);
59 *wordConstructorTablePtr_
87 label facei =
pFaces[pFacei];
96 vertFaces[vertFacei++] = facei;
99 vertFaces.setSize(vertFacei);
115 label edgeI = fEdges[fEdgeI];
119 if ((
e.start() == vertI) || (
e.end() == vertI))
126 <<
"Can not find edge on face " << facei
127 <<
" using vertex " << vertI
150 label edgeI = pEdges[pEdgeI];
154 !exclEdges.
found(edgeI)
158 vertEdges[vertEdgeI++] = edgeI;
177 scalar maxCos = -GREAT;
181 label edgeI = cEdges[cEdgeI];
185 if (cosAngle > maxCos)
const labelListList & cellEdges() const
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
const labelListList & faceEdges() const
label getFirstVertEdge(const label facei, const label vertI) const
Get first edge connected to vertI and on facei.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelListList & pointEdges() const
bool found(const T &val, label pos=0) const
Same as contains()
Abstract base class. Concrete implementations know how to cut a cell (i.e. determine a loop around th...
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
labelList getVertFacesNonEdge(const label celli, const label edgeI, const label vertI) const
Get faces (on cell) connected to vertI which are not using edgeI.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
label getMisAlignedEdge(const vector &refDir, const label celli) const
Return edge from cellEdges that is most perpendicular.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A class for handling words, derived from Foam::string.
Combines edge or vertex in single label. Used to specify cuts across cell circumference.
labelList getVertEdgesNonFace(const label celli, const label facei, const label vertI) const
Get edges (on cell) connected to vertI which are not on facei.
errorManip< error > abort(error &err)
const polyMesh & mesh() const
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=cellModel::ref(cellModel::HEX);labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells].reset(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const labelListList & pointFaces() const
cellLooper(const cellLooper &)=delete
No copy construct.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
static autoPtr< cellLooper > New(const word &type, const polyMesh &mesh)
Return a reference to the selected cellLooper.