52 Info<<
"void faceZone::calcFaceZonePatch() const : " 53 <<
"Calculating primitive patch" 61 "void faceZone::calcFaceZonePatch() const" 62 ) <<
"primitive face zone patch already calculated" 75 const faceList&
f = zoneMesh().mesh().faces();
84 patch[faceI] = f[addr[faceI]].reverseFace();
88 patch[faceI] = f[addr[faceI]];
94 Info<<
"void faceZone::calcFaceZonePatch() const : " 95 <<
"Finished calculating primitive patch" 105 Info<<
"void Foam::faceZone::calcCellLayers() const : " 106 <<
"calculating master cells" 112 if (masterCellsPtr_ || slaveCellsPtr_)
115 <<
"cell layers already calculated" 123 const labelList& own = zoneMesh().mesh().faceOwner();
124 const labelList& nei = zoneMesh().mesh().faceNeighbour();
128 const boolList& faceFlip = flipMap();
138 label ownCellI = own[mf[faceI]];
141 zoneMesh().mesh().isInternalFace(mf[faceI])
146 if (!faceFlip[faceI])
149 mc[faceI] = neiCellI;
150 sc[faceI] = ownCellI;
154 mc[faceI] = ownCellI;
155 sc[faceI] = neiCellI;
166 if (size() != flipMap_.size())
168 FatalErrorIn(
"void Foam::faceZone::checkAddressing() const")
169 <<
"Different sizes of the addressing and flipMap arrays. " 170 <<
"Size of addressing: " << size()
171 <<
" size of flip map: " << flipMap_.size()
178 const label nFaces = zoneMesh().mesh().faceOwner().
size();
180 bool hasWarned =
false;
183 if (!hasWarned && (mf[i] < 0 || mf[i] >= nFaces))
185 WarningIn(
"void Foam::faceZone::checkAddressing() const")
186 <<
"Illegal face index " << mf[i] <<
" outside range 0.." 206 zone(name, addr, index),
210 masterCellsPtr_(NULL),
211 slaveCellsPtr_(NULL),
227 zone(name, addr, index),
231 masterCellsPtr_(NULL),
232 slaveCellsPtr_(NULL),
247 zone(name, dict, this->labelsName, index),
248 flipMap_(dict.
lookup(
"flipMap")),
251 masterCellsPtr_(NULL),
252 slaveCellsPtr_(NULL),
268 zone(fz, addr, index),
272 masterCellsPtr_(NULL),
273 slaveCellsPtr_(NULL),
289 zone(fz, addr, index),
293 masterCellsPtr_(NULL),
294 slaveCellsPtr_(NULL),
336 if (!masterCellsPtr_)
341 return *masterCellsPtr_;
352 return *slaveCellsPtr_;
385 operator()().meshEdges
387 zoneMesh().
mesh().edges(),
388 zoneMesh().
mesh().pointEdges()
427 boolList newFlipMap(flipMap_.size());
434 const label faceI = operator[](i);
436 if (faceMap[faceI] >= 0)
438 newAddressing[nFaces] = faceMap[faceI];
439 newFlipMap[nFaces] = flipMap_[i];
445 newFlipMap.setSize(nFaces);
447 transfer(newAddressing);
448 flipMap_.transfer(newFlipMap);
463 bool hasError =
false;
474 const label faceI = operator[](i);
489 const label faceI = operator[](i);
492 if (patchI != -1 && bm[patchI].coupled())
497 if (myZoneFace[bFaceI] != neiZoneFace[bFaceI])
503 Pout<<
" ***Problem with faceZone " << index()
504 <<
" named " <<
name()
505 <<
". Face " << faceI
506 <<
" on coupled patch " 508 <<
" is not consistent with its coupled neighbour." 517 else if (myZoneFlip[bFaceI] == neiZoneFlip[bFaceI])
524 Pout<<
" ***Problem with faceZone " << index()
525 <<
" named " <<
name()
526 <<
". Face " << faceI
527 <<
" on coupled patch " 529 <<
" does not have consistent flipMap" 530 <<
" across coupled faces." 551 patchPtr_->movePoints(p);
558 << nl << static_cast<const labelList&>(*this)
568 writeEntry(this->labelsName, os);
580 os.
check(
"Ostream& operator<<(Ostream&, const faceZone&");
void checkAddressing() const
Check addressing.
const pointField & points
virtual ~faceZone()
Destructor.
const labelList & reverseFaceMap() const
Reverse face map.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const labelList & slaveCells() const
Return labels of slave cells.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
void writeEntry(Ostream &) const
Write the UList as a dictionary entry.
word name(const complex &)
Return a string representation of a complex.
virtual void writeDict(Ostream &) const
Write dictionary.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A subset of mesh faces organised as a primitive patch.
const labelList & masterCells() const
Return labels of master cells (cells next to the master face.
const labelList & meshEdges() const
Return global edge index for local edges.
A simple container for copying or transferring objects of type <T>.
void deleteDemandDrivenData(DataPtr &dataPtr)
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual void updateMesh(const mapPolyMesh &)
Update for changes in topology.
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void clearAddressing()
Clear addressing.
virtual void movePoints(const pointField &)
Correct patch after moving points.
Ostream & operator<<(Ostream &, const edgeMesh &)
virtual void write(Ostream &) const
Write.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void setSize(const label)
Reset size of List.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
virtual void clearAddressing()
Clear addressing.
static const char *const labelsName
The name associated with the zone-labels dictionary entry.
label localID(const label globalID) const
Map storing the local index for every global index. Used to find.
const primitiveFacePatch & operator()() const
Return reference to primitive patch.
faceZone(const faceZone &)
Disallow default bitwise copy construct.
void calcCellLayers() const
Calculate master and slave face layer.
static void swapBoundaryFaceList(const polyMesh &mesh, UList< T > &l)
Swap coupled boundary face values.
Macros for easy insertion into run-time selection tables.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Template functions to aid in the implementation of demand driven data.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.
errorManip< error > abort(error &err)
const word & name() const
Return name.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
virtual bool checkParallelSync(const bool report=false) const
Check whether all procs have faces synchronised. Return.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A list of faces which address into the list of points.
label nInternalFaces() const
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
List< label > labelList
A List of labels.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void calcFaceZonePatch() const
Build primitive patch.
virtual void resetAddressing(const labelUList &, const boolList &)
Reset addressing and flip map (clearing demand-driven data)
virtual bool checkDefinition(const bool report=false) const
Check zone definition. Return true if in error.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const faceZoneMesh & zoneMesh() const
Return zoneMesh reference.
defineTypeNameAndDebug(combustionModel, 0)
prefixOSstream Pout(cout,"Pout")
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void operator=(const UList< label > &)
Assignment from UList operator. Takes linear time.