Class GooseFEM::Mesh::Stitch#
-
class Stitch#
Stitch mesh objects, automatically searching for overlapping nodes.
Subclassed by GooseFEM::Mesh::Vstack
Public Functions
-
inline Stitch(double rtol = 1e-5, double atol = 1e-8)#
- Parameters:
rtol – Relative tolerance for position match.
atol – Absolute tolerance for position match.
-
template<class C, class E>
inline void push_back(const C &coor, const E &conn)# Add mesh to be stitched.
- Parameters:
coor – Nodal coordinates [nnode, ndim].
conn – Connectivity [nelem, nne].
-
inline size_t nmesh() const#
Number of sub meshes.
- Returns:
unsigned int
-
inline size_t nelem() const#
Number of elements.
- Returns:
unsigned int
-
inline size_t nnode() const#
Number of nodes.
- Returns:
unsigned int
-
inline size_t nne() const#
Number of nodes-per-element.
- Returns:
unsigned int
-
inline size_t ndim() const#
Number of dimensions.
- Returns:
unsigned int
-
inline const array_type::tensor<double, 2> &coor() const#
Nodal coordinates [nnode, ndim].
- Returns:
coordinates per node
-
inline const array_type::tensor<size_t, 2> &conn() const#
-
- Returns:
nodes per element
-
inline array_type::tensor<size_t, 2> dofs() const#
DOF numbers for each node (numbered sequentially) [nnode, ndim].
- Returns:
DOFs per node
-
inline std::vector<array_type::tensor<size_t, 1>> nodemap() const#
Node-map per sub-mesh.
- Returns:
nodes per mesh
-
inline std::vector<array_type::tensor<size_t, 1>> elemmap() const#
Element-map per sub-mesh.
- Returns:
elements per mesh
-
inline array_type::tensor<size_t, 1> nodemap(size_t mesh_index) const#
The node numbers in the stitched mesh that are coming from a specific sub-mesh.
- Parameters:
mesh_index – Index of the sub-mesh.
- Returns:
List of node numbers.
-
inline array_type::tensor<size_t, 1> elemmap(size_t mesh_index) const#
The element numbers in the stitched mesh that are coming from a specific sub-mesh.
- Parameters:
mesh_index – Index of the sub-mesh.
- Returns:
List of element numbers.
-
template<class T>
inline T nodeset(const T &set, size_t mesh_index) const# Convert set of node-numbers for a sub-mesh to the stitched mesh.
- Parameters:
set – List of node numbers.
mesh_index – Index of the sub-mesh.
- Returns:
List of node numbers for the stitched mesh.
-
template<class T>
inline T elemset(const T &set, size_t mesh_index) const# Convert set of element-numbers for a sub-mesh to the stitched mesh.
- Parameters:
set – List of element numbers.
mesh_index – Index of the sub-mesh.
- Returns:
List of element numbers for the stitched mesh.
-
template<class T>
inline T nodeset(const std::vector<T> &set) const# Combine set of node numbers for an original to the final mesh (removes duplicates).
- Parameters:
set – List of node numbers per mesh.
- Returns:
List of node numbers for the stitched mesh.
-
template<class T>
inline T nodeset(std::initializer_list<T> set) const# Combine set of node numbers for an original to the final mesh (removes duplicates).
- Parameters:
set – List of node numbers per mesh.
- Returns:
List of node numbers for the stitched mesh.
-
inline Stitch(double rtol = 1e-5, double atol = 1e-8)#