Go to the documentation of this file.
56 pointToFace::typeName,
57 "\n Usage: pointToFace <pointSet> any|all|edge\n\n"
58 " Select faces with\n"
59 " -any point in the pointSet\n"
60 " -all points in the pointSet\n\n"
61 " -two consecutive points (an edge) in the pointSet\n\n"
80 const label pointI = iter.key();
98 const label pointI = iter.key();
107 if (fndFace == numPoints.end())
109 numPoints.insert(faceI, 1);
123 const label faceI = iter.key();
136 const face&
f = faces[faceI];
140 if (loadedSet.
found(
f[fp]) && loadedSet.
found(
f.nextLabel(fp)))
176 option_(pointActionNames_.read(
dict.
lookup(
"option")))
188 setName_(checkIs(is)),
189 option_(pointActionNames_.read(checkIs(is)))
209 Info<<
" Adding faces according to pointSet " << setName_
216 Info<<
" Removing faces according to pointSet " << setName_
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
Class with constructor to add usage string to table.
const labelListList & pointFaces() const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
pointAction
Enumeration defining the valid options.
Mesh consisting of general polyhedral cells.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
pointToFace(const polyMesh &mesh, const word &setName, const pointAction option)
Construct from components.
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("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]=cellShape(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]
static addToUsageTable usage_
Add usage string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual ~pointToFace()
Destructor.
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by any number of values (e....
label size() const
Return number of elements in table.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Macros for easy insertion into run-time selection tables.
bool found(const Key &) const
Return true if hashedEntry is found in table.
Base class of a source for a topoSet.
static const NamedEnum< pointAction, 3 > pointActionNames_
virtual const faceList & faces() const
Return raw faces.
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.
void combine(topoSet &set, const bool add) const
Depending on face to cell option add to or delete from cellSet.
void size(const label)
Override size to be inconsistent with allocated storage.
pointAction option_
Option.
defineTypeNameAndDebug(combustionModel, 0)
word setName_
Name of set to use.
void addOrDelete(topoSet &set, const label cellI, const bool) const
Add (if bool) cellI to set or delete cellI from set.
Initialise the NamedEnum HashTable from the static list of names.