GooseFEM 1.4.1.dev2+g78f16df
|
Generic mesh operations, and simple mesh definitions. More...
Namespaces | |
namespace | Hex8 |
Simple meshes of 8-noded hexahedral elements in 3d (ElementType::Hex8). | |
namespace | Quad4 |
Simple meshes of 4-noded quadrilateral elements in 2d (ElementType::Quad4). | |
namespace | Tri3 |
Simple meshes of and mesh operations for triangular elements of type ElementType::Tri3. | |
Classes | |
class | ManualStitch |
Stitch two mesh objects, specifying overlapping nodes by hand. More... | |
class | RegularBase |
CRTP base class for regular meshes. More... | |
class | RegularBase2d |
CRTP base class for regular meshes in 2d. More... | |
class | RegularBase3d |
CRTP base class for regular meshes in 3d. More... | |
class | Renumber |
Renumber indices to lowest possible index. More... | |
class | Reorder |
Reorder to lowest possible index, in specific order. More... | |
class | Stitch |
Stitch mesh objects, automatically searching for overlapping nodes. More... | |
class | Vstack |
Vertically stack meshes. More... | |
Enumerations | |
enum class | ElementType { Unknown , Quad4 , Hex8 , Tri3 } |
Enumerator for element-types. More... | |
Functions | |
template<class D > | |
std::vector< std::vector< size_t > > | nodaltyings (const D &dofs) |
List nodal tyings based on DOF-numbers per node. | |
template<class S , class T > | |
ElementType | defaultElementType (const S &coor, const T &conn) |
Extract the element type based on the connectivity. | |
array_type::tensor< size_t, 2 > | dofs (size_t nnode, size_t ndim) |
List with DOF-numbers in sequential order. | |
template<class T > | |
T | renumber (const T &dofs) |
Renumber to lowest possible index (see GooseFEM::Mesh::Renumber). | |
template<class S , class T > | |
array_type::tensor< size_t, 2 > | overlapping (const S &coor_a, const T &coor_b, double rtol=1e-5, double atol=1e-8) |
Find overlapping nodes. | |
template<class E > | |
array_type::tensor< size_t, 1 > | coordination (const E &conn) |
Number of elements connected to each node. | |
template<class E > | |
std::vector< std::vector< size_t > > | elem2node (const E &conn, bool sorted=true) |
Elements connected to each node. | |
template<class E , class D > | |
std::vector< std::vector< size_t > > | elem2node (const E &conn, const D &dofs, bool sorted=true) |
Elements connected to each node. | |
template<class D > | |
std::vector< std::vector< size_t > > | node2dof (const D &dofs, bool sorted=true) |
Nodes connected to each DOF. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | edgesize (const C &coor, const E &conn, ElementType type) |
Return size of each element edge. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | edgesize (const C &coor, const E &conn) |
Return size of each element edge. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | centers (const C &coor, const E &conn, ElementType type) |
Coordinates of the center of each element. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | centers (const C &coor, const E &conn) |
Coordinates of the center of each element. | |
template<class T , class C , class E > | |
array_type::tensor< size_t, 1 > | elemmap2nodemap (const T &elem_map, const C &coor, const E &conn, ElementType type) |
Convert an element-map to a node-map. | |
template<class T , class C , class E > | |
array_type::tensor< size_t, 1 > | elemmap2nodemap (const T &elem_map, const C &coor, const E &conn) |
Convert an element-map to a node-map. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | nodal_mass (const C &coor, const E &conn, ElementType type) |
Compute the mass of each node in the mesh. | |
template<class C , class E > | |
array_type::tensor< double, 2 > | nodal_mass (const C &coor, const E &conn) |
Compute the mass of each node in the mesh. | |
template<class C , class E > | |
array_type::tensor< double, 1 > | center_of_gravity (const C &coor, const E &conn, ElementType type) |
Compute the center of gravity of a mesh. | |
template<class C , class E > | |
array_type::tensor< double, 1 > | center_of_gravity (const C &coor, const E &conn) |
Compute the center of gravity of a mesh. | |
Generic mesh operations, and simple mesh definitions.
|
strong |
|
inline |
Compute the center of gravity of a mesh.
C | e.g. array_type::tensor<double, 2> |
E | e.g. array_type::tensor<size_t, 2> |
coor | Nodal coordinates [nnode, ndim] . |
conn | Connectivity [nelem, nne] . |
[ndim]
.
|
inline |
Compute the center of gravity of a mesh.
C | e.g. array_type::tensor<double, 2> |
E | e.g. array_type::tensor<size_t, 2> |
coor | Nodal coordinates [nnode, ndim] . |
conn | Connectivity [nelem, nne] . |
type | ElementType. |
[ndim]
. Coordinates of the center of each element.
The element-type is automatically determined, see defaultElementType().
coor | Nodal coordinates. |
conn | Connectivity. |
|
inline |
|
inline |
|
inline |
Extract the element type based on the connectivity.
coor | Nodal coordinates [nnode, ndim]. |
conn | Connectivity [nelem, nne]. |
|
inline |
List with DOF-numbers in sequential order.
The output is a sequential list of DOF-numbers for each vector-component of each node. For example for 3 nodes in 2 dimensions the output is
\( \begin{bmatrix} 0 & 1 \\ 2 & 3 \\ 4 & 5 \end{bmatrix} \)
nnode | Number of nodes. |
ndim | Number of dimensions. |
Return size of each element edge.
The element-type is automatically determined, see defaultElementType().
coor | Nodal coordinates. |
conn | Connectivity. |
|
inline |
|
inline |
Convert an element-map to a node-map.
The element-type is automatically determined, see defaultElementType().
elem_map | Element-map such that new_elvar = elvar[elem_map] . |
coor | Nodal coordinates. |
conn | Connectivity. |
new_nodevar = nodevar[node_map]
|
inline |
|
inline |
Compute the mass of each node in the mesh.
If nodes are not part of the connectivity the mass is set to zero, such that the center of gravity is simply::
average(coor, GooseFEM.Mesh.nodal_mass(coor, conn), axis=0);
C | e.g. array_type::tensor<double, 2> |
E | e.g. array_type::tensor<size_t, 2> |
coor | Nodal coordinates [nnode, ndim] . |
conn | Connectivity [nelem, nne] . |
[ndim]
.
|
inline |
Compute the mass of each node in the mesh.
If nodes are not part of the connectivity the mass is set to zero, such that the center of gravity is simply::
average(coor, GooseFEM.Mesh.nodal_mass(coor, conn, type), axis=0);
C | e.g. array_type::tensor<double, 2> |
E | e.g. array_type::tensor<size_t, 2> |
coor | Nodal coordinates [nnode, ndim] . |
conn | Connectivity [nelem, nne] . |
type | ElementType. |
[ndim]
.
|
inline |
Find overlapping nodes.
The output has the following structure:
[ [nodes_from_mesh_a], [nodes_from_mesh_b], ]
coor_a | Nodal coordinates of mesh "a" [nnode, ndim]. |
coor_b | Nodal coordinates of mesh "b" [nnode, ndim]. |
rtol | Relative tolerance for position match. |
atol | Absolute tolerance for position match. |