diff --git a/CHANGELOG.md b/CHANGELOG.md index 861e472bc49ad61239d78def7b35a43340bfd581..5537eb4b20e63bcfa30b0c60eadc6fb2b7219ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Master +- Added dune-gmsh4 as a dependency - Build cosserat-continuum for different combinations of LFE-orders and GFE-orders, the respective program is called cosserat-continuum-Xd-in-Xd-LFE_ORDER-GFE_ORDER diff --git a/dune.module b/dune.module index 6a17dcaf439041470959d85f65e703a9df591a9d..669495ee9b904b0864cea7f848511eb8cf4aa155 100644 --- a/dune.module +++ b/dune.module @@ -7,5 +7,5 @@ Module: dune-gfe Version: svn Maintainer: oliver.sander@tu-dresden.de #depending on -Depends: dune-common(>=2.7) dune-grid(>=2.7) dune-uggrid dune-istl dune-localfunctions dune-geometry (>=2.7) dune-functions (>=2.7) dune-solvers dune-fufem dune-elasticity (>=2.7) +Depends: dune-common(>=2.7) dune-grid(>=2.7) dune-uggrid dune-istl dune-localfunctions dune-geometry (>=2.7) dune-functions (>=2.7) dune-solvers dune-fufem dune-elasticity (>=2.7) dune-gmsh4 Suggests: dune-foamgrid dune-parmg dune-vtk dune-curvedgrid diff --git a/src/cosserat-continuum.cc b/src/cosserat-continuum.cc index d23443bbd6904207e4d95a12be53920f0382cc01..43ac8c7b9a91201476415e6b5f4cb472f2ba8322 100644 --- a/src/cosserat-continuum.cc +++ b/src/cosserat-continuum.cc @@ -38,8 +38,6 @@ #include <dune/grid/uggrid.hh> #include <dune/grid/utility/structuredgridfactory.hh> -#include <dune/grid/io/file/gmshreader.hh> - #if HAVE_DUNE_FOAMGRID #include <dune/foamgrid/foamgrid.hh> #endif @@ -190,9 +188,11 @@ int main (int argc, char *argv[]) try DUNE_THROW(IOError, "Could not determine grid input file format"); std::string suffix = gridFile.substr(dotPos, gridFile.length()-dotPos); - if (suffix == ".msh") - grid = std::shared_ptr<GridType>(GmshReader<GridType>::read(path + "/" + gridFile)); - else if (suffix == ".vtu" or suffix == ".vtp") + if (suffix == ".msh") { + Gmsh4Reader reader{creator}; + reader.read(path + "/" + gridFile); + grid = factory.createGrid(); + } else if (suffix == ".vtu" or suffix == ".vtp") #if HAVE_DUNE_VTK grid = VtkReader<GridType>::createGridFromFile(path + "/" + gridFile); #else @@ -346,7 +346,7 @@ int main (int argc, char *argv[]) try std::string path = parameterSet.get<std::string>("path"); std::string initialIterateGridFilename = parameterSet.get<std::string>("initialIterateGridFilename"); - initialIterateGrid = std::shared_ptr<GridType>(GmshReader<GridType>::read(path + "/" + initialIterateGridFilename)); + initialIterateGrid = std::shared_ptr<GridType>(Gmsh4Reader<GridType>::createGridFromFile(path + "/" + initialIterateGridFilename)); } std::vector<TargetSpace> initialIterate;