49 lookupMapPtr_(nullptr)
57 lookupMapPtr_(nullptr)
70 lookupMapPtr_(nullptr)
83 lookupMapPtr_(nullptr)
91 const word& labelsName,
97 lookupMapPtr_(nullptr)
103 const zone& origZone,
114 const zone& origZone,
142 auto& lm = *lookupMapPtr_;
150 return *lookupMapPtr_;
156 return lookupMap().lookup(globalID, -1);
170 bool hasError =
false;
175 for (
const label idx : addr)
177 if (idx < 0 || idx >= maxSize)
184 <<
"Zone " << this->
name()
185 <<
" contains invalid index label " << idx <<
nl 186 <<
"Valid index labels are 0.." 187 << maxSize-1 <<
endl;
195 else if (!elems.insert(idx))
200 <<
"Zone " << this->
name()
201 <<
" contains duplicate index label " << idx <<
endl;
213 << nl << static_cast<const labelList&>(*this);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual void clearAddressing()
Clear addressing.
void size(const label n)
Older name for setAddressableSize.
label localID(const label globalID) const
Lookup local address in zone for given global index.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
#define forAll(list, i)
Loop across all elements in list.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
virtual ~zone()
Destructor.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Base class for mesh zones.
A class for handling words, derived from Foam::string.
#define DebugInFunction
Report an information message using Foam::Info.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
virtual void write(Ostream &os) const
Write.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Template functions to aid in the implementation of demand driven data.
Identifies a mesh zone by name and index, with optional physical type and group information.
#define WarningInFunction
Report a warning using Foam::Warning.
const Map< label > & lookupMap() const
Demand-driven: the look-up map from global to local id.
void deleteDemandDrivenData(DataPtr &dataPtr)
A HashTable to objects of type <T> with a label key.