51 if (!cellLookupMapPtr_)
56 return *cellLookupMapPtr_;
60 void Foam::cellZone::calcCellLookupMap()
const
64 Info<<
"void cellZone::calcCellLookupMap() const : "
65 <<
"Calculating cell lookup map"
69 if (cellLookupMapPtr_)
73 "void cellZone::calcCellLookupMap() const"
74 ) <<
"cell lookup map already calculated"
80 cellLookupMapPtr_ =
new Map<label>(2*addr.size());
81 Map<label>& clm = *cellLookupMapPtr_;
85 clm.insert(addr[cellI], cellI);
90 Info<<
"void cellZone::calcCellLookupMap() const : "
91 <<
"Finished calculating cell lookup map"
100 Foam::cellZone::cellZone
112 cellLookupMapPtr_(NULL)
116 Foam::cellZone::cellZone
128 cellLookupMapPtr_(NULL)
133 Foam::cellZone::cellZone
145 cellLookupMapPtr_(NULL)
151 Foam::cellZone::cellZone
163 cellLookupMapPtr_(NULL)
166 Foam::cellZone::cellZone
178 cellLookupMapPtr_(NULL)
198 if (clmIter == clm.
end())
225 bool boundaryError =
false;
229 if (addr[i] < 0 || addr[i] >= zoneMesh_.mesh().nCells())
231 boundaryError =
true;
237 "bool cellZone::checkDefinition("
238 "const bool report) const"
239 ) <<
"Zone " <<
name()
240 <<
" contains invalid cell label " << addr[i] <<
nl
241 <<
"Valid cell labels are 0.."
242 << zoneMesh_.mesh().nCells()-1 <<
endl;
246 return boundaryError;
253 << nl << static_cast<const labelList&>(*this);
262 writeEntry(
"cellLabels", os);
289 os.
check(
"Ostream& operator<<(Ostream& f, const cellZone& p");