tk::Omega_h_MeshReader class

Omega_h mesh-based data reader

Mesh reader class facilitating reading from mesh-based field data a file in Omega_h format.

Constructors, destructors, conversion operators

Omega_h_MeshReader(const std::string& filename) explicit
Constructor.

Public functions

auto npoin() -> std::size_t
Return total number of mesh points in mesh file.
void readMeshPart(std::vector<std::size_t>& ginpoel, std::vector<std::size_t>& inpoel, std::vector<std::size_t>& triinp, std::unordered_map<std::size_t, std::size_t>& lid, tk::UnsMesh::Coords& coord, std::unordered_map<std::size_t, std::set<std::size_t>>&, int numpes = 1, int mype = 0)
void readSidesetFaces(std::map<int, std::vector<std::size_t>>& bface, std::map<int, std::vector<std::size_t>>& faces)
Read face list of all side sets from Omega h file.
void readFaces(std::vector<std::size_t>& conn)
Read face connectivity of a number boundary faces from Omega h file.
auto readSidesetNodes() -> std::map<int, std::vector<std::size_t>>
Read node list of all side sets from Omega h file.
auto triinpoel(std::map<int, std::vector<std::size_t>>& belem, const std::map<int, std::vector<std::size_t>>& faces, const std::vector<std::size_t>& ginpoel, const std::vector<std::size_t>& triinp) const -> std::vector<std::size_t>
...

Function documentation

void tk::Omega_h_MeshReader::readMeshPart(std::vector<std::size_t>& ginpoel, std::vector<std::size_t>& inpoel, std::vector<std::size_t>& triinp, std::unordered_map<std::size_t, std::size_t>& lid, tk::UnsMesh::Coords& coord, std::unordered_map<std::size_t, std::set<std::size_t>>&, int numpes = 1, int mype = 0)

Parameters
ginpoel in/out Container to store element connectivity of this PE's chunk of the mesh (global ids)
inpoel in/out Container to store element connectivity with local node IDs of this PE's mesh chunk
triinp in/out Container to store triangle element connectivity (if exists in file) with global node indices
lid in/out Container to store global->local node IDs of elements of this PE's mesh chunk
coord in/out Container to store coordinates of mesh nodes of this PE's mesh chunk
numpes in Total number of PEs (default n = 1, for a single-CPU read)
mype in This PE (default m = 0, for a single-CPU read)

Read part of the mesh (graph and coords) from Omega_h file

Total number of PEs defaults to 1 for a single-CPU read, this PE defaults to 0 for a single-CPU read.

void tk::Omega_h_MeshReader::readSidesetFaces(std::map<int, std::vector<std::size_t>>& bface, std::map<int, std::vector<std::size_t>>& faces)

Read face list of all side sets from Omega h file.

Parameters
bface in/out Elem ids of side sets to read into
faces in/out Elem-relative face ids of tets of side sets

void tk::Omega_h_MeshReader::readFaces(std::vector<std::size_t>& conn)

Read face connectivity of a number boundary faces from Omega h file.

Parameters
conn in/out Connectivity vector to push to

This function reads in the total number of boundary faces, also called triangle-elements, and their connectivity.

std::map<int, std::vector<std::size_t>> tk::Omega_h_MeshReader::readSidesetNodes()

Read node list of all side sets from Omega h file.

Returns Node lists mapped to side set ids

std::vector<std::size_t> tk::Omega_h_MeshReader::triinpoel(std::map<int, std::vector<std::size_t>>& belem, const std::map<int, std::vector<std::size_t>>& faces, const std::vector<std::size_t>& ginpoel, const std::vector<std::size_t>& triinp) const

...