Public API Definition

DORiE’s Public API comprises the usage of the compiled program as well as the main code segments for using instances of DORiE in other (DUNE) modules and programs.

Command Line API

The compiled program and the Docker application are executed via the Command Line Interface. The specifications for the respective configuration files are given in the Config File Guide.

The main routine (dorie run <config>) also requires input files for boundary conditions and soil parameters.

Code API

DORiE supplies the Simulation template. This is the main class for assembling and running the solver.

template <typename Traits>
class Simulation

Basic Simulation class providing objects and functions for computing the solution.

Subclassed by Dune::Dorie::KnoFuInterface< Traits >

Public Functions

void run()

Execute the simulation until tEnd is reached.

Simulation(Dune::MPIHelper &_helper, std::shared_ptr<Grid> _grid, Dune::ParameterTree &_inifile)

Construct basic simulation. Prepare setup for basic simulation.

Parameters
  • _helper: Dune MPI instance controller
  • _grid: Shared pointer to the grid
  • _inifile: Dune parameter file parser

void operator_setup()

Create the Grid Operators, Solvers, and Time Step Operator.

This function must be called after changes to grid or GFS!

bool compute_time_step()

Compute a time step.

Catch errors in the Newton and the Linear Solver.

Return
True if computation succeeded
Exceptions
  • Dune::Exception: Fatal error occurs during computation

The simulation template requires compile-time type specifications wrapped in a suitable Traits structure.

template <template< int > class GridType, Dune::GeometryType::BasicType GeometryType, int dimension, int order, bool output, bool adaptivity>
struct BaseTraits

Traits struct defining basic types based on grid an geometry.

Public Types

template<>
using RF = double
template<>
using RangeField = RF
template<>
using Array = std::vector<RangeField>
template<>
using Scalar = Dune::FieldVector<RF, 1>
template<>
using Vector = Dune::FieldVector<RF, dim>
template<>
using Tensor = Dune::FieldMatrix<RF, dim, dim>
template<>
using Index = unsigned int
template<>
using IndexArray = Dune::FieldVector<Index, dim>
template<>
using Grid = GridType<dim>
template<>
using DomainField = typename Grid::ctype
template<>
using DF = DomainField
template<>
using Domain = Dune::FieldVector<DF, dim>
template<>
using IntersectionDomain = Dune::FieldVector<DF, dim - 1>
template<>
using GV = typename Grid::LeafGridView
template<>
using GridView = GV
template<>
using Element = typename GV::Traits::template Codim<0>::Entity
template<>
using Intersection = typename GV::Traits::Intersection

Public Static Attributes

constexpr int dim = dimension
constexpr int fem_order = order
constexpr bool write_output = output
constexpr bool adapt_grid = adaptivity
constexpr Dune::GeometryType::BasicType GridGeometryType = GeometryType