60 <<
"primitive face zone patch already calculated" 73 const faceList&
f = meshZones().mesh().faces();
82 patch[facei] = f[addr[facei]].reverseFace();
86 patch[facei] = f[addr[facei]];
106 if (masterCellsPtr_ || slaveCellsPtr_)
109 <<
"cell layers already calculated" 117 const labelList& own = meshZones().mesh().faceOwner();
118 const labelList& nei = meshZones().mesh().faceNeighbour();
122 const boolList& faceFlip = flipMap();
132 label ownCelli = own[mf[facei]];
135 meshZones().mesh().isInternalFace(mf[facei])
140 if (!faceFlip[facei])
143 mc[facei] = neiCelli;
144 sc[facei] = ownCelli;
148 mc[facei] = ownCelli;
149 sc[facei] = neiCelli;
158 if (size() != flipMap_.size())
161 <<
"Size of addressing: " << size()
162 <<
" size of flip map: " << flipMap_.size()
169 const label nFaces = meshZones().mesh().faceOwner().size();
171 bool hasWarned =
false;
174 if (!hasWarned && (mf[i] < 0 || mf[i] >= nFaces))
177 <<
"Illegal face index " << mf[i] <<
" outside range 0.." 196 zone(name, addr, index),
200 masterCellsPtr_(
nullptr),
201 slaveCellsPtr_(
nullptr),
217 zone(name, move(addr), index),
221 masterCellsPtr_(
nullptr),
222 slaveCellsPtr_(
nullptr),
237 zone(name, dict, this->labelsName, index),
238 flipMap_(dict.
lookup(
"flipMap")),
241 masterCellsPtr_(
nullptr),
242 slaveCellsPtr_(
nullptr),
258 zone(fz, addr, index),
262 masterCellsPtr_(
nullptr),
263 slaveCellsPtr_(
nullptr),
279 zone(fz, move(addr), index),
283 masterCellsPtr_(
nullptr),
284 slaveCellsPtr_(
nullptr),
326 if (!masterCellsPtr_)
331 return *masterCellsPtr_;
342 return *slaveCellsPtr_;
353 operator()().meshEdges
355 meshZones().
mesh().edges(),
356 meshZones().
mesh().pointEdges()
395 boolList newFlipMap(flipMap_.size());
402 const label facei = operator[](i);
404 if (faceMap[facei] >= 0)
406 newAddressing[nFaces] = faceMap[facei];
407 newFlipMap[nFaces] = flipMap_[i];
413 newFlipMap.setSize(nFaces);
415 transfer(newAddressing);
416 flipMap_.transfer(newFlipMap);
437 bool hasError =
false;
448 const label facei = operator[](i);
463 const label facei = operator[](i);
466 if (patchi != -1 && bm[patchi].coupled())
471 if (myZoneFace[bFacei] != neiZoneFace[bFacei])
477 Pout<<
" ***Problem with faceZone " << index()
478 <<
" named " <<
name()
479 <<
". Face " << facei
480 <<
" on coupled patch " 482 <<
" is not consistent with its coupled neighbour." 491 else if (myZoneFlip[bFacei] == neiZoneFlip[bFacei])
498 Pout<<
" ***Problem with faceZone " << index()
499 <<
" named " <<
name()
500 <<
". Face " << facei
501 <<
" on coupled patch " 503 <<
" does not have consistent flipMap" 504 <<
" across coupled faces." 525 patchPtr_->clearGeom();
532 << nl << static_cast<const labelList&>(*this)
563 flipMap_ = move(zn.flipMap_);
572 os.
check(
"Ostream& operator<<(Ostream&, const faceZone&");
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual void clearAddressing()
Clear addressing.
#define forAll(list, i)
Loop across all elements in list.
virtual void resetAddressing(const labelUList &, const boolList &)
Reset addressing and flip map (clearing demand-driven data)
const word & name() const
Return name.
label localID(const label globalID) const
Map storing the local index for every global index. Used to find.
virtual void writeDict(Ostream &) const
Write dictionary.
void calcFaceZonePatch() const
Build primitive patch.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
label nInternalFaces() const
virtual ~faceZone()
Destructor.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const labelList & masterCells() const
Return labels of master cells (cells next to the master face.
virtual bool checkParallelSync(const bool report=false) const
Check whether all procs have faces synchronised. Return.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual void movePoints(const pointField &)
Correct patch after moving points.
void calcCellLayers() const
Calculate master and slave face layer.
const labelList & reverseFaceMap() const
Reverse face map.
A list of faces which address into the list of points.
A class for handling words, derived from string.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.
void operator=(const faceZone &)
Assignment to zone, clearing demand-driven data.
List< label > labelList
A List of labels.
const labelList & meshEdges() const
Return global edge index for local edges.
void checkAddressing() const
Check addressing.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
virtual void write(Ostream &) const
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
faceZone(const word &name, const labelUList &addr, const boolList &fm, const label index, const meshFaceZones &mz)
Construct from components.
defineTypeNameAndDebug(combustionModel, 0)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
const labelList & slaveCells() const
Return labels of slave cells.
word name(const complex &)
Return a string representation of a complex.
virtual void clearAddressing()
Clear addressing.
static const char *const labelsName
The name associated with the zone-labels dictionary entry.
void operator=(const UList< label > &)
Assignment to UList operator. Takes linear time.
boolList flipMap_
Flip map for all faces in the zone. Set to true if the.
void setSize(const label)
Reset size of List.
Template functions to aid in the implementation of demand driven data.
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
Ostream & operator<<(Ostream &, const ensightPart &)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual bool checkDefinition(const bool report=false) const
Check zone definition. Return true if in error.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
A subset of mesh faces organised as a primitive patch.
const meshFaceZones & meshZones() const
Return meshZones reference.
Class containing mesh-to-mesh mapping information.
void deleteDemandDrivenData(DataPtr &dataPtr)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
void operator=(const zone &)
Assignment operator.
const primitiveFacePatch & operator()() const
Return reference to primitive patch.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define InfoInFunction
Report an information message using Foam::Info.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.