Go to the documentation of this file.
40 auto& zones = this->storedZones();
51 if (count < this->size())
54 <<
"more faces " << this->size() <<
" than zones " <<
count
55 <<
" ... extending final zone" <<
nl;
57 zones.last().size() +=
count - this->size();
59 else if (
count > this->size())
62 <<
"more zones " <<
count <<
" than faces " << this->size()
79 const label nInputFaces = unsortedFaces.size();
81 if (sorted || zoneIds.size() != nInputFaces)
88 if (elemIds.size() != nInputFaces)
96 this->storedFaces().transfer(unsortedFaces);
97 this->storedFaceIds().transfer(elemIds);
107 auto& newFaces = this->storedFaces();
108 newFaces.resize(nInputFaces);
114 newFaces[facei].transfer(unsortedFaces[
faceMap[facei]]);
117 auto& newFaceIds = this->storedFaceIds();
118 newFaceIds.resize(elemIds.size());
123 newFaceIds[facei] = elemIds[
faceMap[facei]];
137 auto& zones = this->storedZones();
138 zones.resize(zones.size());
144 if (srfZones[zonei].size() || !cullEmpty)
146 zones[nZone] =
surfZone(srfZones[zonei], nZone);
163 auto& zones = this->storedZones();
164 zones.resize(sizes.
size());
171 if (sizes[zonei] || !cullEmpty)
180 start += sizes[zonei];
196 auto& zones = this->storedZones();
197 zones.resize(sizes.
size());
204 if (sizes[zonei] || !cullEmpty)
213 start += sizes[zonei];
233 this->storedZones().clear();
void checkZones()
Basic sanity check on zones.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
bool addZonesToFaces()
Propagate zone information on face regions.
#define forAll(list, i)
Loop across all elements in list.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
void clear()
Clear the addressed list, i.e. set the size to zero.
virtual void removeZones()
Remove surface zones.
static const word defaultName("coeffs")
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, DynamicList< label > &elemIds, bool sorted)
Sort faces by zones and store sorted faces.
A surface zone on a MeshedSurface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
Various functions to operate on Lists.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
#define WarningInFunction
Report a warning using Foam::Warning.