41 "tria3",
"quad4",
"nsided"
47 "Support exactly 3 face types (tria3, quad4, nsided)"
74void Foam::ensightFaces::resizeAll()
86 auto iter = offsets_.
begin();
89 for (
const label
n : sizes_)
129 count[typei] = size(
elemType(typei));
141 nTotal += sizes_[typei];
168 sizes_[typei] = size(
elemType(typei));
178 if (faceOrder_.size() != size())
182 if (flipMap_.size() != size())
190 for (
int typei=0; typei < nTypes; ++typei)
199 ids = reorder<labelList>(order, ids);
202 if (!flipMap_.empty())
205 flips = reorder<boolList>(order, flips);
209 if (!faceOrder_.empty())
212 faceOrder = reorder<labelList>(order, faceOrder);
221 const label len = faces.
size();
226 for (label listi = 0; listi < len; ++listi)
228 const auto etype = whatType(faces[listi]);
238 for (label listi = 0; listi < len; ++listi)
240 const auto etype = whatType(faces[listi]);
259 incrAddressing(slice.
start());
271 const label len = addr.
size();
272 const bool useFlip = (len == flipMap.
size());
277 for (label listi = 0; listi < len; ++listi)
279 const label
faceId = addr[listi];
283 const auto etype = whatType(faces[
faceId]);
292 label nUsed = addressing().size();
296 flipMap_.resize(nUsed);
300 faceOrder_.resize(nUsed);
306 for (label listi = 0; listi < len; ++listi)
308 const label
faceId = addr[listi];
312 const bool doFlip = useFlip && flipMap.
test(listi);
314 const auto etype = whatType(faces[
faceId]);
316 const label idx =
add(etype,
faceId, doFlip);
318 faceOrder_[nUsed] = idx;
A 1D vector of objects of type <T> with a fixed length <N>.
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
const Key & key() const
The key associated with the iterator.
bool empty() const noexcept
True if range is empty (zero-sized)
IntType start() const noexcept
The (inclusive) lower value of the range.
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
A List obtained as a section of another List.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type test(const label i) const
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
Sorting/classification of faces (2D) into corresponding ensight types.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
void classify(const UList< face > &faces)
Classify the face types and set the element lists.
void reduce()
Sum element counts across all processes.
void sort()
Inplace sort element lists numerically.
static constexpr int nTypes
Number of 'Face' element types (3)
static const char * elemNames[nTypes]
The ensight 'Face' element type names.
elemType
Supported ensight 'Face' element types.
ensightFaces()
Default construct, with part index 0.
label total() const
The global size of all element types.
void clear()
Set addressable sizes to zero, free up addressing memory.
void clearOut()
Clear any demand-driven data.
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
void rename(const string &value)
Change the part name or description.
const labelList & addressing() const noexcept
Element addressing.
void clear()
Clear element addressing.
A face is a list of labels corresponding to mesh vertices.
Foam::dictionary writeDict() const
Write to dictionary.
A range or interval of labels defined by a start and a size.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
#define forAll(list, i)
Loop across all elements in list.