44 "tetra4",
"pyramid5",
"penta6",
"hexa8",
"nfaced"
50 "Support exactly 5 cell types (tetra4, pyramid5, penta6, hexa8, nfaced)"
56void Foam::ensightCells::resizeAll()
62 auto iter = offsets_.
begin();
65 for (
const label
n : sizes_)
104 count[typei] = size(
elemType(typei));
116 nTotal += sizes_[typei];
142 sizes_[typei] = size(
elemType(typei));
151 for (
int typei=0; typei < nTypes; ++typei)
165template<
class Addressing>
166void Foam::ensightCells::classifyImpl
169 const Addressing& cellIds
185 for (
const label
id : cellIds)
187 const cellModel& model = shapes[id].model();
189 elemType etype(NFACED);
194 else if (model == pyr)
198 else if (model == prism)
202 else if (model ==
hex)
216 for (
const label
id : cellIds)
218 const cellModel& model = shapes[id].model();
220 elemType etype(NFACED);
225 else if (model == pyr)
229 else if (model == prism)
233 else if (model ==
hex)
256 classifyImpl(
mesh, cellIds);
266 classifyImpl(
mesh, selection);
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)
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 List obtained as a section of another List.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Maps a geometry to a set of cell primitives.
reference ref() const
A reference to the entry (Error if not found)
Sorting/classification of cells (3D) into corresponding ensight element types.
void reduce()
Sum element counts across all processes.
void sort()
Sort element lists numerically.
void classify(const polyMesh &mesh)
Classify cell types and set the element lists.
static constexpr int nTypes
Number of 'Cell' element types (5)
ensightCells()
Default construct, with part index 0.
static const char * elemNames[nTypes]
The ensight 'Cell' element type names.
elemType
Supported ensight 'Cell' element types.
label total() const
The global size of all element types.
void clear()
Set addressable sizes to zero, free up addressing memory.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
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.
Foam::dictionary writeDict() const
Write to dictionary.
A range or interval of labels defined by a start and a size.
Mesh consisting of general polyhedral cells.
const cellShapeList & cellShapes() const
Return cell shapes.
label nCells() const noexcept
Number of mesh cells.
#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)
void sort(UList< T > &list)
Sort 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.