42 #ifndef mappedWallPolyPatch_H 43 #define mappedWallPolyPatch_H 103 const word& patchType
141 const word& patchType
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*)
List< labelList > labelListList
A List of labelList.
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects)
word sampleRegion_
Region to sample.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const polyPatch & patch_
Patch to sample.
const polyPatch & lookupPatch(const word &sampleRegion, const word &samplePatch) const
Lookup patch.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual bool masterImplicit() const
Return implicit master.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
const mapDistribute & map() const
Return reference to the parallel distribution map.
TypeName("mappedWall")
Runtime type information.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
virtual void newInternalProcFaces(label &iFaces, label &pFaces) const
Return number of new internal of this polyPatch faces.
virtual word neighbRegionID() const
Return neigh region ID.
const labelUList & faceCells() const
Return face-cell addressing.
A class for handling words, derived from Foam::string.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
mappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const word & name() const noexcept
The patch name.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual ~mappedWallPolyPatch()
Destructor.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
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]
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
sampleMode mode() const noexcept
What to sample.
bool owner() const
Is it owner.
sampleMode
Mesh items to sample.
label start() const
Return start label of this patch in the polyMesh face list.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual label neighbPolyPatchID() const
Return nbr patch ID.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
label index() const noexcept
The index of this patch in the boundaryMesh.
List< label > labelList
A List of labels.
const word & sampleRegion() const
Region to sample.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual refPtr< labelListList > mapCollocatedFaces() const
Return collocated faces map.
virtual const labelUList & nbrCells() const
Return nbrCells.