diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4d9207c9d9c5945dcef83d5ac2b8de29dbe345..75114d7ebe9f5365c322edbdb88844983e8e4f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Deprecations and removals -- The support of `Amiramesh` is dropped in dune-grid and thus the program `linear-elasticity` is removed from CMakeLists.txt +- The support of `Amiramesh` is dropped in dune-grid and thus the program `linear-elasticity` is modified to compile with `Gmsh` but it will not run. # 2.8 Release diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 205e9824e466bdd92453d98dd27866dc3cc95fb1..6daa0edbae43a4caabee24272b7d348da0743bbd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,8 +1,8 @@ # Note: PYTHONLIBS_FOUND is only for backwards compatibility with dune-fufem 2.7 and can be removed # in the next release if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND dune-uggrid_FOUND) - set(programs finite-strain-elasticity) - #linear-elasticity depends on Amiramesh which is dropped since DUNE 2.8 + set(programs linear-elasticity + finite-strain-elasticity) foreach(_program ${programs}) add_executable(${_program} ${_program}.cc) @@ -13,13 +13,5 @@ if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND du add_dune_mpi_flags(${_program}) # target_compile_options(${_program} PRIVATE "-fpermissive") endforeach() - - if (AMIRAMESH_FOUND) - add_dune_amiramesh_flags(linear-elasticity) - endif() - - if (PSURFACE_FOUND) - add_dune_psurface_flags(linear-elasticity) - endif() endif() diff --git a/src/linear-elasticity.cc b/src/linear-elasticity.cc index 38937222c2852455a96ce03c956755cdcce48e90..aabb4d803e9cf6b82ee16a5affcf9009b8f00ada 100644 --- a/src/linear-elasticity.cc +++ b/src/linear-elasticity.cc @@ -5,7 +5,7 @@ #include <dune/common/parametertreeparser.hh> #include <dune/grid/uggrid.hh> -#include <dune/grid/io/file/amirameshreader.hh> +#include <dune/grid/io/file/gmshreader.hh> #include <dune/grid/io/file/vtk.hh> #include <dune/istl/io.hh> @@ -93,36 +93,31 @@ int main (int argc, char *argv[]) try using GridView = GridType::LeafGridView; grid->setRefinementType(GridType::COPY); -#if HAVE_AMIRAMESH - if (paramBoundaries) - grid = AmiraMeshReader<GridType>::read(path + gridFile, PSurfaceBoundary<dim-1>::read(path + parFile)); - else - grid = AmiraMeshReader<GridType>::read(path + gridFile); -#else -#warning You need libamiramesh for this code! -#endif + + // TODO We have no Psurface available in DUNE since 2.8 +// if (paramBoundaries) +// grid = AmiraMeshReader<GridType>::read(path + gridFile, PSurfaceBoundary<dim-1>::read(path + parFile)); +// else + grid = GmshReader<GridType>::read(path + gridFile).get(); LevelBoundaryPatch coarseDirichletBoundary; coarseDirichletBoundary.setup(grid->levelGridView(0)); readBoundaryPatch<GridType>(coarseDirichletBoundary, path + dirichletFile); VectorType coarseDirichletValues(grid->size(0, dim)); -#if HAVE_AMIRAMESH - AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile); -#else -#warning You need libamiramesh for this code! -#endif + + // TODO We have no value reader in Gmsh! +// AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile); LevelBoundaryPatch coarseNeumannBoundary; coarseNeumannBoundary.setup(grid->levelGridView(0)); readBoundaryPatch<GridType>(coarseNeumannBoundary, path + neumannFile); VectorType coarseNeumannValues(grid->size(0, dim)); -#if HAVE_AMIRAMESH - AmiraMeshReader<GridType>::readFunction(coarseNeumannValues, path + neumannValuesFile); -#else -#warning You need libamiramesh for this code! -#endif + + // TODO We have no value reader in Gmsh! +// AmiraMeshReader<GridType>::readFunction(coarseNeumannValues, path + neumannValuesFile); + P1NodalBasis<GridType::LevelGridView> coarseBasis(grid->levelGridView(0)); auto coarseDir = ::Functions::makeFunction(coarseBasis,coarseDirichletValues);