Go to the documentation of this file.
62 <<
"Lookup map already calculated" <<
nl
73 lm.insert(addr[i], i);
82 Foam::zone::zone(
const word&
name,
const label index)
87 lookupMapPtr_(nullptr)
101 lookupMapPtr_(
nullptr)
115 lookupMapPtr_(
nullptr)
123 const word& labelsName,
130 lookupMapPtr_(
nullptr)
136 const zone& origZone,
142 name_(origZone.
name()),
144 lookupMapPtr_(
nullptr)
150 const zone& origZone,
156 name_(origZone.
name()),
158 lookupMapPtr_(
nullptr)
174 return lookupMap().lookup(globalCellID, -1);
188 bool hasError =
false;
193 for (
const label idx : addr)
195 if (idx < 0 || idx >= maxSize)
203 <<
" contains invalid index label " << idx <<
nl
204 <<
"Valid index labels are 0.."
205 << maxSize-1 <<
endl;
213 else if (!elems.
insert(idx))
219 <<
" contains duplicate index label " << idx <<
endl;
231 << nl << static_cast<const labelList&>(*
this);
List< label > labelList
A List of labels.
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)
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
Return a reference to the look-up map.
#define DebugInFunction
Report an information message using Foam::Info.
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.
#define DebugInfo
Report an information message using Foam::Info.
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.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.