Go to the documentation of this file.
49 lookupMapPtr_(nullptr)
57 lookupMapPtr_(nullptr)
70 lookupMapPtr_(
nullptr)
83 lookupMapPtr_(
nullptr)
91 const word& labelsName,
101 const zone& origZone,
112 const zone& origZone,
117 zone(origZone.
name(), std::move(addr), index)
139 lookupMapPtr_ =
new Map<label>(2*addr.size());
140 auto& lm = *lookupMapPtr_;
144 lm.insert(addr[i], i);
148 return *lookupMapPtr_;
154 return lookupMap().lookup(globalID, -1);
168 bool hasError =
false;
173 for (
const label idx : addr)
175 if (idx < 0 || idx >= maxSize)
182 <<
"Zone " << this->
name()
183 <<
" contains invalid index label " << idx <<
nl
184 <<
"Valid index labels are 0.."
185 << maxSize-1 <<
endl;
193 else if (!elems.
insert(idx))
198 <<
"Zone " << this->
name()
199 <<
" contains duplicate index label " << idx <<
endl;
211 << nl << static_cast<const labelList&>(*
this);
List< label > labelList
A List of labels.
A class for handling words, derived from Foam::string.
Template functions to aid in the implementation of demand driven data.
Base class for mesh zones.
A HashTable to objects of type <T> with a label key.
virtual void clearAddressing()
Clear addressing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
#define forAll(list, i)
Loop across all elements in list.
void deleteDemandDrivenData(DataPtr &dataPtr)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
virtual void write(Ostream &os) const
Write.
const Map< label > & lookupMap() const
Demand-driven: the look-up map from global to local id.
#define DebugInFunction
Report an information message using Foam::Info.
virtual ~zone()
Destructor.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
const word & name() const noexcept
The zone name.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
label localID(const label globalID) const
Lookup local address in zone for given global index.
Identifies a mesh zone by name and index, with optional physical type and group information.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.