Go to the documentation of this file.
62 pointToFace::typeName,
63 "\n Usage: pointToFace <pointSet> any|all|edge\n\n"
64 " Select faces with\n"
65 " -any point in the pointSet\n"
66 " -all points in the pointSet\n\n"
67 " -two consecutive points (an edge) in the pointSet\n\n"
74 Foam::pointToFace::pointActionNames_
76 { pointAction::ANY,
"any" },
77 { pointAction::ALL,
"all" },
78 { pointAction::EDGE,
"edge" },
84 void Foam::pointToFace::combine
92 pointSet loadedSet(
mesh_, setName);
106 else if (option_ ==
ALL)
119 ++(numPoints(facei, 0));
128 const label facei = iter.key();
137 else if (option_ ==
EDGE)
143 const face&
f = faces[facei];
172 names_(
one(), setName),
185 option_(pointActionNames_.get(
"option",
dict))
203 names_(
one(),
word(checkIs(is))),
204 option_(pointActionNames_.read(checkIs(is)))
220 Info<<
" Adding faces according to pointSet "
224 for (
const word& setName : names_)
233 Info<<
" Removing faces according to pointSet "
237 for (
const word& setName : names_)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< label > labelList
A List of labels.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
Class with constructor to add usage string to table.
const labelListList & pointFaces() const
A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are...
setAction
Enumeration defining the valid actions.
Base class of a topoSet source for selecting faces.
pointAction
Enumeration defining the valid options.
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
pointToFace(const polyMesh &mesh, const word &setName, const pointAction option)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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]=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]
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (uses stdout - output is on the master only)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
Subtract elements from the set.
virtual const faceList & faces() const
Return raw faces.
forAllConstIters(mixture.phases(), phase)
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
List< face > faceList
A List of faces.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
vector point
Point is a vector.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
const polyMesh & mesh_
Reference to the mesh.
defineTypeNameAndDebug(combustionModel, 0)
labelList pointLabels(nPoints, -1)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const