Commit 931189ba authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'develop' into 'master'

Develop

See merge request !103
parents 4646e930 3efd88e3
Pipeline #1839 passed with stage
in 48 minutes and 21 seconds
---
cache:
paths:
- install/
before_script:
- source ~/toolchain
- export CMAKE_FLAGS="-DCMAKE_C_COMPILER='$CC' -DCMAKE_CXX_COMPILER='$CXX'"
dune:git--gcc:
image: mathiwr/dune:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
debian:10 gcc-8-17:
image: registry.dune-project.org/docker/ci/dune:2.6-debian-10-gcc-8-17
script:
- dunecontrol --current all
- dunecontrol --current make build_tests
- dunecontrol --current make test
- dunecontrol --current make examples
debian:10 clang-6-libcpp-17:
image: registry.dune-project.org/docker/ci/dune:2.6-debian-10-clang-6-libcpp-17
script:
- duneci-standard-test
- dunecontrol --current make examples
debian:9 gcc-6-14:
image: registry.dune-project.org/docker/ci/dune:2.6-debian-9-gcc-6-14
script:
- dunecontrol --current all
- dunecontrol --current make build_tests
- dunecontrol --current make test
only:
- develop
- dunecontrol --current make examples
ubuntu:18.04 clang-6-17:
image: registry.dune-project.org/docker/ci/dune:2.6-ubuntu-18.04-clang-6-17
script:
- duneci-standard-test
- dunecontrol --current make examples
[submodule "externals/fmt"]
path = externals/fmt
url = https://github.com/fmtlib/fmt.git
......@@ -12,18 +12,22 @@ include(DuneMacros)
# start a dune project with information from dune.module
dune_project()
dune_enable_all_packages(MODULE_LIBRARIES amdis)
dune_enable_all_packages(MODULE_LIBRARIES amdis fmt)
add_subdirectory("bin")
add_subdirectory("cmake/modules")
add_subdirectory("doc")
add_subdirectory("externals")
add_subdirectory("src")
add_subdirectory("test")
add_subdirectory("examples" EXCLUDE_FROM_ALL)
add_subdirectory("doc")
add_subdirectory("cmake/modules")
target_include_directories(amdis PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>)
target_compile_definitions(amdis PUBLIC AMDIS_BACKEND_MTL=1)
target_compile_options(amdis PUBLIC -Wall -pedantic -Wno-unused-parameter) #-ftemplate-backtrace-limit=0
target_link_libraries(amdis fmt)
option(ENABLE_ALL_WARNINGS "enable all meaningful warnings" OFF)
if (ENABLE_ALL_WARNINGS)
target_compile_options(amdis PUBLIC "-Wall" "-Wextra" "-pedantic" "-Wnon-virtual-dtor" "-Wold-style-cast" "-Wcast-align" "-Woverloaded-virtual" "-Wpedantic" "-Wconversion")
endif (ENABLE_ALL_WARNINGS)
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
The MIT License (MIT)
Copyright (c) 2016 Simon Praetorius
Copyright (c) 2016-2018 Simon Praetorius
2018 Felix Müller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
#pragma once
#include <string>
#include "Flag.hpp"
namespace AMDiS
{
class AdaptInfo;
class ProblemStatBase;
const Flag BUILD = 1; // Assemble vectors and matrices
const Flag BUILD_RHS = 2; // Assemble rhs vectors only
const Flag ADAPT = 4; // Run adaption procedure
const Flag SOLVE = 8; // Solve system
const Flag SOLVE_RHS = 16; // Solve system, where only rhs vectors have changed
const Flag ESTIMATE = 32; // Estimate error
const Flag MARK = 64; // Mark elements
const Flag FULL_ITERATION = BUILD | ADAPT | SOLVE | ESTIMATE | MARK;
const Flag NO_ADAPTION = BUILD | SOLVE | ESTIMATE;
/** \brief
* Interface for master problems needed by the adaption loop. A master problem
* can handle one single or multiple coupled problems. In the latter case,
* the master problem can determine the execution order of the build, solve,
* estimate, and adapt steps of the single problems in \ref oneIteration().
*/
class ProblemIterationInterface
{
public:
virtual ~ProblemIterationInterface() = default;
/// Called before each adaption loop iteration.
virtual void beginIteration(AdaptInfo&) { /* by default, do nothing */ }
/** \brief
* Determines the execution order of the single adaption steps. If adapt is
* true, mesh adaption will be performed. This allows to avoid mesh adaption,
* e.g. in timestep adaption loops of timestep adaptive strategies.
*/
virtual Flag oneIteration(AdaptInfo& adaptInfo, Flag toDo = FULL_ITERATION) = 0;
/// Called after each adaption loop iteration.
virtual void endIteration(AdaptInfo&) { /* by default, do nothing */ }
/// Returns number of managed problems
virtual int numProblems() const = 0;
/** \brief
* Returns the problem with the given number. If only one problem
* is managed by this master problem, the number hasn't to be given.
*/
virtual ProblemStatBase& problem(int number = 0) = 0;
/// Returns the problem with the given name.
virtual ProblemStatBase& problem(std::string const& name) = 0;
/// Returns the name of the problem.
virtual std::string const& name() const = 0;
};
} // end namespace AMDiS
......@@ -18,6 +18,7 @@ The `dunecontrol` script searches for the required
- [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry)
- [dune-grid](https://gitlab.dune-project.org/core/dune-grid)
- [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions)
- [dune-istl](https://gitlab.dune-project.org/core/dune-istl)
- [dune-typetree](https://gitlab.dune-project.org/staging/dune-typetree)
- [dune-functions](https://gitlab.dune-project.org/staging/dune-functions)
......@@ -26,20 +27,21 @@ can be obtained from https://gitlab.dune-project.org and need to be found in a
subdirectory of `DUNE_CONTROL_PATH`. See also https://dune-project.org/doc/installation
for details about the installation of dune modules.
Additionally we require the following libraries to be found:
Additionally the following optional libraries can be used:
- [MTL4](https://gitlab.math.tu-dresden.de/spraetor/mtl4) (use this fork to get up-to-date changes)
- [SuiteSparse](http://faculty.cse.tamu.edu/davis/suitesparse.html) (optional)
- [Eigen3](http://eigen.tuxfamily.org) >= 3.3
- [SuiteSparse](http://faculty.cse.tamu.edu/davis/suitesparse.html)
- libalberta >= 3.0 (For Alberta-Grids)
And a compiler that supports the C++14 standard, e.g. g++ >= 5.0 and clang >= 3.6, and cmake >= 3.1.
By default, the `dune-istl` linear-algebra backend is used. To choose one of `ISTL`, `MTL`, or `EIGEN`, you can specify the cmake parameter `-DBACKEND=[ISTL,MTL,EIGEN]`.
If your MTL4 installation is not found by default, you have to specify the path,
where the file `MTLConfig.cmake` is found, here called `MTL_ROOT`. Then simply use
`dunecontrol` to configure and `cmake` to build:
```
CMAKE_FLAGS="-DMTL_DIR:PATH=[MTL_ROOT]" dunecontrol --current configure
CMAKE_FLAGS="-DBACKEND=MTL -DMTL_DIR:PATH=[MTL_ROOT]" dunecontrol --current configure
cmake --build build-cmake
```
This compiles the library and all examples in the `src/` directory.
install(PROGRAMS
amdisproject
DESTINATION ${CMAKE_INSTALL_BINDIR})
This diff is collapsed.
# Module that provides tools for adding executable with all required flags
#
# .. cmake_function:: add_amdis_executable
#
# .. cmake_brief::
#
# Adds an executable using the AMDiS library
#
# .. cmake_param:: NAME
# :single:
#
# The name of the test that should be added. If an executable
# is also added (by specifying SOURCES), the executable is also
# named accordingly. If omitted, the name will be deduced from
# the (single) sources parameter or from the given target. Note
# that this requires you to take care, that you only use a target
# or source file for but one such test.
#
# .. cmake_param:: SOURCES
# :multi:
#
# The source files that this test depends on. These are the
# sources that will be passed to :ref:`add_executable`.
#
# You *must* specify either :code:`SOURCES` or :code:`TARGET`.
#
# .. cmake_param:: DIM
# :single:
#
# Specify the grid dimension.
#
# .. cmake_param:: DOW
# :single:
#
# Specify the world dimension. If not specified it is assumed to be equal to DIM
#
# .. cmake_param:: ALU_GRID
# :option:
#
# Enables ALUGrid with specified grid dimension and world dimension.
#
# .. cmake_param:: ALBERTA_GRID
# :option:
#
# Enables AlbertaGrid with specified grid dimension and world dimension.
#
# This file defines the a function for adding executables to cmake and setting all required
# parameters for dependent modules.
#
function(add_amdis_executable)
include(CMakeParseArguments)
set(OPTIONS ALU_GRID ALBERTA_GRID)
set(SINGLEARGS NAME DIM DOW)
set(MULTIARGS SOURCES)
cmake_parse_arguments(ADDEXE "${OPTIONS}" "${SINGLEARGS}" "${MULTIARGS}" ${ARGN})
# Check whether the parser produced any errors
if(ADDTEST_UNPARSED_ARGUMENTS)
message(WARNING "Unrecognized arguments ('${ADDTEST_UNPARSED_ARGUMENTS}') for add_amdis_executable!")
endif()
# Check input for validity and apply defaults
if(NOT ADDEXE_SOURCES)
message(FATAL_ERROR "You need to specify the SOURCES option for add_amdis_executable!")
endif()
if(NOT ADDEXE_NAME)
# try deducing the executable name form the source name
if(ADDEXE_SOURCES)
# deducing a name is only possible with a single source argument
list(LENGTH ADDEXE_SOURCES len)
if(NOT len STREQUAL "1")
message(FATAL_ERROR "Cannot deduce executable name from multiple sources!")
endif()
# strip file extension
get_filename_component(ADDEXE_NAME ${ADDEXE_SOURCES} NAME_WE)
endif()
endif()
# Add the executable
add_executable(${ADDEXE_NAME} ${ADDEXE_SOURCES})
# add all flags to the target!
add_dune_all_flags(${ADDEXE_NAME})
target_link_dune_default_libraries(${ADDEXE_NAME})
target_link_libraries(${ADDEXE_NAME} amdis)
if(ADDEXE_DIM)
set(GRIDDIM ${ADDEXE_DIM})
endif(ADDEXE_DIM)
if(ADDEXE_DOW)
set(WORLDDIM ${ADDEXE_DOW})
else(ADDEXE_DOW)
set(WORLDDIM ${ADDEXE_DIM})
endif(ADDEXE_DOW)
# set dimension flag
if(GRIDDIM)
target_compile_definitions(${ADDEXE_NAME} PRIVATE "GRIDDIM=${GRIDDIM}")
endif(GRIDDIM)
if(WORLDDIM)
target_compile_definitions(${ADDEXE_NAME} PRIVATE "WORLDDIM=${WORLDDIM}")
endif(WORLDDIM)
# add flags for AlbertaGrid
if(ADDEXE_ALBERTA_GRID)
if(NOT ADDEXE_DIM)
message(FATAL_ERROR "You need to specify dimension for ALBERTA_GRID!")
endif()
if(NOT ADDEXE_DOW)
message(WARNING "dimensionworld not specified for ALBERTA_GRID. Setting DOW=DIM.")
endif()
add_dune_alberta_flags(GRIDDIM ${GRIDDIM} WORLDDIM ${WORLDDIM} ${ADDEXE_NAME})
endif(ADDEXE_ALBERTA_GRID)
# add flags for ALUGrid
if(ADDEXE_ALU_GRID)
# nothing special to do
endif(ADDEXE_ALU_GRID)
endfunction(add_amdis_executable)
\ No newline at end of file
#include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)
#include(CheckCXXSymbolExists)
# fold expressions (a + ...)
check_cxx_source_compiles("
......@@ -13,7 +11,7 @@ check_cxx_source_compiles("
{
f(0,1,2,3,4,5);
}
" AMDIS_HAS_CXX_FOLD_EXPRESSION
" AMDIS_HAS_CXX_FOLD_EXPRESSIONS
)
check_cxx_source_compiles("
......@@ -31,3 +29,15 @@ check_cxx_source_compiles("
}
" AMDIS_HAS_CXX_CONSTEXPR_IF
)
check_cxx_source_compiles("
#include <iostream>
#include <tuple>
int main()
{
auto tup = std::make_tuple(0, 'a', 3.14);
for... (auto elem : tup)
std::cout << elem << std::endl;
}
" AMDIS_HAS_EXPANSION_STATEMENTS
)
\ No newline at end of file
# File for module specific CMake tests.
include(AmdisCXXFeatures)
include(AddAmdisExecutable)
include(AMDiSCXXFeatures)
set(BACKEND "ISTL" CACHE STRING "LinearAlgebra backend. One of MTL, EIGEN, ISTL")
set_property(CACHE BACKEND PROPERTY STRINGS "MTL" "EIGEN" "ISTL")
# some additional packages and flags
find_package(MTL REQUIRED
if (BACKEND STREQUAL "MTL")
find_package(MTL
PATHS /usr/local/lib/mtl4 /opt/sources/mtl4 /opt/development/mtl4)
set(CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
set(MTL_COMPILE_DEFINITIONS "")
foreach(feature ${CXX_ELEVEN_FEATURE_LIST})
if (MTL_FOUND)
set(CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
set(MTL_COMPILE_DEFINITIONS "")
foreach(feature ${CXX_ELEVEN_FEATURE_LIST})
list(APPEND MTL_COMPILE_DEFINITIONS "MTL_WITH_${feature}")
endforeach()
endforeach()
if(HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND)
find_package(SuiteSparse QUIET)
if (SuiteSparse_FOUND)
list(APPEND MTL_COMPILE_DEFINITIONS "MTL_HAS_UMFPACK")
endif()
endif (SuiteSparse_FOUND)
endif (MTL_FOUND)
dune_register_package_flags(
set(HAVE_MTL MTL_FOUND)
if (MTL_FOUND)
list(APPEND MTL_COMPILE_DEFINITIONS "ENABLE_MTL=1")
dune_register_package_flags(
COMPILE_DEFINITIONS ${MTL_COMPILE_DEFINITIONS}
INCLUDE_DIRS ${MTL_INCLUDE_DIRS})
endif (MTL_FOUND)
elseif (BACKEND STREQUAL "EIGEN")
find_package(Eigen3)
set(HAVE_EIGEN EIGEN_FOUND)
if (EIGEN3_FOUND)
message(STATUS " Found Eigen3, version: ${EIGEN3_VERSION}")
list(APPEND EIGEN3_DEFINITIONS "ENABLE_EIGEN=1")
dune_register_package_flags(
COMPILE_DEFINITIONS ${EIGEN3_DEFINITIONS}
INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
endif (EIGEN3_FOUND)
endif ()
install(FILES
AddAmdisExecutable.cmake
AmdisMacros.cmake
AMDiSCXXFeatures.cmake
AmdisCXXFeatures.cmake
DESTINATION ${DUNE_INSTALL_MODULEDIR})
/* begin dune-amdis
/* begin amdis
put the definitions for config.h specific to
your project here. Everything above will be
overwritten
......@@ -40,12 +40,17 @@
/* Define to the revision of amdis */
#define AMDIS_VERSION_REVISION @AMDIS_VERSION_REVISION@
/* Define to ENABLE_MTL if the MTL library is available */
#cmakedefine HAVE_MTL ENABLE_MTL
/* Define to ENABLE_EIGEN if the Eigen3 library is available */
#cmakedefine HAVE_EIGEN ENABLE_EIGEN
/* some detected compiler features may be used in AMDiS */
#cmakedefine AMDIS_HAS_CXX_FOLD_EXPRESSIONS 1
#cmakedefine AMDIS_HAS_CXX_CONSTEXPR_IF 1
#cmakedefine AMDIS_HAS_EXPANSION_STATEMENTS 1
/* end dune-amdis
/* end amdis
Everything below here will be overwritten
*/
......@@ -3,7 +3,7 @@ Installation instructions
We provide a *cmake*-based configuration and use the `dunecontrol` build system.
Simply run
```bash
```
dunecontrol --current all
```
......@@ -13,6 +13,7 @@ The `dunecontrol` script searches for the required
- [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry)
- [dune-grid](https://gitlab.dune-project.org/core/dune-grid)
- [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions)
- [dune-istl](https://gitlab.dune-project.org/core/dune-istl)
- [dune-typetree](https://gitlab.dune-project.org/staging/dune-typetree)
- [dune-functions](https://gitlab.dune-project.org/staging/dune-functions)
......@@ -21,28 +22,28 @@ can be obtained from https://gitlab.dune-project.org and need to be found in a
subdirectory of `DUNE_CONTROL_PATH`. See also https://dune-project.org/doc/installation
for details about the installation of dune modules.
Additionally, we require/suggest the following libraries to be found:
Additionally the following optional libraries can be used:
- [MTL4](https://gitlab.math.tu-dresden.de/spraetor/mtl4) (use this fork to get up-to-date changes)
- [Boost](http://www.boost.org) >= 1.40
- [SuiteSparse](http://faculty.cse.tamu.edu/davis/suitesparse.html) (optional)
- [Eigen3](http://eigen.tuxfamily.org) >= 3.3
- [SuiteSparse](http://faculty.cse.tamu.edu/davis/suitesparse.html)
- libalberta >= 3.0 (For Alberta-Grids)
And a compiler that supports the C++14 standard, e.g. `g++` >= 5.0 and `clang` >= 3.6,
and `cmake` >= 3.1.
And a compiler that supports the C++14 standard, e.g. g++ >= 5.0 and clang >= 3.6, and cmake >= 3.1.
By default, the `dune-istl` linear-algebra backend is used. To choose one of `ISTL`, `MTL`, or `EIGEN`, you can specify the cmake parameter `-DBACKEND=[ISTL,MTL,EIGEN]`.
If your MTL4 installation is not found by default, you have to specify the path,
where the file `MTLConfig.cmake` is found, here called `MTL_ROOT`. Then simply use
`dunecontrol` to configure and `cmake` to build:
```bash
CMAKE_FLAGS="-DMTL_DIR:PATH=[MTL_ROOT]" dunecontrol --current all
```
This compiles the library and all examples in the `src/` directory.
CMAKE_FLAGS="-DBACKEND=MTL -DMTL_DIR:PATH=[MTL_ROOT]" dunecontrol --current configure
cmake --build build-cmake
```
Install Dune modules
--------------------
To install all required Dune modules you can either install a debian package (Version 2.6 required), using source packages (e.g. [Version 2.6](https://dune-project.org/releases/2.6.0rc1/)), or install everything from the repository:
To install all required Dune modules you can either install a debian package (Version 2.6 required), using source packages (e.g. [Version 2.6](https://dune-project.org/releases/2.6.0/)), or install everything from the repository:
```bash
cd ${SOURCE_DIR}
......@@ -50,6 +51,7 @@ git clone https://gitlab.dune-project.org/core/dune-common.git
git clone https://gitlab.dune-project.org/core/dune-geometry.git
git clone https://gitlab.dune-project.org/core/dune-grid.git
git clone https://gitlab.dune-project.org/core/dune-localfunctions.git
git clone https://gitlab.dune-project.org/core/dune-istl.git
git clone https://gitlab.dune-project.org/staging/dune-typetree.git
git clone https://gitlab.dune-project.org/staging/dune-functions.git
```
......
......@@ -22,7 +22,7 @@ and \f$ \Gamma \f$ the lower and left edge of the boundary.
using namespace AMDiS;
// A dune grid type
using Grid = Dune::AlbertaGrid<AMDIS_DIM, AMDIS_DOW>;
using Grid = Dune::AlbertaGrid<GRIDDIM, WORLDDIM>;
// A dune-functions globalBasis wrapped in a struct,
// here representing local polynomial shape functions of degree 1
......
# This file contains local changes to the doxygen configuration
# please us '+=' to add file/directories to the lists
PROJECT_NAME = AMDiS
FILE_PATTERNS += *.hpp \
*.cpp \
*.md
......@@ -19,22 +20,22 @@ EXCLUDE_SYMBOLS = AMDiS::Impl \
PREDEFINED += HAVE_UMFPACK \
HAVE_ALBERTA \
HAVE_UG \
AMDIS_BACKEND_MTL
HAVE_MTL
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT += @top_srcdir@/dune/amdis \
@top_srcdir@/dune/amdis/assembler \
@top_srcdir@/dune/amdis/common \
@top_srcdir@/dune/amdis/gridfunctions \
@top_srcdir@/dune/amdis/io \
@top_srcdir@/dune/amdis/linear_algebra \
@top_srcdir@/dune/amdis/linear_algebra/mtl \
@top_srcdir@/dune/amdis/operations \
@top_srcdir@/dune/amdis/utility \
INPUT += @top_srcdir@/src/amdis \
@top_srcdir@/src/amdis/common \
@top_srcdir@/src/amdis/gridfunctions \
@top_srcdir@/src/amdis/linearalgebra \
@top_srcdir@/src/amdis/linearalgebra/mtl \
@top_srcdir@/src/amdis/localoperators \
@top_srcdir@/src/amdis/operations \
@top_srcdir@/src/amdis/typetree \
@top_srcdir@/src/amdis/utility \
@top_srcdir@/doc
# see e.g. dune-grid for the examples of mainpage and modules
#INPUT += @srcdir@/mainpage \
......@@ -44,14 +45,14 @@ INPUT += @top_srcdir@/dune/amdis \
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE += @top_srcdir@/dune/amdis/test \
@top_srcdir@/dune/amdis/linear_algebra/istl
EXCLUDE += @top_srcdir@/src/amdis/linearalgebra/eigen \
@top_srcdir@/src/amdis/linearalgebra/istl
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH += @top_srcdir@/src
EXAMPLE_PATH += @top_srcdir@/examples
# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
......
......@@ -2,10 +2,8 @@
# Dune module information file #
################################
#Name of the module
Module: amdis
Version: 0.1
Maintainer: simon.praetorius@tu-dresden.de
#depending on
Depends: dune-common dune-geometry dune-localfunctions dune-typetree dune-grid dune-functions
#Suggests: dune-uggrid dune-alugrid dune-foamgrid
Depends: dune-common (>= 2.6) dune-geometry (>= 2.6) dune-localfunctions (>= 2.6) dune-typetree (>= 2.6) dune-grid (>= 2.6) dune-functions (>= 2.6)
Suggests: dune-uggrid dune-alugrid dune-foamgrid dune-spgrid
add_custom_target(examples)
set(projects2d "ellipt" "heat" "vecellipt" "stokes0" "stokes1" "stokes3" "navier_stokes")
add_amdis_executable(NAME ellipt.2d SOURCES ellipt.cc DIM 2 DOW 2)
add_amdis_executable(NAME ellipt.3d SOURCES ellipt.cc DIM 3 DOW 3)
add_dependencies(examples
ellipt.2d
ellipt.3d)
foreach(project ${projects2d})
add_executable(${project}.2d ${project}.cc)
add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 ${project}.2d)
target_link_dune_default_libraries(${project}.2d)
target_link_libraries(${project}.2d "amdis")
target_compile_definitions(${project}.2d PRIVATE AMDIS_DIM=2 AMDIS_DOW=2)
add_dependencies(examples ${project}.2d)
endforeach()
add_amdis_executable(NAME heat.2d SOURCES heat.cc DIM 2 DOW 2)
add_amdis_executable(NAME heat.3d SOURCES heat.cc DIM 3 DOW 3)
add_dependencies(examples
heat.2d
heat.3d)
set(projects3d "ellipt" "heat")
foreach(project ${projects3d})
add_executable(${project}.3d ${project}.cc)
add_dune_alberta_flags(GRIDDIM 3 WORLDDIM 3 ${project}.3d)
target_link_dune_default_libraries(${project}.3d)