41 zones[zoneI].start() =
count;
42 count += zones[zoneI].
size();
45 if (count < this->size())
48 <<
"more faces " << this->size() <<
" than zones " << count
49 <<
" ... extending final zone" 52 zones.
last().size() += count - this->size();
54 else if (count > this->size())
57 <<
"more zones " << count <<
" than faces " << this->size()
78 this->storedFaces().transfer(oldFaces);
93 newFaces[facei].transfer(oldFaces[faceMap[facei]]);
95 this->storedFaces().transfer(newFaces);
116 if (srfZones[zoneI].size() || !cullEmpty)
118 zones[nZone] =
surfZone(srfZones[zoneI], nZone);
141 if (sizes[zoneI] || !cullEmpty)
150 start += sizes[zoneI];
172 if (sizes[zoneI] || !cullEmpty)
181 start += sizes[zoneI];
192 this->storedZones().clear();
void sortFacesAndStore(List< Face > &&unsortedFaces, List< label > &&zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
#define forAll(list, i)
Loop across all elements in list.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
virtual void removeZones()
Remove surface zones.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void checkZones()
Basic sanity check on zones.
word name(const complex &)
Return a string representation of a complex.
void setSize(const label)
Reset size of List.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
T & last()
Return the last element of the list.
label size() const
Return the number of elements in the UList.