Namespace GooseFEM::Mesh::Tri3#
-
namespace Tri3
Simple meshes of and mesh operations for triangular elements of type ElementType::Tri3.
Functions
-
inline array_type::tensor<int, 1> getOrientation(const array_type::tensor<double, 2> &coor, const array_type::tensor<size_t, 2> &conn)
Read the orientation of a mesh of triangular elements of type ElementType::Tri3.
- Parameters:
coor – Nodal coordinates [nnode, ndim].
conn – Connectivity [nelem, nne].
- Returns:
Orientation (-1 or +1) per element [nelem].
-
inline array_type::tensor<size_t, 2> setOrientation(const array_type::tensor<double, 2> &coor, const array_type::tensor<size_t, 2> &conn, const array_type::tensor<int, 1> &val, int orientation = -1)
Set the orientation of a mesh of triangular elements of type ElementType::Tri3.
For efficiency this function reuses the output of getOrientation().
- Parameters:
coor – Nodal coordinates [nnode, ndim].
conn – Connectivity [nelem, nne].
val – Current orientation per element (output of getOrientation()) [nelem].
orientation – Target orientation (applied to all elements).
- Returns:
Connectivity (order of nodes-per-element may have changed) [nelem, nne].
-
inline array_type::tensor<size_t, 2> setOrientation(const array_type::tensor<double, 2> &coor, const array_type::tensor<size_t, 2> &conn, int orientation = -1)
Set the orientation of a mesh of triangular elements of type ElementType::Tri3.
- Parameters:
coor – Nodal coordinates [nnode, ndim].
conn – Connectivity [nelem, nne].
orientation – Target orientation (applied to all elements).
- Returns:
Connectivity (order of nodes-per-element may have changed) [nelem, nne].
-
class Regular : public GooseFEM::Mesh::RegularBase2d<Regular>
- #include <GooseFEM/MeshTri3.h>
Regular grid of squares, with each square cut into two triangular elements.
Public Functions
-
inline Regular(size_t nelx, size_t nely, double h = 1.0)
Constructor.
- Parameters:
nelx – Number of elements in x-direction.
nely – Number of elements in y-direction.
h – Edge-size (of the squares, and thus of two of three element-edges).
-
inline Regular(size_t nelx, size_t nely, double h = 1.0)
-
inline array_type::tensor<int, 1> getOrientation(const array_type::tensor<double, 2> &coor, const array_type::tensor<size_t, 2> &conn)