20#include <boost/algorithm/string/erase.hpp>
37 bool const compute_element_neighbors)
48 file_name, compute_element_neighbors);
54 file_name, compute_element_neighbors);
57 ERR(
"readMeshFromFile(): Unknown mesh file format in file {:s}.",
68 bool const compute_element_neighbors)
72 MPI_Initialized(&mpi_init);
76 MPI_Comm_size(MPI_COMM_WORLD, &world_size);
80 const std::string file_name_base =
82 return read_pmesh.
read(file_name_base);
86 std::unique_ptr<Mesh> mesh{
87 readMeshFromFileSerial(file_name, compute_element_neighbors)};
99 return readMeshFromFileSerial(file_name, compute_element_neighbors);
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the MeshIO class.
Definition of the Mesh class.
Declare a class to read node-wise partitioned mesh with MPI functions.
Definition of mesh class for partitioned mesh (by node) for parallel computing within the framework o...
Implementation of the VtuInterface class.
Interface for handling mesh files from OGS-5 and below. (*.msh files)
MeshLib::Mesh * loadMeshFromFile(const std::string &file_name)
Read mesh from file.
MeshLib::NodePartitionedMesh * read(const std::string &file_name_base)
Create a NodePartitionedMesh object, read data to it, and return a pointer to it. Data files are in b...
static MeshLib::Mesh * readVTUFile(std::string const &file_name, bool const compute_element_neighbors=false)
static MeshLib::Mesh * readVTKFile(std::string const &file_name, bool const compute_element_neighbors=false)
std::string dropFileExtension(std::string const &filename)
bool hasFileExtension(std::string const &extension, std::string const &filename)
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)
MeshLib::Mesh * readMeshFromFileSerial(const std::string &file_name, bool const compute_element_neighbors)
Definition of readMeshFromFile function.