Class GooseFEM::Mesh::ManualStitch#

class ManualStitch#

Stitch two mesh objects, specifying overlapping nodes by hand.

Public Functions

template<class CA, class EA, class NA, class CB, class EB, class NB>
inline ManualStitch(const CA &coor_a, const EA &conn_a, const NA &overlapping_nodes_a, const CB &coor_b, const EB &conn_b, const NB &overlapping_nodes_b, bool check_position = true, double rtol = 1e-5, double atol = 1e-8)#
Parameters
  • coor_a – Nodal coordinates of mesh “a” [nnode, ndim].

  • conn_a – Connectivity of mesh “a” [nelem, nne].

  • overlapping_nodes_a – Node-numbers of mesh “a” that overlap with mesh “b” [n].

  • coor_b – Nodal coordinates of mesh “b” [nnode, ndim].

  • conn_b – Connectivity of mesh “b” [nelem, nne].

  • overlapping_nodes_b – Node-numbers of mesh “b” that overlap with mesh “a” [n].

  • check_position – If true the nodes are checked for position overlap.

  • rtol – Relative tolerance for check on position overlap.

  • atol – Absolute tolerance for check on position overlap.

inline size_t nmesh() const#

Number of sub meshes == 2.

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#

Connectivity [nelem, nne].

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#
Parameters

mesh_index – Index of the mesh (“a” = 1, “b” = 1).

Returns

Node-map for a given mesh.

inline array_type::tensor<size_t, 1> elemmap(size_t mesh_index) const#
Parameters

mesh_index – Index of the mesh (“a” = 1, “b” = 1).

Returns

Element-map for a given mesh.

template<class T>
inline T nodeset(const T &set, size_t mesh_index) const#

Convert set of node numbers for an original mesh to the stitched mesh.

Parameters
  • set – List of node numbers.

  • mesh_index – Index of the mesh (“a” = 1, “b” = 1).

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 an original mesh to the stitched mesh.

Parameters
  • set – List of element numbers.

  • mesh_index – Index of the mesh (“a” = 1, “b” = 1).

Returns

List of element numbers for the stitched mesh.