The TS-GitLab will have to shut down towards the end of the year — please think about migrating your projects to GitLab.com or GitHub.
(This is still a very early message, meant to keep you informed. There will be more urgent ones in the future.)

Commit 94523321 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'update/dune-v2.5' into 'master'

Update to Dune v2.5

See merge request !1
parents efc64606 b89548f8
image: dorie/dune-env:2.4
image: dorie/dune-env:2.5
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
......@@ -29,13 +29,10 @@ build:python3:
tags:
- docker
script:
- cd /opt/dune/venv
- virtualenv dorie3 --py=/usr/bin/python3
- source /opt/dune/venv/dorie3/bin/activate
- python -m pip install virtualenv
- cd /opt/dune
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
- ./dune-common/bin/dunecontrol --only=dune-python exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol --only=dune-testtools exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol --only=dorie exec "rm -rf build-cmake"
- CMAKE_FLAGS="-DDUNE_FORCE_PYTHON3=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
stage: build
......
......@@ -32,6 +32,9 @@ dune_project()
dune_enable_all_packages()
dune_require_cxx_standard(MODULE "dorie" VERSION 14)
# avoid the executables from being 'excluded from all'
set(DUNE_BUILD_TESTS_ON_MAKE_ALL TRUE)
# add subdirectories
add_subdirectory("bin")
add_subdirectory("m4")
......
FROM dorie/dune-env:2.4
FROM dorie/dune-env:2.5
MAINTAINER Dion Häfner
WORKDIR /opt/dune
......
......@@ -34,10 +34,10 @@ In the section 'Usage' you will find a list of possible commands. Note that inpu
## Docker Installation - Interactive Setup
This setup is intended for advanced users. You will gain access to the DORiE module outside the container, and be able to make changes to the source code.
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.4 (referencing the DUNE module version 2.4).
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5 (referencing the DUNE module version 2.5).
Run a new container from this image by calling
docker run -i -t dorie/dune-env:2.4 /bin/bash
docker run -i -t dorie/dune-env:2.5 /bin/bash
Docker will automatically download the image if necessary. Use the `-v` option of the `run` command to mount a local directory into the container:
......@@ -85,19 +85,20 @@ Depending on your system configuration, there will be more packages necessary to
| FFTW3 | | with MPI support
| Python | 2.7 or 3.x |
| pip | 2.7 or 3.x |
| MPI | | Tested with OpenMPI and Mpich
| MPI | | Tested with OpenMPI
| SuperLU | 4.3 or 5.x |
| VirtualEnv | | Install via `pip` |
| [UG](https://gitlab.dune-project.org/ug/ug) | 3.12.1 | Follow the [IWR Installation Instructions](http://www.iwr.uni-heidelberg.de/frame/iwrwikiequipment/software/ug)
| [dune-common](https://gitlab.dune-project.org/core/dune-common) | releases/2.4
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.4
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.4
| [dune-istl](https://gitlab.dune-project.org/core/dune-istl) | releases/2.4
| [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions) | releases/2.4
| [dune-typetree](https://gitlab.dune-project.org/pdelab/dune-typetree) | releases/2.4
| [dune-pdelab](https://gitlab.dune-project.org/pdelab/dune-pdelab) | releases/2.4
| [dune-python](https://gitlab.dune-project.org/quality/dune-python) | releases/2.4
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | releases/2.4
| [dune-common](https://gitlab.dune-project.org/core/dune-common) | releases/2.5
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.5
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.5
[dune-uggrid](https://gitlab.dune-project.org/staging/dune-uggrid) | releases/2.5
| [dune-istl](https://gitlab.dune-project.org/core/dune-istl) | releases/2.5
| [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions) | releases/2.5
| [dune-functions](https://gitlab.dune-project.org/staging/dune-functions) | releases/2.5
| [dune-typetree](https://gitlab.dune-project.org/staging/dune-typetree) | master
| [dune-pdelab](https://gitlab.dune-project.org/pdelab/dune-pdelab) | releases/2.5
| [dune-python](https://gitlab.dune-project.org/quality/dune-python) | releases/2.5
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | releases/2.5
If you also want to build the documentation, you will additionally need to install Doxygen, Sphinx and Breathe.
......@@ -119,14 +120,10 @@ These instructions are suitable for a clean **Ubuntu** or **Mac OS X** setup. Th
brew update
brew install automake cmake doxygen gcc libtool libpng open-mpi \
pkg-config superlu
pkg-config python3 superlu
brew install hdf5 --with-mpi
brew install fftw --with-mpi
Install the PyPi package manager pip by downloading the [get_pip.py](https://bootstrap.pypa.io/get-pip.py) script and calling
sudo -H python get_pip.py
2. Install the necessary Python packages using `pip`:
**Ubuntu:**
......@@ -135,7 +132,7 @@ These instructions are suitable for a clean **Ubuntu** or **Mac OS X** setup. Th
**Mac OS X:**
sudo -H python -m pip install virtualenv sphinx==1.3.6 breathe --ignore-installed
sudo -H python3 -m pip install virtualenv sphinx breathe
3. **Mac OS X** only:
The Apple Clang compiler shipped with CMake is not suitable for compiling DUNE and UG. Before proceeding, call
......@@ -145,23 +142,23 @@ These instructions are suitable for a clean **Ubuntu** or **Mac OS X** setup. Th
to enfore the Homebrew'd GCC compiler. Note that this variable export only lasts for your current terminal session. Always make sure that the configuration tool actually finds GCC instead of the Apple Clang.
3. Clone the specified version of UG into a suitable folder on your machine. Install it by calling
4. Clone the DUNE modules and DORiE into a suitable folder on your machine. Make sure that you check out the correct branches (see above). Enter the parent folder, and call
**Ubuntu:**
autoreconf -is
./configure --enable-parallel --without-x --enable-dune --enable-system-heap
make && make install
MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
4. Clone the DUNE modules and DORiE into a suitable folder on your machine. Make sure that you check out the correct branches (2.4 release branch). Enter the parent folder, and call
**Mac OS X:**
MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
CMAKE_FLAGS="-DDUNE_FORCE_PYTHON3=True" MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
to build all DUNE modules in parallel on `N` processes. If you installed software into paths not appended to your `PATH` variable, you will have to add a custom options file to make sure that CMake finds all packages. See the [DUNE Installation Instructions](https://dune-project.org/doc/installation/) for details. CMake will throw an error if required packages are not found.
to build all DUNE modules in parallel on `N` processes. If you installed software into paths not appended to your `PATH` variable, you will have to add `CMAKE_FLAGS` to the call to make sure that CMake finds all packages. Alternatively, you can add a custom options file. See the [DUNE Installation Instructions](https://dune-project.org/doc/installation/) for details. CMake will throw an error if required packages are not found.
5. To install all DUNE packages into system locations (so you can call `dunecontrol` and `dorie` from anywhere), you can run
./dune-common/bin/dunecontrol make install
This may require `sudo` rights on your machine. If you choose not to do this, make sure to append the location of `dunecontrol` (`dune-common/bin`) and `dorie` (`dorie/build-cmake/bin`) to your search path.
which may require `sudo` rights on your machine. This action is **optional and not required to run DORiE**. If you choose not to install DORiE, make sure to append the location of `dunecontrol` (`dune-common/bin`) and `dorie` (`dorie/build-cmake/bin`) to your search path.
## Recommended Third-Party Software
......@@ -225,7 +222,7 @@ or
## Troubleshooting
CMake heavily caches the results of its configuration process. In case you encounter errors or strange behavior, especially after an update, you should delete the DORiE build folder (called `build-cmake` by default) and re-install DORiE using `dunecontrol`.
If the problem persists, take a look at the [List of Known Bugs](http://shangrila.iup.uni-heidelberg.de:30000/dorie/dorie-new/issues?assignee_id=&author_id=&label_name=bug&milestone_id=&scope=all&sort=created_desc&state=opened), or create an issue yourself. For problems related to the installation, refer to the sections below.
If the problem persists, take a look at the [List of Known Bugs](https://zwackelmann.iup.uni-heidelberg.de:10443/dorie/dorie/issues), or create an issue yourself. For problems related to the installation, refer to the sections below.
### Debugging
DORiE can be built with debugging flags via CMake. To do so, run
......@@ -255,4 +252,4 @@ You can execute system tests in order to ensure that DORiE is running correctly
You will be informed whether each test has been passed or failed, and you may find additional output in the DORiE build directory.
### Further Help
[Open an issue](http://shangrila.iup.uni-heidelberg.de:30000/dorie/dorie-new/issues/new), or write to the [DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).
[Open an issue](https://zwackelmann.iup.uni-heidelberg.de:10443/dorie/dorie/issues/new), or write to the [DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).
add_executable("dorie-rfg" dorie-rfg.cc)
target_link_dune_default_libraries("dorie-rfg")
\ No newline at end of file
dune_target_link_libraries(dorie-rfg ${DUNE_LIBS})
\ No newline at end of file
......@@ -3,4 +3,4 @@ add_subdirectory(solver)
add_subdirectory(impl)
add_executable("dorie" dorie.cc)
dune_target_link_libraries(dorie doriesim)
\ No newline at end of file
dune_target_link_libraries(dorie dorie-impl ${DUNE_LIBS})
\ No newline at end of file
......@@ -38,6 +38,8 @@
#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>
......@@ -48,6 +50,7 @@
#include <dune/pdelab/finiteelementmap/qkdg.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>
......
dune_add_library(simulations OBJECT
add_library(dorie-impl STATIC
sim_ug_2_1.cc
sim_ug_2_2.cc
sim_ug_2_3.cc
......
......@@ -169,8 +169,8 @@ public:
SolutionContainer kfu_raw = cache_water_content();
std::vector<RF> res(kfu_raw.size());
typedef LocalFunctionSpace<KFGFS> LFS;
typedef LFSIndexCache<LFS> LFSCache;
typedef Dune::PDELab::LocalFunctionSpace<KFGFS> LFS;
typedef Dune::PDELab::LFSIndexCache<LFS> LFSCache;
typedef typename KFU::template ConstLocalView<LFSCache> XView;
typedef FiniteElementInterfaceSwitch<
typename Dune::PDELab::LocalFunctionSpace<KFGFS>::Traits::FiniteElementType
......
......@@ -70,13 +70,13 @@ void Simulation<Traits>::operator_setup ()
pdesolver->setVerbosityLevel(verbose);
// --- Time Step Operators ---
Dune::Dorie::OneStepMethodResult osm_result;
Dune::PDELab::OneStepMethodResult osm_result;
if(osm){
osm_result = osm->result(); // cache old result
}
osm = std::make_unique<OSM>(alex2,*igo,*pdesolver,osm_result);
osm = std::make_unique<OSM>(alex2,*igo,*pdesolver);
osm->setResult(osm_result);
osm->setVerbosityLevel(verbose+1);
osm->setStepNumber(osm_result.successful.timesteps+1);
gfs->update();
......
......@@ -63,7 +63,7 @@ protected:
/// Time stepping scheme
using TimeStepScheme = Dune::PDELab::Alexander2Parameter<RF>;
/// Method computing the time step
using OSM = Dune::Dorie::OneStepMethod<RF,IGO,PDESOLVER,U,U>;
using OSM = Dune::PDELab::OneStepMethod<RF,IGO,PDESOLVER,U,U>;
// -- Utility Class Definitions -- //
/// VTK Output writer base class
......
......@@ -16,6 +16,5 @@
#include <dune/dorie/solver/param_factory.hh>
#include <dune/dorie/solver/operator_DG.hh>
#include <dune/dorie/solver/operator_error_indicator.hh>
#include <dune/dorie/solver/dune_implicitonestep.hh>
#endif // DUNE_DORIE_SOLVER_HH
// -*- tab-width: 2; indent-tabs-mode: nil -*-
// vi: set et ts=2 sw=2 sts=2:
#ifndef DUNE_DORIE_INSTATIONARY_IMPLICITONESTEP_HH
#define DUNE_DORIE_INSTATIONARY_IMPLICITONESTEP_HH
namespace Dune {
namespace Dorie {
using namespace Dune::PDELab;
//
// ONE STEP METHOD OPERATOR FOR DORIE
// Changes:
// - Previous results can be passed in constructor (15-11-06)
/**
* @addtogroup OneStepMethod
* @{
*/
// Status information of Newton's method
struct OneStepMethodPartialResult
{
unsigned int timesteps;
double assembler_time;
double linear_solver_time;
int linear_solver_iterations;
int nonlinear_solver_iterations;
OneStepMethodPartialResult() :
timesteps(0),
assembler_time(0.0),
linear_solver_time(0.0),
linear_solver_iterations(0),
nonlinear_solver_iterations(0)
{}
};
struct OneStepMethodResult
{
OneStepMethodPartialResult total;
OneStepMethodPartialResult successful;
OneStepMethodResult() : total(), successful()
{}
};
//! Do one step of a time-stepping scheme
/**
* \tparam T type to represent time values
* \tparam IGOS assembler for instationary problems
* \tparam PDESOLVER solver problem in each step (typically Newton)
* \tparam TrlV vector type to represent coefficients of solutions
* \tparam TstV vector type to represent residuals
*/
template<class T, class IGOS, class PDESOLVER, class TrlV, class TstV = TrlV>
class OneStepMethod
{
typedef typename PDESOLVER::Result PDESolverResult;
public:
typedef OneStepMethodResult Result;
//! construct a new one step scheme
/**
* \param method_ Parameter object. This chooses the actual method
* used.
* \param igos_ Assembler object (instationary grid operator space).
* \param pdesolver_ solver object (typically Newton).
*
* The contructed method object stores references to the object it is
* constructed with, so these objects should be valid for as long as the
* constructed object is used (or until setMethod() is called, see
* there).
*/
OneStepMethod(const TimeSteppingParameterInterface<T>& method_,
IGOS& igos_, PDESOLVER& pdesolver_, Result& res_)
: method(&method_), igos(igos_), pdesolver(pdesolver_), verbosityLevel(1), step(1), res(res_)
{
if (igos.trialGridFunctionSpace().gridView().comm().rank()>0)
verbosityLevel = 0;
}
OneStepMethod(const TimeSteppingParameterInterface<T>& method_,
IGOS& igos_, PDESOLVER& pdesolver_)
: method(&method_), igos(igos_), pdesolver(pdesolver_), verbosityLevel(1), step(1), res()
{
if (igos.trialGridFunctionSpace().gridView().comm().rank()>0)
verbosityLevel = 0;
}
//! change verbosity level; 0 means completely quiet
void setVerbosityLevel (int level)
{
if (igos.trialGridFunctionSpace().gridView().comm().rank()>0)
verbosityLevel = 0;
else
verbosityLevel = level;
}
//! change number of current step
void setStepNumber(int newstep) { step = newstep; }
//! Access to the (non) linear solver
const PDESOLVER & getPDESolver() const
{
return pdesolver;
}
//! Access to the (non) linear solver
PDESOLVER & getPDESolver()
{
return pdesolver;
}
const Result& result() const
{
return res;
}
//! redefine the method to be used; can be done before every step
/**
* \param method_ Parameter object.
*
* The OneStepMethod object stores a reference to the method_ object.
* The old method object is no longer referenced after this member
* function returns.
*/
void setMethod (const TimeSteppingParameterInterface<T>& method_)
{
method = &method_;
}
/*! \brief do one step;
* \param[in] time start of time step
* \param[in] dt suggested time step size
* \param[in] xold value at begin of time step
* \param[in,out] xnew value at end of time step; contains initial guess for first substep on entry
* \return selected time step size
*/
T apply (T time, T dt, TrlV& xold, TrlV& xnew)
{
// save formatting attributes
ios_base_all_saver format_attribute_saver(std::cout);
// do statistics
OneStepMethodPartialResult step_result;
std::vector<TrlV*> x(1); // vector of pointers to all steps
x[0] = &xold; // initially we have only one
if (verbosityLevel>=1){
std::ios_base::fmtflags oldflags = std::cout.flags();
std::cout << "TIME STEP [" << method->name() << "] "
<< std::setw(6) << step
<< " time (from): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time
<< " dt: "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< dt
<< " time (to): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time+dt
<< std::endl;
std::cout.flags(oldflags);
}
// prepare assembler
igos.preStep(*method,time,dt);
// loop over all stages
for (unsigned r=1; r<=method->s(); ++r)
{
if (verbosityLevel>=2){
std::ios_base::fmtflags oldflags = std::cout.flags();
std::cout << "STAGE "
<< r
<< " time (to): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time+method->d(r)*dt
<< "." << std::endl;
std::cout.flags(oldflags);
}
// prepare stage
igos.preStage(r,x);
// get vector for current stage
if (r==method->s())
{
// last stage
x.push_back(&xnew);
if (r>1) xnew = *(x[r-1]); // if r=1 then xnew has already initial guess
}
else
{
// intermediate step
x.push_back(new TrlV(igos.trialGridFunctionSpace()));
if (r>1)
*(x[r]) = *(x[r-1]); // use result of last stage as initial guess
else
*(x[r]) = xnew;
}
// solve stage
try {
pdesolver.apply(*x[r]);
}
catch (...)
{
// time step failed -> accumulate to total only
PDESolverResult pderes = pdesolver.result();
step_result.assembler_time += pderes.assembler_time;
step_result.linear_solver_time += pderes.linear_solver_time;
step_result.linear_solver_iterations += pderes.linear_solver_iterations;
step_result.nonlinear_solver_iterations += pderes.iterations;
res.total.assembler_time += step_result.assembler_time;
res.total.linear_solver_time += step_result.linear_solver_time;
res.total.linear_solver_iterations += step_result.linear_solver_iterations;
res.total.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.total.timesteps += 1;
throw;
}
PDESolverResult pderes = pdesolver.result();
step_result.assembler_time += pderes.assembler_time;
step_result.linear_solver_time += pderes.linear_solver_time;
step_result.linear_solver_iterations += pderes.linear_solver_iterations;
step_result.nonlinear_solver_iterations += pderes.iterations;
// stage cleanup
igos.postStage();
}
// delete intermediate steps
for (unsigned i=1; i<method->s(); ++i) delete x[i];
// step cleanup
igos.postStep();
// update statistics
res.total.assembler_time += step_result.assembler_time;
res.total.linear_solver_time += step_result.linear_solver_time;
res.total.linear_solver_iterations += step_result.linear_solver_iterations;
res.total.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.total.timesteps += 1;
res.successful.assembler_time += step_result.assembler_time;
res.successful.linear_solver_time += step_result.linear_solver_time;
res.successful.linear_solver_iterations += step_result.linear_solver_iterations;
res.successful.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.successful.timesteps += 1;
if (verbosityLevel>=1){
std::ios_base::fmtflags oldflags = std::cout.flags();
std::cout << "::: timesteps " << std::setw(6) << res.successful.timesteps
<< " (" << res.total.timesteps << ")" << std::endl;
std::cout << "::: nl iterations " << std::setw(6) << res.successful.nonlinear_solver_iterations
<< " (" << res.total.nonlinear_solver_iterations << ")" << std::endl;
std::cout << "::: lin iterations " << std::setw(6) << res.successful.linear_solver_iterations
<< " (" << res.total.linear_solver_iterations << ")" << std::endl;
std::cout << "::: assemble time " << std::setw(12) << std::setprecision(4) << std::scientific
<< res.successful.assembler_time << " (" << res.total.assembler_time << ")" << std::endl;
std::cout << "::: lin solve time " << std::setw(12) << std::setprecision(4) << std::scientific
<< res.successful.linear_solver_time << " (" << res.total.linear_solver_time << ")" << std::endl;
std::cout.flags(oldflags);
}
step++;
return dt;
}
/*! \brief do one step;
* This is a version which interpolates constraints at the start of each stage
*
* \param[in] time start of time step
* \param[in] dt suggested time step size
* \param[in] xold value at begin of time step
* \param[in] f function to interpolate boundary conditions from
* \param[in,out] xnew value at end of time step; contains initial guess for first substep on entry
* \return selected time step size
*/
template<typename F>
T apply (T time, T dt, TrlV& xold, F& f, TrlV& xnew)
{
// do statistics
OneStepMethodPartialResult step_result;
// save formatting attributes
ios_base_all_saver format_attribute_saver(std::cout);
std::vector<TrlV*> x(1); // vector of pointers to all steps
x[0] = &xold; // initially we have only one
if (verbosityLevel>=1){
std::ios_base::fmtflags oldflags = std::cout.flags();
std::cout << "TIME STEP [" << method->name() << "] "
<< std::setw(6) << step
<< " time (from): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time
<< " dt: "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< dt
<< " time (to): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time+dt
<< std::endl;
std::cout.flags(oldflags);
}
// prepare assembler
igos.preStep(*method,time,dt);
// loop over all stages
for (unsigned r=1; r<=method->s(); ++r)
{
if (verbosityLevel>=2){
std::ios_base::fmtflags oldflags = std::cout.flags();
std::cout << "STAGE "
<< r
<< " time (to): "
<< std::setw(12) << std::setprecision(4) << std::scientific
<< time+method->d(r)*dt
<< "." << std::endl;
std::cout.flags(oldflags);
}
// prepare stage
igos.preStage(r,x);
// get vector for current stage
if (r==method->s())
{
// last stage
x.push_back(&xnew);
}
else
{
// intermediate step
x.push_back(new TrlV(igos.trialGridFunctionSpace()));
}
// set boundary conditions and initial value
igos.interpolate(r,*x[r-1],f,*x[r]);
// solve stage
try {
pdesolver.apply(*x[r]);
}
catch (...)
{
// time step failed -> accumulate to total only
PDESolverResult pderes = pdesolver.result();
step_result.assembler_time += pderes.assembler_time;
step_result.linear_solver_time += pderes.linear_solver_time;
step_result.linear_solver_iterations += pderes.linear_solver_iterations;
step_result.nonlinear_solver_iterations += pderes.iterations;
res.total.assembler_time += step_result.assembler_time;
res.total.linear_solver_time += step_result.linear_solver_time;
res.total.linear_solver_iterations += step_result.linear_solver_iterations;
res.total.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.total.timesteps += 1;
throw;
}
PDESolverResult pderes = pdesolver.result();
step_result.assembler_time += pderes.assembler_time;
step_result.linear_solver_time += pderes.linear_solver_time;
step_result.linear_solver_iterations += pderes.linear_solver_iterations;
step_result.nonlinear_solver_iterations += pderes.iterations;