Go to the documentation of this file.
35 {
"tria3",
"quad4",
"nsided" };
49 ? Foam::ensightFaces::elemType::TRIA3
51 ? Foam::ensightFaces::elemType::QUAD4
52 : Foam::ensightFaces::elemType::NSIDED
62 inline void Foam::ensightFaces::add
77 flipMap_[
index] = flip;
82 void Foam::ensightFaces::resizeAll()
90 address_.setSize(
n,
Zero);
96 slices_[typei].setStart(
n);
97 slices_[typei].setSize(sizes_[typei]);
130 address_(obj.address_),
131 flipMap_(obj.flipMap_),
139 this->sizes_ = obj.
sizes();
144 this->sizes_ = totSizes;
155 count[typei] = slices_[typei].size();
185 sizes_[typei] = slices_[typei].size();
193 if (flipMap_.size() == address_.size())
200 if (slices_[typei].size())
207 idLst = reorder<labelList>(order, idLst);
208 flip = reorder<boolList>(order, flip);
217 if (slices_[typei].size())
231 const label sz = faces.size();
236 for (
label listi = 0; listi < sz; ++listi)
238 const enum elemType what = whatType(faces[listi]);
247 for (
label listi = 0; listi < sz; ++listi)
249 add(faces[listi], listi);
263 const bool useFlip = (addressing.
size() == flipMap.size());
268 for (
label listi = 0; listi < sz; ++listi)
284 flipMap_.setSize(address_.size(),
false);
290 for (
label listi = 0; listi < sz; ++listi)
293 const bool doFlip = useFlip && flipMap[listi];
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
static constexpr const zero Zero
Global zero.
A List obtained as a section of another List.
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
Sorting/classification of faces (2D) into corresponding ensight types.
#define forAll(list, i)
Loop across all elements in list.
label total() const
The global number of all element types.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void reduce()
Sum element counts across all processes.
FixedList< label, 3 > sizes() const
The processor local sizes per element type.
static const char * elemNames[3]
The ensight element type names.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void classify(const faceList &faces)
Classify the face types, set element list.
ensightFaces()
Construct null, with part index 0.
label offset(const enum elemType what) const
Processor local starting offset of element type.
elemType
Addressable ensight element types.
label index() const
The index in a list.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
void clear()
Set addressable sizes to zero, free up addressing memory.
void sort()
Sort element lists numerically.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
A face is a list of labels corresponding to mesh vertices.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.