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