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_)
127 for (
int typei = 0; typei < nTypes; ++typei)
139 for (label
n : sizes_)
166 for (
int typei = 0; typei < nTypes; ++typei)
177 if (faceOrder_.size() != size())
181 if (flipMap_.size() != size())
189 for (
int typei=0; typei < nTypes; ++typei)
201 if (!flipMap_.empty())
208 if (!faceOrder_.empty())
220 const label len = faces.size();
225 for (label listi = 0; listi < len; ++listi)
227 const auto etype = whatType(faces[listi]);
237 for (label listi = 0; listi < len; ++listi)
239 const auto etype = whatType(faces[listi]);
248 const UList<face>& faces,
249 const labelRange&
range
252 const labelRange slice(
range.subset0(faces.size()));
270 const label len = addr.
size();
271 const bool useFlip = (len == flipMap.
size());
276 for (label listi = 0; listi < len; ++listi)
278 const label
faceId = addr[listi];
282 const auto etype = whatType(faces[
faceId]);
291 label nUsed = addressing().size();
295 flipMap_.resize(nUsed);
299 faceOrder_.resize(nUsed);
305 for (label listi = 0; listi < len; ++listi)
307 const label
faceId = addr[listi];
311 const bool doFlip = useFlip && flipMap.
test(listi);
313 const auto etype = whatType(faces[
faceId]);
315 const label idx =
add(etype,
faceId, doFlip);
317 faceOrder_[nUsed] = idx;
A 1D vector of objects of type <T> with a fixed length <N>.
List< T > list() const
Return the addressed elements as a List.
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.
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 non-owning sub-view of a List (allocated or unallocated storage).
A List with indirect addressing. Like IndirectList but does not store addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool test(const label i) const
Test bool value at specified position, always false for out-of-range access.
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 for True 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.
labelRange range(const elemType etype) const
Processor-local offset/size of element type.
static const char * key(const elemType etype) noexcept
The ensight element name for the specified 'Face' type.
void classify(const UList< face > &faces)
Classify the face types and set the element lists.
const labelList & faceIds() const noexcept
Processor-local face ids of all elements.
const labelList & faceOrder() const noexcept
Processor-local face order (where applicable).
label totalSize() const noexcept
The global size of all element types.
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).
virtual void writeDict(Ostream &os, const bool full=false) const
Write information about the object as a dictionary, optionally write all element addresses.
label size(const elemType etype) const
Processor-local size of the specified element type.
static const char * elemNames[nTypes]
The ensight 'Face' element type names.
elemType
Supported ensight 'Face' element types.
ensightFaces()
Default construct, with part index 0.
void clear()
Set addressable sizes to zero, free up addressing memory.
const boolList & flipMap() const
Processor-local flip-map of all elements.
void clearOut()
Clear any demand-driven data.
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
void rename(const string &value)
Change the part name or description.
void incrAddressing(const label off)
Increase addressing by specified offset value.
label index() const noexcept
The index in a list (0-based).
const labelList & addressing() const noexcept
Element addressing.
ensightPart()
Default construct. Index=0, identifier = -1.
void clear()
Clear element addressing.
A face is a list of labels corresponding to mesh vertices.
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)
List< label > labelList
A List of labels.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
UList< label > labelUList
A UList of labels.