Go to the documentation of this file.
40 {
"tria3",
"quad4",
"nsided" };
45 "Support exactly 3 face types (tria3, quad4, nsided)"
60 ? Foam::ensightFaces::elemType::TRIA3
62 ? Foam::ensightFaces::elemType::QUAD4
63 : Foam::ensightFaces::elemType::NSIDED
72 void Foam::ensightFaces::resizeAll()
78 auto iter = offsets_.
begin();
81 for (
const label
n : sizes_)
162 sizes_[typei] = size(
elemType(typei));
170 const bool useFlip = (size() == flipMap_.size());
177 for (
int typei=0; typei < nTypes; ++typei)
188 ids = reorder<labelList>(order, ids);
189 flips = reorder<boolList>(order, flips);
198 for (
int typei=0; typei < nTypes; ++typei)
214 const label len = faces.
size();
219 for (label listi = 0; listi < len; ++listi)
221 const auto etype = whatType(faces[listi]);
232 for (label listi = 0; listi < len; ++listi)
234 const auto etype = whatType(faces[listi]);
253 incrAddressing(slice.
start());
265 const label len = addr.
size();
266 const bool useFlip = (len == flipMap.size());
271 for (label listi = 0; listi < len; ++listi)
273 const label
faceId = addr[listi];
277 const auto etype = whatType(faces[
faceId]);
288 flipMap_.resize(len);
298 for (label listi = 0; listi < len; ++listi)
300 const label
faceId = addr[listi];
301 const bool doFlip = useFlip && flipMap[listi];
305 const auto etype = whatType(faces[
faceId]);
329 faceIds(etype).writeList(os, 0) <<
endEntry;
const labelList & addressing() const
Element addressing.
static constexpr int nTypes
Number of 'Face' element types (3)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void rename(const string &value)
Change the part name or description.
iterator begin()
Return an iterator to begin traversing the FixedList.
static constexpr const zero Zero
Global zero (0)
A List obtained as a section of another List.
static const char * key(const elemType etype)
The ensight element name for the specified 'Face' type.
void clearOut()
Clear any demand-driven data.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
Sorting/classification of faces (2D) into corresponding ensight types.
virtual void writeDict(Ostream &os, const bool full=false) const
#define forAll(list, i)
Loop across all elements in list.
label total() const
The global size of all element types.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
void reduce()
Sum element counts across all processes.
word name(const complex &c)
Return string representation of complex.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
bool empty() const noexcept
True if range is empty (zero-sized)
A range or interval of labels defined by a start and a size.
void resize(const label newSize)
Adjust allocated size of list.
virtual Ostream & endBlock()
Write end block group.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
ensightFaces()
Default construct, with part index 0.
elemType
Supported ensight 'Face' element types.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
void clear()
Set addressable sizes to zero, free up addressing memory.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A 1D vector of objects of type <T> with a fixed length <N>.
void sort()
Sort element lists numerically.
static const char * elemNames[nTypes]
The ensight 'Face' element type names.
void clear()
Clear the list, i.e. set size to zero.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void clear()
Clear element addressing.
IntType start() const noexcept
The (inclusive) lower value of the range.
defineTypeNameAndDebug(combustionModel, 0)
void classify(const UList< face > &faces)
Classify the face types and set the element lists.