Muscat.Containers.ElementsDescription module

CheckIntegrity(GUI: bool = False)[source]

CheckIntegrity function. Tests

Parameters:

GUI (bool, optional) – if True, generate (in some case) an output on a new window, by default False

Returns:

ok if all ok

Return type:

str

class ElementDescription(name, geoSupport)[source]

Bases: object

Class to store information about the different type of elements.

degree: int

the higher degree of the polynomial

dimension: int

Dimensionality 0,1,2,3

facesL1: List[Tuple[str, ndarray]]

First level faces. (triangles for a tetra for example) A list containing a tuples of the elements name and the local connectivity

facesL2: List[Tuple[str, ndarray]]

Second level faces. (bars for a tetra for example) A list containing a tuples of the elements name and the local connectivity

facesL3: List[Tuple[str, ndarray]]

third level faces. (points for a tetra for example) A list containing a tuples of the elements name and the local connectivity

geoSupport

the geometrical support of this element

linear: bool

true if the the jacobian matrix is constant in the element

mirrorPermutation: ndarray

Permutation of index to make a valid element again after a mirror operation

name

Element Name

numberOfNodes

number of nodes of this elements

class ElementType(value)[source]

Bases: Enum

An enumeration.

Bar_2: int = 5
Bar_3: int = 6
Hexahedron_20: int = 10
Hexahedron_27: int = 26
Hexahedron_8: int = 41
NA: int = 0
Point_1: int = 49
Pyramid_13: int = 58
Pyramid_14: int = 74
Pyramid_5: int = 89
Quadrangle_4: int = 101
Quadrangle_8: int = 102
Quadrangle_9: int = 118
Tetrahedron_10: int = 138
Tetrahedron_4: int = 153
Triangle_3: int = 165
Triangle_6: int = 166
Wedge_15: int = 170
Wedge_18: int = 186
Wedge_6: int = 201
class ElementTypeMask(value)[source]

Bases: Enum

An enumeration.

MaskD2: int = 4
MaskD3: int = 8
MaskP1: int = 1
MaskP2: int = 2
ElementsInfo: Dict[str | ElementType, ElementDescription] = {ElementType.Bar_2: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Bar_3: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Hexahedron_20: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Hexahedron_27: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Hexahedron_8: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Point_1: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Pyramid_13: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Pyramid_14: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Pyramid_5: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Quadrangle_4: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Quadrangle_8: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Quadrangle_9: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Tetrahedron_10: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Tetrahedron_4: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Triangle_3: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Triangle_6: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Wedge_15: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Wedge_18: <Muscat.Containers.ElementsDescription.ElementDescription object>, ElementType.Wedge_6: <Muscat.Containers.ElementsDescription.ElementDescription object>}

Dictionary with with the description for all elements.

This dictionary contain for every element type ElementDescription singleton with the information about the elements.

class GeoProp(name, dimensionality)[source]

Bases: NamedTuple

dimensionality: int

Alias for field number 1

name: str

Alias for field number 0

class GeoSupport(value)[source]

Bases: Enum

An enumeration.

GeoBar = GeoProp(name='GeoBar', dimensionality=1)

dimensionality = 1

Type:

Bar geometrical support

GeoHex = GeoProp(name='GeoHex', dimensionality=3)

dimensionality = 3

Type:

Hexahedral geometrical support

GeoPoint = GeoProp(name='GeoPoint', dimensionality=0)

dimensionality = 0

Type:

Point geometrical support

GeoPyr = GeoProp(name='GeoPyr', dimensionality=3)

dimensionality = 3

Type:

Pyramidal (square base) geometrical support

GeoQuad = GeoProp(name='GeoQuad', dimensionality=2)

dimensionality = 2

Type:

Quadrangle geometrical support

GeoTet = GeoProp(name='GeoTet', dimensionality=3)

dimensionality = 3

Type:

Tetrahedral geometrical support

GeoTri = GeoProp(name='GeoTri', dimensionality=2)

dimensionality = 2

Type:

Triangle geometrical support

GeoWed = GeoProp(name='GeoWed', dimensionality=3)

dimensionality = 3

Type:

Wedge geometrical support

property dimensionality
GetElementDescription(elementType: str | ElementType) ElementDescription[source]

Return an instance of ElementDescription for the element type elementType

Parameters:

elementType (ElementTypeLike) – Element type

Returns:

instance of ElementDescription with the information of the element

Return type:

ElementDescription