Skip to content
Snippets Groups Projects
Commit 960e3674 authored by Tom Fischer's avatar Tom Fischer
Browse files

Using OGS-6 data structures to read the mesh.

parent 17dd66fe
No related branches found
No related tags found
No related merge requests found
......@@ -16,14 +16,11 @@
#include <string>
// FileIO
#include "Legacy/MeshIO.h"
#include "MeshIO/GMSHInterface.h"
#include "MeshIO/OGSMeshIO.h"
// MSH
#include "msh_lib.h" // for FEMRead
#include "msh_mesh.h"
Problem* aproblem = NULL;
// MeshLib
#include "Mesh.h"
int main (int argc, char* argv[])
{
......@@ -43,18 +40,7 @@ int main (int argc, char* argv[])
}
tmp = argv[2];
std::string file_base_name (tmp);
if (tmp.find (".msh") != std::string::npos)
file_base_name = tmp.substr (0, tmp.size() - 4);
std::vector<MeshLib::CFEMesh*> mesh_vec;
FEMRead(file_base_name, mesh_vec);
if (mesh_vec.empty())
{
std::cerr << "could not read mesh from file " << tmp << std::endl;
return -1;
}
MeshLib::CFEMesh* mesh (mesh_vec[mesh_vec.size() - 1]);
MeshLib::Mesh* mesh (FileIO::MeshIO().loadMeshFromFile(tmp));
// *** create new mesh
tmp = argv[3];
......@@ -64,13 +50,9 @@ int main (int argc, char* argv[])
return -1;
}
if (mesh->GetNodesNumber(false) == 0) {
mesh->setNumberOfNodesFromNodesVectorSize();
}
tmp = argv[4];
std::cout << "writing mesh to file " << tmp << " ... " << std::flush;
FileIO::OGSMeshIO mesh_io;
FileIO::MeshIO mesh_io;
mesh_io.setMesh(mesh);
mesh_io.writeToFile (tmp);
std::cout << "ok" << 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