Skip to content
Snippets Groups Projects
Commit 673fff8e authored by wenqing's avatar wenqing
Browse files

[Mesh] Added reading partitioned mesh to readMeshFromFile.

parent f5e8bd96
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,10 @@
* @author Karsten Rink
*/
#ifdef USE_PETSC
#include <petscksp.h>
#endif
// ThirdParty/logog
#include "logog/include/logog.hpp"
......@@ -29,11 +33,20 @@
#include "Legacy/MeshIO.h"
#include "FileIO/VtkIO/VtuInterface.h"
#include "readMeshFromFile.h"
//
#ifdef USE_PETSC
#include "MPI_IO/NodePartitionedMeshReader.h"
#include "MeshLib/NodePartitionedMesh.h"
#endif
namespace FileIO
{
MeshLib::Mesh* readMeshFromFile(const std::string &file_name)
{
#ifdef USE_PETSC
NodePartitionedMeshReader read_pmesh(PETSC_COMM_WORLD);
return read_pmesh.read(file_name);
#else
if (BaseLib::hasFileExtension("msh", file_name))
{
Legacy::MeshIO meshIO;
......@@ -42,6 +55,7 @@ MeshLib::Mesh* readMeshFromFile(const std::string &file_name)
if (BaseLib::hasFileExtension("vtu", file_name))
return VtuInterface::readVTUFile(file_name);
#endif
ERR("readMeshFromFile(): Unknown mesh file format in file %s.", file_name.c_str());
return nullptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment