Containers

Geo supports

enumerator GeoNA
enumerator GeoPoint
enumerator GeoBar
enumerator GeoTri
enumerator GeoQuad
enumerator GeoTet
enumerator GeoPyr
enumerator GeoWed
enumerator GeoHex

Element Names

enumerator Point_1
enumerator Bar_2
enumerator Bar_3
enumerator Triangle_6
enumerator Quadrangle_8
enumerator Quadrangle_9
enumerator Tetrahedron_4
enumerator Pyramid_5
enumerator Wedge_6
enumerator Hexahedron_8
enumerator Tetrahedron_10
enumerator Pyramid_13
enumerator Wedge_15
enumerator Wedge_18
enumerator Hexahedron_20
enumerator Hexahedron_27
std::map<ElementType, ElementDescription> Muscat::elementsInfo = InitElementInfo()

Mesh

class Mesh

Public Functions

Mesh()
DEFINE_SETGET_SHARED_MAP_MatrixID1(OriginalIds, originalIDNodes)
DEFINE_SETGET_SHARED_MAP_MatrixDDD(Nodes, nodes)
CMuscatIndex GetNumberOfNodes() const
CMuscatIndex GetElementsDimensionality() const
template<typename T>
void AddNodalTag(std::string &name, T &arg1)
template<typename T, typename T2>
void AddElements(const ElementType elementType, T &arg1, T2 &arg2)
template<typename T>
void AddElementTag(const ElementType elementType, std::string &tagname, T &arg1)
std::map<ElementType, CMuscatIndex> ComputeGlobalOffsets()
std::string ToStr()
void Print()
void PrintFull()

Public Members

std::map<std::string, float> props
Tags nodesTags
AllElements<ElementsContainer> elements
class ElementsContainer

Public Functions

ElementsContainer(const ElementType elemtype = ElementType::Element_NA)
CMuscatIndex GetNumberOfElements() const
DEFINE_SETGET_SHARED_MAP_MatrixIDD(Connectivity, connectivity)
DEFINE_SETGET_SHARED_MAP_MatrixID1(OriginalIds, originalIds)
ElementType GetElementType() const
template<typename T>
void AddTag(std::string &name, T &arg1)

Public Members

Tags tags
template<typename ContainerType>
class AllElements

Class to store a list of element containers. This class is mostly a re-implementation of dict (in python) or a std::map (in cpp) but with ordered elementType. This class is sorted by elementTypes in lexicographic order, so the retrieving order is stable, and independent on the order of filling.

Public Types

using StorageType = std::map<ElementType, ContainerType>

Public Functions

ContainerType &GetElementsOfType(const ElementType elemtype)
const ContainerType &GetElementsOfType(const ElementType elemtype) const
CMuscatIndex GetNumberOfElements() const
std::string ToStr()
ContainerType &operator[](const ElementType key)
const ContainerType &operator[](const ElementType key) const
inline const StorageType::const_iterator begin() const
inline const StorageType::const_iterator end() const

Public Members

StorageType storage

Tags

class Tag

Public Functions

Tag()
DEFINE_SETGET_SHARED_MAP_MatrixID1(Ids, ids)
void SetName(std::string_view name)
std::string GetName() const
CMuscatIndex GetSize() const
Tag MakeDeepCopy() const
template<typename T>
Tag(std::string_view name, const T &eigenMatrix)
class Tags

Public Functions

void AddTag(Tag &&tag)
void AddTag(const Tag &tag)
bool Contains(const std::string &key) const
Tag &operator[](const std::string &key)
std::string ToStr() const
std::map<std::string, Tag>::iterator begin()
std::map<std::string, Tag>::iterator end()
std::map<std::string, Tag>::const_iterator begin() const
std::map<std::string, Tag>::const_iterator end() const
Tags MakeDeepCopy() const

Filters

class ElementFilterBase

Subclassed by Muscat::ElementFilter, Muscat::ElementFilterEvaluated, Muscat::ElementFilterIntersection

Public Functions

virtual const MatrixID1 GetIdsToTreat(Mesh &mesh, const ElementType elementType) const = 0
const MatrixID1 GetIdsToTreatComplementary(Mesh &mesh, const ElementType elementType)
class ElementFilterEvaluated : public Muscat::ElementFilterBase

Public Functions

virtual const MatrixID1 GetIdsToTreat(Mesh &mesh, const ElementType elemtype) const
void SetIdsToTreatFor(const ElementType elemtype, const Eigen::Ref<const MatrixID1> &ids)
void Clear()
virtual std::string ToStr() const
inline std::map<ElementType, MatrixID1>::const_iterator begin() const
inline std::map<ElementType, MatrixID1>::const_iterator end() const
class ElementFilter : public Muscat::ElementFilterBase

Public Types

enum ZONE

Values:

enumerator CENTER
enumerator ALLNODES
enumerator LEASTONENODE

Public Functions

ElementFilter()
void AddTag(const std::string &tagName)
void SetDimensionality(const int &dim)
virtual const MatrixID1 CheckTags(Tags &tags, const CMuscatIndex &ts, bool &active) const
virtual const MatrixID1 GetIdsToTreat(Mesh &mesh, const ElementType elemtype) const
virtual std::string ToStr() const
void SetCENTER()
void SetALLNODES()
void SetLEASTONENODE()
class ElementFilterIntersection : public Muscat::ElementFilterBase

Public Functions

virtual const MatrixID1 GetIdsToTreat(Mesh &mesh, const ElementType elemtype) const

Unstructured Mesh Tools

std::shared_ptr<MapMatrixDD3> Muscat::GetElementsCenters(const Mesh &sourceMesh)

Compute the center of the elements for a given Mesh.

Parameters:

sourceMesh – the mesh to work on Mesh

Returns:

a std::shared_ptr<MapMatrixDD3> with the of each element

MatrixDDD Muscat::GetElementsCenters(const MapMatrixDDD &nodes, const ElementsContainer &elements)

Compute the center of the elements for a given ElementsContainer.

Parameters:
Returns:

a MatrixDDD with the of each element