Commit a2d00812 authored by Praetorius, Simon's avatar Praetorius, Simon

Add Vtk reader and Gmsh4 reader

parent b1c86771
Pipeline #4709 failed with stage
in 9 minutes and 57 seconds
......@@ -12,9 +12,20 @@
#if HAVE_ALBERTA
#include <dune/grid/albertagrid/albertareader.hh>
#endif
#include <dune/grid/io/file/gmshreader.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
#if HAVE_DUNE_VTK
#include <dune/vtk/vtkreader.hh>
#include <dune/vtk/gridcreators/lagrangegridcreator.hh>
#endif
#if HAVE_DUNE_GMSH4
#include <dune/gmsh4/gmsh4reader.hh>
#include <dune/gmsh4/gridcreators/lagrangegridcreator.hh>
#endif
#include <amdis/AdaptiveGrid.hpp>
#include <amdis/Initfile.hpp>
#include <amdis/Output.hpp>
......@@ -166,7 +177,16 @@ namespace AMDiS
auto ext = fn.extension();
if (ext == ".msh") {
#if HAVE_DUNE_GMSH4
if (Dune::Gmsh4::fileVersion(filename)[0] >= 4)
return Dune::Gmsh4Reader<HostGrid, Dune::Gmsh4::LagrangeGridCreator<HostGrid>>::createGridFromFile(filename);
else
#else
return read_gmsh_file<HostGrid>(filename, Dune::PriorityTag<42>{});
#endif
}
else if (ext == ".vtu") {
return Dune::VtkReader<HostGrid, Dune::Vtk::LagrangeGridCreator<HostGrid>>::createGridFromFile(filename);
}
else if (ext == ".1d" || ext == ".2d" || ext == ".3d" || ext == ".amc") {
return read_alberta_file<HostGrid>(filename, Dune::PriorityTag<42>{});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment