Skip to content
Snippets Groups Projects
Commit 7d49a74d authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Deduplicate readMeshFromFile() in MeshTests/MeshRead.

parent ff598a47
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
#include "logog.hpp" #include "logog.hpp"
// FileIO // FileIO
#include "RapidXmlIO/RapidVtuInterface.h" #include "readMeshFromFile.h"
#include "Legacy/MeshIO.h"
// MeshLib // MeshLib
#include "Node.h" #include "Node.h"
...@@ -47,19 +46,13 @@ int main(int argc, char *argv[]) ...@@ -47,19 +46,13 @@ int main(int argc, char *argv[])
std::string fname (mesh_arg.getValue()); std::string fname (mesh_arg.getValue());
FileIO::MeshIO mesh_io;
#ifndef WIN32 #ifndef WIN32
BaseLib::MemWatch mem_watch; BaseLib::MemWatch mem_watch;
unsigned long mem_without_mesh (mem_watch.getVirtMemUsage()); unsigned long mem_without_mesh (mem_watch.getVirtMemUsage());
#endif #endif
BaseLib::RunTime run_time; BaseLib::RunTime run_time;
run_time.start(); run_time.start();
MeshLib::Mesh* mesh(NULL); MeshLib::Mesh* mesh = FileIO::readMeshFromFile(fname);
if (BaseLib::getFileExtension(fname).compare("msh") == 0) {
mesh = mesh_io.loadMeshFromFile(fname);
} else {
mesh = FileIO::RapidVtuInterface::readVTUFile(fname);
}
#ifndef WIN32 #ifndef WIN32
unsigned long mem_with_mesh (mem_watch.getVirtMemUsage()); unsigned long mem_with_mesh (mem_watch.getVirtMemUsage());
// std::cout << "mem for mesh: " << (mem_with_mesh - mem_without_mesh)/(1024*1024) << " MB" << std::endl; // std::cout << "mem for mesh: " << (mem_with_mesh - mem_without_mesh)/(1024*1024) << " MB" << std::endl;
......
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