diff --git a/docs/Doxyfile b/docs/Doxyfile index c235d2aa2defaeed5706f5ea7052f2ba41ad2576..410ebb5e29a9e595edeeb51fa937d721b825a7d0 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -122,29 +122,32 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- FILE_PATTERNS = *.hpp *.cpp *.md -INPUT = ../src/amdis \ - ../src/amdis/common \ - ../src/amdis/functions \ - ../src/amdis/gridfunctions \ - ../src/amdis/linearalgebra \ - ../src/amdis/linearalgebra/mtl \ - ../src/amdis/localoperators \ - ../src/amdis/operations \ - ../src/amdis/typetree \ - ../src/amdis/utility +INPUT = ../amdis \ + ../amdis/common \ + ../amdis/functions \ + ../amdis/gridfunctions \ + ../amdis/io \ + ../amdis/linearalgebra \ + ../amdis/linearalgebra/eigen \ + ../amdis/linearalgebra/istl \ + ../amdis/linearalgebra/mtl \ + ../amdis/linearalgebra/petsc \ + ../amdis/localoperators \ + ../amdis/operations \ + ../amdis/typetree \ + ../amdis/utility INPUT_ENCODING = UTF-8 RECURSIVE = NO -EXCLUDE = ../src/amdis/linearalgebra/eigen \ - ../src/amdis/linearalgebra/istl \ - ../src/amdis/linearalgebra/petsc +EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = AMDiS::Impl \ AMDiS::Math::Impl_ \ AMDiS::Concepts::Impl_ \ AMDiS::detail \ + Dune \ itl::details -EXAMPLE_PATH = examples +EXAMPLE_PATH = ../examples EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = @@ -168,7 +171,7 @@ SOURCE_TOOLTIPS = YES USE_HTAGS = NO VERBATIM_HEADERS = YES CLANG_ASSISTED_PARSING = NO -CLANG_OPTIONS = -std=c++14 +CLANG_OPTIONS = -std=c++17 #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index diff --git a/docs/tutorials/backup-restore.md b/docs/tutorials/backup-restore.md new file mode 100644 index 0000000000000000000000000000000000000000..2815e5c2445e7b60923eea05493d56ef2d3abf15 --- /dev/null +++ b/docs/tutorials/backup-restore.md @@ -0,0 +1,49 @@ +# How to backup and restore problem data? + +In very long simulations, i.e. many timesteps, it is recommended to backup an +intermediate state from time to time, so that it is possible to resume a +simulation from the last stored backup file. Therefore, you mostly need +a representation of the grid in memory incorporating the grid hierarchy and +the data for the solution vector. Other parameters are fixed or problem specific, +so need to be stored manually. + +In the `ProblemStat` there is a pair of functions `backup()` and `restore()` +that can be used for this purpose. The backup function saves the grid and the +solution vector to files and the restore function initializes a new problem from +stored files. + +```c++ +ProblemStat prob("prob"); +prob.initialize(INIT_ALL); +AdaptInfo adaptInfo("adapt"); + +// some calculation ... + +prob.backup(adaptInfo); +``` + +This create at least two files, one for the grid and one for the solution, where +the filenames are either fixed to `backup_TIMESTEP.grid` and `backup_TIMESTEP.solution` +or specified in the initfile as + +``` +prob->backup->grid: backup_xyz.grid +prob->backup->solution: backup_xyz.solution +``` + +To restart a simulation it is recommended to initialize the problem directly with +the grid and solution file, i.e. + +```c++ +ProblemStat prob("prob"); +prob.restore(INIT_ALL); + +// some more calculation ... +``` + +where the restore filenames **must** be given in the initfile as + +``` +prob->restore->grid: backup_xyz.grid +prob->restore->solution: backup_xyz.solution +``` diff --git a/docs/howto.md b/docs/tutorials/block-mat-vec.md similarity index 61% rename from docs/howto.md rename to docs/tutorials/block-mat-vec.md index 12b9aa17485a2ad4903b2995267e59dcc171e296..1fa2d5587a4857216fb0c2a0b9889f4c866664d5 100644 --- a/docs/howto.md +++ b/docs/tutorials/block-mat-vec.md @@ -1,8 +1,5 @@ -# How To +# How to use block matrices and vectors? -[TOC] - -## How to use block matrices and vectors? When using the default `BasisCreator` provided by AMDiS, like `LagrangeBasis` or `TaylorHoodBasis`, the resulting indexing scheme is *flat*, meaning we need to use one (sparse) matrix and one vector to describe the linear system. Sometimes @@ -67,51 +64,4 @@ auto& vec_vel_y = vec_vel[1]; Note: Currently the blocking is implemented for the ISTL backend only. -## How to backup and restore problem data? -In very long simulations, i.e. many timesteps, it is recommended to backup an -intermediate state from time to time, so that it is possible to resume a -simulation from the last stored backup file. Therefore, you mostly need -a representation of the grid in memory incorporating the grid hierarchy and -the data for the solution vector. Other parameters are fixed or problem specific, -so need to be stored manually. - -In the `ProblemStat` there is a pair of functions `backup()` and `restore()` -that can be used for this purpose. The backup function saves the grid and the -solution vector to files and the restore function initializes a new problem from -stored files. - -```c++ -ProblemStat prob("prob"); -prob.initialize(INIT_ALL); -AdaptInfo adaptInfo("adapt"); - -// some calculation ... - -prob.backup(adaptInfo); -``` - -This create at least two files, one for the grid and one for the solution, where -the filenames are either fixed to `backup_TIMESTEP.grid` and `backup_TIMESTEP.solution` -or specified in the initfile as - -``` -prob->backup->grid: backup_xyz.grid -prob->backup->solution: backup_xyz.solution -``` - -To restart a simulation it is recommended to initialize the problem directly with -the grid and solution file, i.e. - -```c++ -ProblemStat prob("prob"); -prob.restore(INIT_ALL); -// some more calculation ... -``` - -where the restore filenames **must** be given in the initfile as - -``` -prob->restore->grid: backup_xyz.grid -prob->restore->solution: backup_xyz.solution -``` diff --git a/docs/tutorials/tutorials.md b/docs/tutorials/tutorials.md index f8adf884dfe576060337ecc802c2bcdda9265977..0824b7946c09ec0d5a9e77d8f7a735569ad1dfc2 100644 --- a/docs/tutorials/tutorials.md +++ b/docs/tutorials/tutorials.md @@ -12,27 +12,34 @@ functions. Create a problem class as a container for the grid, basis, solution vector and linear system and many more. What can a problem class do for your workflow. -3. [Operators](../reference/Operators.md): +3. [Backup and Restore](backup-restore.md) +Write intermediate states of your lengthy conmputations to file and resume the +simulation from a backup file. + +4. [Operators](../reference/Operators.md): Define your PDE in terms of operator terms. Learn how to add operators to a problem and how to define your own operators. -4. [Boundary Conditions](boundary-conditions.md): +5. [Block Matrices and Vectors](block-mat-vec.md) +Use block matrices and vectors instead of the default flat versions. + +6. [Boundary Conditions](): Select parts of the grid boundary and assign boundary conditions or boundary operators. Learn how to specify the boundary parts and how to set different types of boundary conditions, like Dirichlet or periodic conditions, or Neumann/Robin-type boundary integrals. -5. [Linear Solvers](linear-solvers.md): +7. [Linear Solvers](): Control the solution of the assembled linear system, which linear solver to use and which preconditioner. How to control solver parameters and how to add an own linear solver. -6. [Adaptivity and Grid Refinement](grid-adaptivity.md): +8. [Adaptivity and Grid Refinement](): Grid adaptivity needs control of marking and refinement strategies. Learn how to define and add a marker to the problem, learn about interpolation during grid adaptivity and how to load balance your grid. -7. [FileWriters](filewriters.md): +9. [FileWriters](): Output and backup/restore of data is an important topic for simulations and for postprocessing. Different Writers are introduced and the configuration and control of these writers discussed.