Skip to content
Snippets Groups Projects
oliver.sander_at_tu-dresden.de's avatar
oliver.sander_at_tu-dresden.de authored
Port the examples away from dune-pdelab

See merge request !40
01a86965
History

dune-tnnmg

This is an extension module of the Dune finite element system. It implements the Truncated Nonsmooth Newton MultiGrid (TNNMG) method, an algorithm for minimizing convex, block-separable functionals that occur, e.g., as discrete formulations of obstacle or contact problems, or in models of small-strain elastoplasticity and friction. The method and its mathematical background is described in detail in

Carsten Gräser, Oliver Sander, "Truncated nonsmooth Newton multigrid methods for block-separable minimization problems", IMA Journal of Numerical Analysis, Volume 39, Issue 1, January 2019, Pages 454–481, DOI: 10.1093/imanum/dry073

The dune-tnnmg module is maintained by Carsten Gräser and Oliver Sander.

Installation

dune-tnnmg is a normal Dune module and can be built and installed in the usual way using the dunecontrol tool (see the main Dune documentation for details). It depends only on the dune-common and dune-istl modules from the Dune core, and on the dune-solvers module for some general solver infrastructure. Building the optional examples you will additionally need dune-fufem.

Documentation

The TNNMG method and the dune-tnnmg programmer interface are documented in a manual that is shipped in the dune-tnnmg/doc/manual/ folder. Also, there is a set of example programs in dune-tnnmg/examples. These examples are also discussed in the manual.

Automatic code formatting

The GitLab CI system of this module (in the file .gitlab-ci.yml) includes a job that checks for proper code formatting. The CI system uses the tool uncrustify to enforce the rules, guided by the configuration file dune-uncrustify.cfg in the dune-tnnmg module source directory.

CI testing of the code formatting means that any merge request will fail CI testing if it introduces code changes that violate the formatting rules. To check locally whether code changes that you have made comply with the rules, run

uncrustify -l CPP -c dune-uncrustify.cfg --no-backup `find -name "*.cc" -o -name "*.hh"`

in your source directory. If this does not modify the code, then your formatting is correct.

When starting to use uncrustify to enforce proper code formatting, one large commit had to be made that applied large amounts of white-space changes to pretty much every source file. If you are bothered by this when using git blame, you can tell git to ignore this particular commit by saying

git blame --ignore-revs-file=.git-blame-ignore-revs <file>