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 branches found
No related tags found
1 merge request!64Re-enable linear-elasticity by removing Amiramesh components
Pipeline #47840 passed
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## Deprecations and removals ## 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 # 2.8 Release
......
# Note: PYTHONLIBS_FOUND is only for backwards compatibility with dune-fufem 2.7 and can be removed # Note: PYTHONLIBS_FOUND is only for backwards compatibility with dune-fufem 2.7 and can be removed
# in the next release # in the next release
if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND dune-uggrid_FOUND) if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND dune-uggrid_FOUND)
set(programs finite-strain-elasticity) set(programs linear-elasticity
#linear-elasticity depends on Amiramesh which is dropped since DUNE 2.8 finite-strain-elasticity)
foreach(_program ${programs}) foreach(_program ${programs})
add_executable(${_program} ${_program}.cc) add_executable(${_program} ${_program}.cc)
...@@ -13,13 +13,5 @@ if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND du ...@@ -13,13 +13,5 @@ if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND ) AND du
add_dune_mpi_flags(${_program}) add_dune_mpi_flags(${_program})
# target_compile_options(${_program} PRIVATE "-fpermissive") # target_compile_options(${_program} PRIVATE "-fpermissive")
endforeach() endforeach()
if (AMIRAMESH_FOUND)
add_dune_amiramesh_flags(linear-elasticity)
endif()
if (PSURFACE_FOUND)
add_dune_psurface_flags(linear-elasticity)
endif()
endif() endif()
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <dune/common/parametertreeparser.hh> #include <dune/common/parametertreeparser.hh>
#include <dune/grid/uggrid.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/grid/io/file/vtk.hh>
#include <dune/istl/io.hh> #include <dune/istl/io.hh>
...@@ -93,36 +93,31 @@ int main (int argc, char *argv[]) try ...@@ -93,36 +93,31 @@ int main (int argc, char *argv[]) try
using GridView = GridType::LeafGridView; using GridView = GridType::LeafGridView;
grid->setRefinementType(GridType::COPY); grid->setRefinementType(GridType::COPY);
#if HAVE_AMIRAMESH
if (paramBoundaries) // TODO We have no Psurface available in DUNE since 2.8
grid = AmiraMeshReader<GridType>::read(path + gridFile, PSurfaceBoundary<dim-1>::read(path + parFile)); // if (paramBoundaries)
else // grid = AmiraMeshReader<GridType>::read(path + gridFile, PSurfaceBoundary<dim-1>::read(path + parFile));
grid = AmiraMeshReader<GridType>::read(path + gridFile); // else
#else grid = GmshReader<GridType>::read(path + gridFile).get();
#warning You need libamiramesh for this code!
#endif
LevelBoundaryPatch coarseDirichletBoundary; LevelBoundaryPatch coarseDirichletBoundary;
coarseDirichletBoundary.setup(grid->levelGridView(0)); coarseDirichletBoundary.setup(grid->levelGridView(0));
readBoundaryPatch<GridType>(coarseDirichletBoundary, path + dirichletFile); readBoundaryPatch<GridType>(coarseDirichletBoundary, path + dirichletFile);
VectorType coarseDirichletValues(grid->size(0, dim)); VectorType coarseDirichletValues(grid->size(0, dim));
#if HAVE_AMIRAMESH
AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile); // TODO We have no value reader in Gmsh!
#else // AmiraMeshReader<GridType>::readFunction(coarseDirichletValues, path + dirichletValuesFile);
#warning You need libamiramesh for this code!
#endif
LevelBoundaryPatch coarseNeumannBoundary; LevelBoundaryPatch coarseNeumannBoundary;
coarseNeumannBoundary.setup(grid->levelGridView(0)); coarseNeumannBoundary.setup(grid->levelGridView(0));
readBoundaryPatch<GridType>(coarseNeumannBoundary, path + neumannFile); readBoundaryPatch<GridType>(coarseNeumannBoundary, path + neumannFile);
VectorType coarseNeumannValues(grid->size(0, dim)); VectorType coarseNeumannValues(grid->size(0, dim));
#if HAVE_AMIRAMESH
AmiraMeshReader<GridType>::readFunction(coarseNeumannValues, path + neumannValuesFile); // TODO We have no value reader in Gmsh!
#else // AmiraMeshReader<GridType>::readFunction(coarseNeumannValues, path + neumannValuesFile);
#warning You need libamiramesh for this code!
#endif
P1NodalBasis<GridType::LevelGridView> coarseBasis(grid->levelGridView(0)); P1NodalBasis<GridType::LevelGridView> coarseBasis(grid->levelGridView(0));
auto coarseDir = ::Functions::makeFunction(coarseBasis,coarseDirichletValues); 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