Skip to content
Snippets Groups Projects
Commit 368cbeff authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Re-enable linear-elasticity by removing Amiramesh components

This makes the program compile again, but it will not run. Further changes in the data readers has to be made.
parent 603d9327
No related tags found
1 merge request!64Re-enable linear-elasticity by removing Amiramesh components
Pipeline #47840 passed
......@@ -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.
Please register or to comment