Skip to content
Snippets Groups Projects
Commit 60102967 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Merge branch 'enable-linear-elasticity' into 'master'

Re-enable linear-elasticity by removing Amiramesh components

See merge request ag-sander/dune/dune-elasticity!64
parents 9b9b3425 368cbeff
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
# 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()
......@@ -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);
......
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