tk::UnsMesh class

3D unstructured mesh class

Public types

template<std::size_t N>
struct Eq
template<std::size_t N>
struct Hash
using Chunk = std::tuple<std::vector<std::size_t>, std::vector<std::size_t>, std::unordered_map<std::size_t, std::size_t>>
using EdgeNodeCoord = std::unordered_map<Edge, std::tuple<std::size_t, real, real, real>, Hash<2>, Eq<2>>
Map associating the ID and the coordinates of a node to an edge.
using EdgeSet = std::unordered_set<Edge, Hash<2>, Eq<2>>
Unique set of edges.
using FaceSet = std::unordered_set<Face, Hash<3>, Eq<3>>
Unique set of faces.

Public functions

auto nelem() const -> std::size_t noexcept
Total number of elements accessor.
auto neblk() const -> std::size_t noexcept
Number of element blocks accessor.

Aliases for element primitives

using Edge = std::array<std::size_t, 2>
using Face = std::array<std::size_t, 3>
Face: node IDs of a triangle (tetrahedron face)
using Tet = std::array<std::size_t, 4>
Tet: node IDs of a tetrahedron.

Constructors

UnsMesh() explicit
UnsMesh(const std::vector<std::size_t>& tetinp) explicit
Constructor copying over element connectivity.
UnsMesh(std::vector<std::size_t>&& tetinp) explicit
Constructor swallowing element connectivity.
UnsMesh(const std::vector<std::size_t>& tetinp, const std::vector<real>& X, const std::vector<real>& Y, const std::vector<real>& Z) explicit
Constructor copying over element connectivity and point coordinates.
UnsMesh(const std::vector<std::size_t>& tetinp, const Coords& coord) explicit
Constructor copying over element connectivity and array of point coordinates.
UnsMesh(std::vector<std::size_t>&& tetinp, std::vector<real>&& X, std::vector<real>&& Y, std::vector<real>&& Z) explicit
Constructor swallowing element connectivity and point coordinates.
UnsMesh(std::vector<std::size_t>&& tetinp, Coords&& coord) explicit
Constructor swallowing element connectivity and array of point coordinates.
UnsMesh(const std::vector<std::size_t>& tetinp, const Coords& coord, const std::map<int, std::vector<std::size_t>>& bf, const std::vector<std::size_t>& triinp, const std::map<int, std::vector<std::size_t>>& fid) explicit
Constructor with connectivities and side set faces.
UnsMesh(const std::vector<std::size_t>& tetinp, const Coords& coord, const std::map<int, std::vector<std::size_t>>& bn) explicit
Constructor with connectivities and side set nodes.

Typedef documentation

using tk::UnsMesh::Chunk = std::tuple<std::vector<std::size_t>, std::vector<std::size_t>, std::unordered_map<std::size_t, std::size_t>>

Alias for storing a mesh chunk

The first vector is the element connectivity (local IDs), the second vector is the global node IDs of owned elements, while the third one is a map of global->local node IDs.

using tk::UnsMesh::Edge = std::array<std::size_t, 2>

Edge: node IDs of two end-points

Function documentation

tk::UnsMesh::UnsMesh() explicit

Constructor without initializing anything