Go to the documentation of this file.
42 {
"tetra4",
"pyramid5",
"penta6",
"hexa8",
"nfaced" };
47 "Support exactly 5 cell types (tetra4, pyramid5, penta6, hexa8, nfaced)"
53 void Foam::ensightCells::resizeAll()
59 auto iter = offsets_.
begin();
62 for (
const label
n : sizes_)
138 sizes_[typei] = size(
elemType(typei));
146 for (
int typei=0; typei < nTypes; ++typei)
160 template<
class Addressing>
161 void Foam::ensightCells::classifyImpl
164 const Addressing& cellIds
178 for (
const label
id : cellIds)
180 const cellModel& model = shapes[id].model();
182 elemType etype(NFACED);
187 else if (model == pyr)
191 else if (model == prism)
195 else if (model ==
hex)
209 for (
const label
id : cellIds)
211 const cellModel& model = shapes[id].model();
213 elemType etype(NFACED);
218 else if (model == pyr)
222 else if (model == prism)
226 else if (model ==
hex)
249 classifyImpl(
mesh, cellIds);
259 classifyImpl(
mesh, selection);
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
const labelList & addressing() const
Element addressing.
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 'Cell' type.
void sort()
Sort element lists numerically.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
static const char * elemNames[nTypes]
The ensight 'Cell' element type names.
virtual void writeDict(Ostream &os, const bool full=false) const
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
label nCells() const
Number of mesh cells.
static constexpr int nTypes
Number of 'Cell' element types (5)
ensightCells()
Default construct, with part index 0.
word name(const complex &c)
Return string representation of complex.
A range or interval of labels defined by a start and a size.
label total() const
The global size of all element types.
Sorting/classification of cells (3D) into corresponding ensight element types.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
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.
const cellShapeList & cellShapes() const
Return cell shapes.
IOstream & hex(IOstream &io)
elemType
Supported ensight 'Cell' element types.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
bool empty() const noexcept
Is the range empty?
Base class for ensightCells, ensightFaces, ensightOutputSurfaces.
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
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 clearOut()
Clear any demand-driven data.
static labelRange identity(const label len, const label start=0) noexcept
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Maps a geometry to a set of cell primitives.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void classify(const polyMesh &mesh)
Classify cell types and set the element lists.
void clear()
Clear element addressing.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
defineTypeNameAndDebug(combustionModel, 0)
void reduce()
Sum element counts across all processes.
void clear()
Set addressable sizes to zero, free up addressing memory.