Stitch mesh objects, automatically searching for overlapping nodes.
More...
#include <GooseFEM/Mesh.h>
|
| Stitch (double rtol=1e-5, double atol=1e-8) |
|
template<class C , class E > |
void | push_back (const C &coor, const E &conn) |
| Add mesh to be stitched.
|
|
size_t | nmesh () const |
| Number of sub meshes.
|
|
size_t | nelem () const |
| Number of elements.
|
|
size_t | nnode () const |
| Number of nodes.
|
|
size_t | nne () const |
| Number of nodes-per-element.
|
|
size_t | ndim () const |
| Number of dimensions.
|
|
const array_type::tensor< double, 2 > & | coor () const |
| Nodal coordinates [nnode, ndim].
|
|
const array_type::tensor< size_t, 2 > & | conn () const |
| Connectivity [nelem, nne].
|
|
array_type::tensor< size_t, 2 > | dofs () const |
| DOF numbers for each node (numbered sequentially) [nnode, ndim].
|
|
std::vector< array_type::tensor< size_t, 1 > > | nodemap () const |
| Node-map per sub-mesh.
|
|
std::vector< array_type::tensor< size_t, 1 > > | elemmap () const |
| Element-map per sub-mesh.
|
|
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.
|
|
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.
|
|
template<class T > |
T | nodeset (const T &set, size_t mesh_index) const |
| Convert set of node-numbers for a sub-mesh to the stitched mesh.
|
|
template<class T > |
T | elemset (const T &set, size_t mesh_index) const |
| Convert set of element-numbers for a sub-mesh to the stitched mesh.
|
|
template<class T > |
T | nodeset (const std::vector< T > &set) const |
| Combine set of node numbers for an original to the final mesh (removes duplicates).
|
|
template<class T > |
T | nodeset (std::initializer_list< T > set) const |
| Combine set of node numbers for an original to the final mesh (removes duplicates).
|
|
template<class T > |
T | elemset (const std::vector< T > &set) const |
| Combine set of element numbers for an original to the final mesh.
|
|
template<class T > |
T | elemset (std::initializer_list< T > set) const |
| Combine set of element numbers for an original to the final mesh.
|
|
Stitch mesh objects, automatically searching for overlapping nodes.
Definition at line 2013 of file Mesh.h.
◆ Stitch()
GooseFEM::Mesh::Stitch::Stitch |
( |
double | rtol = 1e-5, |
|
|
double | atol = 1e-8 ) |
|
inline |
- Parameters
-
rtol | Relative tolerance for position match. |
atol | Absolute tolerance for position match. |
Definition at line 2019 of file Mesh.h.
◆ conn()
Connectivity [nelem, nne].
- Returns
- nodes per element
Definition at line 2124 of file Mesh.h.
◆ coor()
Nodal coordinates [nnode, ndim].
- Returns
- coordinates per node
Definition at line 2115 of file Mesh.h.
◆ dofs()
DOF numbers for each node (numbered sequentially) [nnode, ndim].
- Returns
- DOFs per node
Definition at line 2133 of file Mesh.h.
◆ elemmap() [1/2]
Element-map per sub-mesh.
- Returns
- elements per mesh
Definition at line 2157 of file Mesh.h.
◆ elemmap() [2/2]
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.
Definition at line 2184 of file Mesh.h.
◆ elemset() [1/3]
T GooseFEM::Mesh::Stitch::elemset |
( |
const std::vector< T > & | set | ) |
const |
|
inline |
Combine set of element numbers for an original to the final mesh.
- Parameters
-
set | List of element numbers per mesh. |
- Returns
- List of element numbers for the stitched mesh.
Definition at line 2265 of file Mesh.h.
◆ elemset() [2/3]
T GooseFEM::Mesh::Stitch::elemset |
( |
const T & | set, |
|
|
size_t | mesh_index ) const |
|
inline |
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.
Definition at line 2213 of file Mesh.h.
◆ elemset() [3/3]
T GooseFEM::Mesh::Stitch::elemset |
( |
std::initializer_list< T > | set | ) |
const |
|
inline |
Combine set of element numbers for an original to the final mesh.
- Parameters
-
set | List of element numbers per mesh. |
- Returns
- List of element numbers for the stitched mesh.
Definition at line 2291 of file Mesh.h.
◆ ndim()
size_t GooseFEM::Mesh::Stitch::ndim |
( |
| ) |
const |
|
inline |
Number of dimensions.
- Returns
- unsigned int
Definition at line 2106 of file Mesh.h.
◆ nelem()
size_t GooseFEM::Mesh::Stitch::nelem |
( |
| ) |
const |
|
inline |
Number of elements.
- Returns
- unsigned int
Definition at line 2079 of file Mesh.h.
◆ nmesh()
size_t GooseFEM::Mesh::Stitch::nmesh |
( |
| ) |
const |
|
inline |
Number of sub meshes.
- Returns
- unsigned int
Definition at line 2070 of file Mesh.h.
◆ nne()
size_t GooseFEM::Mesh::Stitch::nne |
( |
| ) |
const |
|
inline |
Number of nodes-per-element.
- Returns
- unsigned int
Definition at line 2097 of file Mesh.h.
◆ nnode()
size_t GooseFEM::Mesh::Stitch::nnode |
( |
| ) |
const |
|
inline |
Number of nodes.
- Returns
- unsigned int
Definition at line 2088 of file Mesh.h.
◆ nodemap() [1/2]
Node-map per sub-mesh.
- Returns
- nodes per mesh
Definition at line 2144 of file Mesh.h.
◆ nodemap() [2/2]
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.
Definition at line 2172 of file Mesh.h.
◆ nodeset() [1/3]
T GooseFEM::Mesh::Stitch::nodeset |
( |
const std::vector< T > & | set | ) |
const |
|
inline |
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.
Definition at line 2227 of file Mesh.h.
◆ nodeset() [2/3]
T GooseFEM::Mesh::Stitch::nodeset |
( |
const T & | set, |
|
|
size_t | mesh_index ) const |
|
inline |
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.
Definition at line 2198 of file Mesh.h.
◆ nodeset() [3/3]
T GooseFEM::Mesh::Stitch::nodeset |
( |
std::initializer_list< T > | set | ) |
const |
|
inline |
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.
Definition at line 2253 of file Mesh.h.
◆ push_back()
Add mesh to be stitched.
- Parameters
-
coor | Nodal coordinates [nnode, ndim]. |
conn | Connectivity [nelem, nne]. |
Definition at line 2032 of file Mesh.h.
◆ m_atol
double GooseFEM::Mesh::Stitch::m_atol |
|
protected |
Absolute tolerance to find overlapping nodes.
Definition at line 2303 of file Mesh.h.
◆ m_conn
◆ m_coor
◆ m_el_offset
std::vector<size_t> GooseFEM::Mesh::Stitch::m_el_offset |
|
protected |
First element of every sub-mesh.
Definition at line 2301 of file Mesh.h.
◆ m_map
See nodemap(size_t)
Definition at line 2299 of file Mesh.h.
◆ m_nel
std::vector<size_t> GooseFEM::Mesh::Stitch::m_nel |
|
protected |
Number of elements per sub-mesh.
Definition at line 2300 of file Mesh.h.
◆ m_rtol
double GooseFEM::Mesh::Stitch::m_rtol |
|
protected |
Relative tolerance to find overlapping nodes.
Definition at line 2302 of file Mesh.h.
The documentation for this class was generated from the following file: