48 lookupMapPtr_(nullptr)
56 lookupMapPtr_(nullptr)
69 labelList::operator=(addr);
82 labelList::transfer(addr);
90 const word& labelsName,
96 lookupMapPtr_(nullptr)
102 const zone& originalZone,
109 lookupMapPtr_(nullptr)
115 const zone& originalZone,
122 lookupMapPtr_(nullptr)
135 auto& map = *lookupMapPtr_;
137 for (
const label
id : addr)
139 map.insert(
id, map.size());
143 return *lookupMapPtr_;
149 return lookupMap().lookup(globalID, -1);
155 lookupMapPtr_.reset(
nullptr);
169 bool hasError =
false;
174 for (
const label
id : addr)
176 if (id < 0 || id >= maxSize)
183 <<
"Zone " << this->
name()
184 <<
" contains invalid index label " <<
id <<
nl 185 <<
"Valid index labels are 0.." 186 << maxSize-1 <<
endl;
194 else if (!elems.insert(
id))
199 <<
"Zone " << this->
name()
200 <<
" contains duplicate index label " <<
id <<
endl;
212 << 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 (remove lookup maps and other auxiliary information)
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.
virtual void clearPrimitives()
Clear primitive addressing.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
defineTypeName(manifoldCellsMeshObject)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Base class for mesh zones.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from Foam::string.
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)
virtual void write(Ostream &os) const
Write.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
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.
A HashTable to objects of type <T> with a label key.