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" 75 Foam::pointToFace::pointActionNames_
77 { pointAction::ANY,
"any" },
78 { pointAction::ALL,
"all" },
79 { pointAction::EDGE,
"edge" },
85 template<
class Selector>
86 void Foam::pointToFace::combineImpl
103 else if (option_ ==
ALL)
114 for (
const label facei :
pFaces)
116 ++(numPoints(facei, 0));
125 const label facei = iter.key();
126 const label
count = iter.val();
134 else if (option_ ==
EDGE)
140 const face&
f = faces[facei];
159 void Foam::pointToFace::combine
187 const polyMesh&
mesh,
189 const pointAction option
192 topoSetFaceSource(
mesh),
201 const polyMesh&
mesh,
202 const dictionary&
dict 208 option_(pointActionNames_.
get(
"option",
dict))
219 names_(
Foam::
one{}, word(checkIs(is))),
221 option_(pointActionNames_.read(checkIs(is)))
237 Info<<
" Adding faces according to point " 238 << (isZone_ ?
"zones: " :
"sets: ")
242 for (
const word& setName : names_)
251 Info<<
" Removing faces according to point " 252 << (isZone_ ?
"zones: " :
"sets: ")
256 for (
const word& setName : names_)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void size(const label n)
Older name for setAddressableSize.
labelList pointLabels(nPoints, -1)
Create a new set and ADD elements to it.
Add elements to current set.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
pointToFace(const polyMesh &mesh, const word &setName, const pointAction option)
Construct from components.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
Base class of a source for a topoSet.
#define forAll(list, i)
Loop across all elements in list.
pointAction
Enumeration defining the valid options.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< face > faceList
List of faces.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces...
setAction
Enumeration defining various actions.
virtual const faceList & faces() const
Return raw faces.
const polyMesh & mesh_
Reference to the mesh.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
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]
General set of labels of mesh quantity (points, cells, faces).
Subtract elements from current set.
vector point
Point is a vector.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class with constructor to add usage string to table.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const labelListList & pointFaces() const
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Do not request registration (bool: false)
forAllConstIters(mixture.phases(), phase)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.