60 <<
"primitive face zone patch already calculated"
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.."
200 masterCellsPtr_(nullptr),
201 slaveCellsPtr_(nullptr),
221 masterCellsPtr_(nullptr),
222 slaveCellsPtr_(nullptr),
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);
406 newAddressing[nFaces] =
faceMap[facei];
407 newFlipMap[nFaces] = flipMap_[i];
415 transfer(newAddressing);
416 flipMap_.transfer(newFlipMap);
434 const polyMesh& mesh = meshZones().mesh();
437 bool hasError =
false;
448 const label facei = operator[](i);
463 const label facei = operator[](i);
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&");
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
const word & name() const
Return name.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
label size() const
Return the number of elements in the UList.
void size(const label)
Override size to be inconsistent with allocated storage.
void operator=(const UList< label > &)
Assignment to UList operator. Takes linear time.
void setSize(const label)
Reset size of List.
const MeshType & mesh() const
Return the mesh reference.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of faces which address into the list of points.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A subset of mesh faces organised as a primitive patch.
virtual bool checkDefinition(const bool report=false) const
Check zone definition. Return true if in error.
const boolList & flipMap() const
Return face flip map.
const meshFaceZones & meshZones() const
Return meshZones reference.
virtual void write(Ostream &) const
Write.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
void operator=(const faceZone &)
Assignment to zone, clearing demand-driven data.
boolList flipMap_
Flip map for all faces in the zone. Set to true if the.
faceZone(const word &name, const labelUList &addr, const boolList &fm, const label index, const meshFaceZones &mz)
Construct from components.
const labelList & masterCells() const
Return labels of master cells (cells next to the master face.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void resetAddressing(const labelUList &, const boolList &)
Reset addressing and flip map (clearing demand-driven data)
void calcCellLayers() const
Calculate master and slave face layer.
void calcFaceZonePatch() const
Build primitive patch.
void checkAddressing() const
Check addressing.
const primitiveFacePatch & operator()() const
Return reference to primitive patch.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
static const char *const labelsName
The name associated with the zone-labels dictionary entry.
virtual void writeDict(Ostream &) const
Write dictionary.
virtual void clearAddressing()
Clear addressing.
virtual ~faceZone()
Destructor.
virtual void movePoints(const pointField &)
Correct patch after moving points.
primitiveFacePatch * patchPtr_
Primitive patch made out of correctly flipped faces.
virtual bool checkParallelSync(const bool report=false) const
Check whether all procs have faces synchronised. Return.
const labelList & slaveCells() const
Return labels of slave cells.
const labelList & meshEdges() const
Return global edge index for local edges.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & reverseFaceMap() const
Reverse face map.
label nInternalFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
A class for handling words, derived from string.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.
label localID(const label globalID) const
Map storing the local index for every global index. Used to find.
virtual void clearAddressing()
Clear addressing.
void operator=(const zone &)
Assignment operator.
Template functions to aid in the implementation of demand driven data.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
List< label > labelList
A List of labels.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
void deleteDemandDrivenData(DataPtr &dataPtr)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(combustionModel, 0)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
prefixOSstream Pout(cout, "Pout")
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
Ostream & operator<<(Ostream &, const ensightPart &)
word name(const complex &)
Return a string representation of a complex.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)