Commit 00f5e36e authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'sospinar/dorie-rework/header-system'

See merge request !60
parents 1c710199 98044025
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* Use the `OVLP_AMG_4_DG` linear solver for all computations, including * Use the `OVLP_AMG_4_DG` linear solver for all computations, including
sequential ones. This significantly improves performance for large problems. sequential ones. This significantly improves performance for large problems.
* Change compilation order which reduces RAM usage when compiling in parallel. * Change compilation order which reduces RAM usage when compiling in parallel.
* Decentralization of the header system so that in most of the header files are
independent of each other
### Fixed ### Fixed
* The source code is now compatible to the Clang LLVM compiler. * The source code is now compatible to the Clang LLVM compiler.
......
...@@ -3,7 +3,23 @@ ...@@ -3,7 +3,23 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh> // System and DUNE Headers
#include <string>
#include <iostream>
#include <cstdio>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/parametertreeparser.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/uggrid.hh>
#include "interface/simulation.hh"
#include "solver/util_grid_creator.hh"
// #include <dune/dorie/dorie.hh> // System and DUNE Headers
//=============================================================== //===============================================================
// Main program with grid setup // Main program with grid setup
......
#ifndef DORIE_HH
#define DORIE_HH
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <string>
#include <stdlib.h>
#include <fstream>
#include <cmath>
#include <memory>
#include <utility>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <hdf5.h>
// Do not treat DUNE warnings as errors
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#if __clang__
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#endif
#if __GNUC__ > 5
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/ios_state.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/exceptions.hh>
#include <dune/common/timer.hh>
#include <dune/common/parametertreeparser.hh>
#include <dune/grid/uggrid.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/io/file/vtk/vtksequencewriter.hh>
#include <dune/grid/io/file/gmshreader.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
#include <dune/geometry/type.hh>
#include <dune/localfunctions/common/interfaceswitch.hh>
#include <dune/pdelab/adaptivity/adaptivity.hh>
#include <dune/pdelab/backend/istl.hh>
#include <dune/pdelab/backend/interface.hh>
#include <dune/pdelab/common/function.hh>
#include <dune/pdelab/constraints/p0.hh>
#include <dune/pdelab/constraints/p0ghost.hh>
#include <dune/pdelab/constraints/conforming.hh>
#include <dune/pdelab/constraints/common/constraints.hh>
#include <dune/pdelab/finiteelementmap/qkdg.hh>
#include <dune/pdelab/finiteelementmap/p0fem.hh>
#include <dune/pdelab/finiteelementmap/pkfem.hh>
#include <dune/pdelab/gridfunctionspace/gridfunctionspace.hh>
#include <dune/pdelab/gridfunctionspace/localfunctionspace.hh>
#include <dune/pdelab/gridoperator/gridoperator.hh>
#include <dune/pdelab/gridoperator/onestep.hh>
#include <dune/pdelab/instationary/onestep.hh>
#include <dune/pdelab/instationary/onestepparameter.hh>
#include <dune/pdelab/newton/newton.hh>
#include <dune/pdelab/stationary/linearproblem.hh>
#pragma GCC diagnostic pop
#include <dune/dorie/solver.hh>
#include <dune/dorie/interface.hh>
#endif // DORIE_HH
#ifndef DUNE_DORIE_IMPL_HH #ifndef DUNE_DORIE_IMPL_HH
#define DUNE_DORIE_IMPL_HH #define DUNE_DORIE_IMPL_HH
#include <dune/grid/yaspgrid.hh>
#include <dune/geometry/type.hh>
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "config.h" #include "config.h"
#endif #endif
#include <dune/dorie/dorie.hh>
#include <dune/dorie/impl/impl.hh> #include <dune/dorie/impl/impl.hh>
#include <dune/dorie/interface/simulation.cc> #include <dune/dorie/interface/simulation.cc>
......
#ifndef DUNE_DORIE_INTERFACE_HH
#define DUNE_DORIE_INTERFACE_HH
#include <dune/dorie/interface/util.hh>
#include <dune/dorie/interface/adaptivity.hh>
#include <dune/dorie/interface/output.hh>
#include <dune/dorie/interface/simulation.hh>
#include <dune/dorie/interface/knofu.hh>
#endif // DUNE_DORIE_INTERFACE_HH
#ifndef DUNE_DORIE_ADAPTIVITY_HH #ifndef DUNE_DORIE_ADAPTIVITY_HH
#define DUNE_DORIE_ADAPTIVITY_HH #define DUNE_DORIE_ADAPTIVITY_HH
#include <iostream>
#include <string>
#include <memory>
#include <type_traits>
#include <dune/common/exceptions.hh>
#include <dune/common/ios_state.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/timer.hh>
#include <dune/grid/uggrid.hh>
#include <dune/pdelab/backend/istl.hh>
#include <dune/pdelab/adaptivity/adaptivity.hh>
#include "../solver/operator_error_indicator.hh"
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_OUTPUT_WRITER_HH #ifndef DUNE_DORIE_OUTPUT_WRITER_HH
#define DUNE_DORIE_OUTPUT_WRITER_HH #define DUNE_DORIE_OUTPUT_WRITER_HH
#include <string>
#include <memory>
#include <type_traits>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/grid/io/file/vtk/vtksequencewriter.hh>
#include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh>
#include "../solver/util_vtk_adapters.hh"
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_SIMULATION_HH #ifndef DUNE_DORIE_SIMULATION_HH
#define DUNE_DORIE_SIMULATION_HH #define DUNE_DORIE_SIMULATION_HH
#include <memory>
#include <string>
#include <iostream>
#include <dune/common/parametertree.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/pdelab/backend/istl.hh>
#include <dune/pdelab/gridoperator/gridoperator.hh>
#include <dune/pdelab/gridoperator/onestep.hh>
#include <dune/pdelab/newton/newton.hh>
#include "util.hh"
#include "output.hh"
#include "adaptivity.hh"
#include "../solver/util_interpolator.hh"
#include "../solver/param_factory.hh"
#include "../solver/richards_boundary.hh"
#include "../solver/richards_source.hh"
#include "../solver/richards_initial.hh"
#include "../solver/operator_DG.hh"
#include "../solver/util_controller.hh"
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_UTIL_HH #ifndef DUNE_DORIE_UTIL_HH
#define DUNE_DORIE_UTIL_HH #define DUNE_DORIE_UTIL_HH
#include <iostream>
#include <memory>
#include <vector>
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/geometry/type.hh>
#include <dune/pdelab/gridfunctionspace/gridfunctionspace.hh>
#include <dune/pdelab/constraints/p0.hh>
#include <dune/pdelab/finiteelementmap/p0fem.hh>
#include <dune/pdelab/finiteelementmap/qkdg.hh>
#include <dune/pdelab/finiteelementmap/opbfem.hh> #include <dune/pdelab/finiteelementmap/opbfem.hh>
namespace Dune{ namespace Dune{
......
#ifndef DUNE_DORIE_SOLVER_HH
#define DUNE_DORIE_SOLVER_HH
#include <dune/dorie/solver/util_typedefs.hh>
#include <dune/dorie/solver/util_vtk_adapters.hh>
#include <dune/dorie/solver/util_grid_creator.hh>
#include <dune/dorie/solver/util_boundary_condition.hh>
#include <dune/dorie/solver/util_controller.hh>
#include <dune/dorie/solver/util_h5tools.hh>
#include <dune/dorie/solver/richards_initial.hh>
#include <dune/dorie/solver/richards_boundary.hh>
#include <dune/dorie/solver/richards_source.hh>
#include <dune/dorie/solver/util_interpolator.hh>
#include <dune/dorie/solver/param_base.hh>
#include <dune/dorie/solver/param_van_genuchten.hh>
#include <dune/dorie/solver/param_factory.hh>
#include <dune/dorie/solver/operator_DG.hh>
#include <dune/dorie/solver/operator_error_indicator.hh>
#endif // DUNE_DORIE_SOLVER_HH
...@@ -2,16 +2,26 @@ ...@@ -2,16 +2,26 @@
#ifndef DUNE_DORIE_RICHARDS_OPERATOR_HH #ifndef DUNE_DORIE_RICHARDS_OPERATOR_HH
#define DUNE_DORIE_RICHARDS_OPERATOR_HH #define DUNE_DORIE_RICHARDS_OPERATOR_HH
#include<dune/geometry/referenceelements.hh> #include <string>
#include <tuple>
#include <map>
#include <vector>
#include <dune/common/parametertree.hh>
#include <dune/common/exceptions.hh>
#include <dune/geometry/referenceelements.hh>
#include <dune/grid/common/mcmgmapper.hh> #include <dune/grid/common/mcmgmapper.hh>
#include<dune/pdelab/common/quadraturerules.hh> #include <dune/pdelab/common/quadraturerules.hh>
#include<dune/pdelab/localoperator/pattern.hh> #include <dune/pdelab/localoperator/pattern.hh>
#include<dune/pdelab/localoperator/flags.hh> #include <dune/pdelab/localoperator/flags.hh>
#include<dune/pdelab/localoperator/idefault.hh> #include <dune/pdelab/localoperator/idefault.hh>
#include<dune/pdelab/localoperator/defaultimp.hh> #include <dune/pdelab/localoperator/defaultimp.hh>
#include<dune/pdelab/finiteelement/localbasiscache.hh> #include <dune/pdelab/finiteelement/localbasiscache.hh>
#include "util_typedefs.hh"
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
#ifndef DUNE_DORIE_ERROR_INDICATOR_HH #ifndef DUNE_DORIE_ERROR_INDICATOR_HH
#define DUNE_DORIE_ERROR_INDICATOR_HH #define DUNE_DORIE_ERROR_INDICATOR_HH
#include<dune/geometry/referenceelements.hh> #include <vector>
#include<dune/pdelab/common/quadraturerules.hh> #include <dune/common/fvector.hh>
#include<dune/pdelab/localoperator/pattern.hh> #include <dune/common/parametertree.hh>
#include<dune/pdelab/localoperator/flags.hh>
#include<dune/pdelab/localoperator/idefault.hh> #include <dune/geometry/referenceelements.hh>
#include<dune/pdelab/localoperator/defaultimp.hh>
#include<dune/pdelab/finiteelement/localbasiscache.hh> #include <dune/pdelab/common/quadraturerules.hh>
#include <dune/pdelab/localoperator/pattern.hh>
#include <dune/pdelab/localoperator/flags.hh>
#include <dune/pdelab/localoperator/idefault.hh>
#include <dune/pdelab/localoperator/defaultimp.hh>
#include <dune/pdelab/finiteelement/localbasiscache.hh>
#include "operator_DG.hh"
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
#ifndef DUNE_DORIE_PARAMETERS_BASE_HH #ifndef DUNE_DORIE_PARAMETERS_BASE_HH
#define DUNE_DORIE_PARAMETERS_BASE_HH #define DUNE_DORIE_PARAMETERS_BASE_HH
#include <string>
#include <cmath>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/parallel/mpihelper.hh>
#include "util_h5tools.hh"
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
#ifndef DUNE_DORIE_PARAMETERS_FACTORY_HH #ifndef DUNE_DORIE_PARAMETERS_FACTORY_HH
#define DUNE_DORIE_PARAMETERS_FACTORY_HH #define DUNE_DORIE_PARAMETERS_FACTORY_HH
#include <string>
#include <memory>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/parallel/mpihelper.hh>
#include "param_van_genuchten.hh"
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
#ifndef DUNE_DORIE_PARAMETERS_VAN_GENUCHTEN_HH #ifndef DUNE_DORIE_PARAMETERS_VAN_GENUCHTEN_HH
#define DUNE_DORIE_PARAMETERS_VAN_GENUCHTEN_HH #define DUNE_DORIE_PARAMETERS_VAN_GENUCHTEN_HH
#include <vector>
#include <cmath>
#include <dune/common/parametertree.hh>
#include <dune/common/parallel/mpihelper.hh>
#include "param_base.hh"
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
#ifndef DUNE_DORIE_RICHARDS_BOUNDARY_HH #ifndef DUNE_DORIE_RICHARDS_BOUNDARY_HH
#define DUNE_DORIE_RICHARDS_BOUNDARY_HH #define DUNE_DORIE_RICHARDS_BOUNDARY_HH
#include <memory>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include "util_boundary_condition.hh"
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_RICHARDS_INITIAL_HH #ifndef DUNE_DORIE_RICHARDS_INITIAL_HH
#define DUNE_DORIE_RICHARDS_INITIAL_HH #define DUNE_DORIE_RICHARDS_INITIAL_HH
#include <string>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/pdelab/common/function.hh>
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#ifndef DUNE_DORIE_RICHARDS_SOURCE_HH #ifndef DUNE_DORIE_RICHARDS_SOURCE_HH
#define DUNE_DORIE_RICHARDS_SOURCE_HH #define DUNE_DORIE_RICHARDS_SOURCE_HH
#include <dune/common/parametertree.hh>
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_UTIL_BOUNDARY_CONDITION_HH #ifndef DUNE_DORIE_UTIL_BOUNDARY_CONDITION_HH
#define DUNE_DORIE_UTIL_BOUNDARY_CONDITION_HH #define DUNE_DORIE_UTIL_BOUNDARY_CONDITION_HH
#include <vector>
#include <array>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <dune/common/exceptions.hh>
#include "util_typedefs.hh"
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_CALCULATION_CONTROLLER_HH #ifndef DUNE_DORIE_CALCULATION_CONTROLLER_HH
#define DUNE_DORIE_CALCULATION_CONTROLLER_HH #define DUNE_DORIE_CALCULATION_CONTROLLER_HH
#include <iostream>
#include <cmath>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_GRID_CREATOR_HH #ifndef DUNE_DORIE_GRID_CREATOR_HH
#define DUNE_DORIE_GRID_CREATOR_HH #define DUNE_DORIE_GRID_CREATOR_HH
#include <memory>
#include <array>
#include <vector>
#include <iostream>
#include <stream>
#include <type_traits>
#include <dune/common/timer.hh>
#include <dune/common/ios_state.hh>
#include <dune/common/fvector.hh>
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/uggrid.hh>
#include <dune/grid/io/file/gmshreader.hh>
#include <dune/grid/common/gridfactory.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
......
...@@ -2,6 +2,17 @@ ...@@ -2,6 +2,17 @@
#ifndef DUNE_DORIE_UTIL_H5FILE_HH #ifndef DUNE_DORIE_UTIL_H5FILE_HH
#define DUNE_DORIE_UTIL_H5FILE_HH #define DUNE_DORIE_UTIL_H5FILE_HH
#include <string>
#include <cassert>
#include <iostream>
#include <vector>
#include <array>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <hdf5.h>
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
class H5File class H5File
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
#ifndef DUNE_DORIE_UTIL_INTERPOLATOR_HH #ifndef DUNE_DORIE_UTIL_INTERPOLATOR_HH
#define DUNE_DORIE_UTIL_INTERPOLATOR_HH #define DUNE_DORIE_UTIL_INTERPOLATOR_HH
#include <cmath>
#include <memory>
#include <dune/common/parametertree.hh>
#include <dune/common/fvector.hh>
namespace Dune { namespace Dune {
namespace Dorie { namespace Dorie {
enum InterpolationMethod {nearest, linear, cubic}; enum InterpolationMethod {nearest, linear, cubic};
......
#ifndef DUNE_DORIE_TYPEDEFS_HH #ifndef DUNE_DORIE_TYPEDEFS_HH
#define DUNE_DORIE_TYPEDEFS_HH #define DUNE_DORIE_TYPEDEFS_HH
#include <dune/pdelab/common/function.hh>
namespace Dune{ namespace Dune{
namespace Dorie{ namespace Dorie{
......
#ifndef DUNE_DORIE_FLUX_ADAPTER_HH #ifndef DUNE_DORIE_FLUX_ADAPTER_HH</