Go to the documentation of this file.
65 <<
"Lookup map already calculated" <<
nl
76 lm.insert(addr[i], i);
93 lookupMapPtr_(nullptr)
107 lookupMapPtr_(
nullptr)
121 lookupMapPtr_(
nullptr)
129 const word& labelsName,
136 lookupMapPtr_(
nullptr)
142 const zone& origZone,
148 name_(origZone.
name()),
150 lookupMapPtr_(
nullptr)
156 const zone& origZone,
162 name_(origZone.
name()),
164 lookupMapPtr_(
nullptr)
180 return lookupMap().lookup(globalCellID, -1);
194 bool hasError =
false;
199 for (
const label idx : addr)
201 if (idx < 0 || idx >= maxSize)
209 <<
" contains invalid index label " << idx <<
nl
210 <<
"Valid index labels are 0.."
211 << maxSize-1 <<
endl;
219 else if (!elems.
insert(idx))
225 <<
" contains duplicate index label " << idx <<
endl;
237 << nl << static_cast<const labelList&>(*
this);
int debug
Static debugging option.
List< label > labelList
A List of labels.
#define InfoInFunction
Report an information message using Foam::Info.
A class for handling words, derived from Foam::string.
void calcLookupMap() const
Construct the look-up map.
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.
#define forAll(list, i)
Loop across all elements in list.
void deleteDemandDrivenData(DataPtr &dataPtr)
virtual void write(Ostream &os) const
Write.
const Map< label > & lookupMap() const
Return a reference to the look-up map.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const complex &c)
Return string representation of complex.
virtual ~zone()
Destructor.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
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,...
errorManip< error > abort(error &err)
const word & name() const
Return name.
Map< label > * lookupMapPtr_
Map of labels in zone for fast location lookup.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
label localID(const label globalID) const
Map storing the local index for every global index. Used to find.
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.
Ostream & operator<<(Ostream &, const boundaryPatch &)
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.