amdis-core merge requestshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests2019-06-13T11:07:52Zhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/67Global DOF IDs2019-06-13T11:07:52ZPraetorius, SimonGlobal DOF IDsFor parallel computations one has to identify DOFs in the global grid uniquely. This requires knowledge of the connectivity of DOFs and can not generically be extracted from the global basis without any specialization.
So, this MR adds ...For parallel computations one has to identify DOFs in the global grid uniquely. This requires knowledge of the connectivity of DOFs and can not generically be extracted from the global basis without any specialization.
So, this MR adds a global IdSet for DOFs in a GlobalBasis. The `GlobalBasisIdSet` must be bound to an element and can then extract the globally unique id of a local DOF:
```c++
using IdSet = GlobalBasisIdSet<GlobalBasis>;
IdSet idSet(basis);
for (const auto& e : elements(basis.gridView()))
{
idSet.bind(e);
for (std::size_t i = 0; i < idSet.size(); ++i)
{
auto id = idSet.id(i);
}
idSet.unbind();
}
```https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/69add coefficient type to DefaultProblemTraits2019-06-12T10:32:42ZPraetorius, Simonadd coefficient type to DefaultProblemTraitshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/68unique border partition DataHandle2019-06-12T10:32:25ZPraetorius, Simonunique border partition DataHandleThis MR extracts the `UniqueBorderPartitionDataHandle` from the ParallelISTL branch, since it might be useful also in other implementations.This MR extracts the `UniqueBorderPartitionDataHandle` from the ParallelISTL branch, since it might be useful also in other implementations.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/65make StandardProblemIteration copyable2019-06-11T13:48:48ZPraetorius, Simonmake StandardProblemIteration copyablehttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/66cleanup of DataTransfer, created generator for treeContainer is node-data tem...2019-06-11T13:48:12ZPraetorius, Simoncleanup of DataTransfer, created generator for treeContainer is node-data template is usedhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/47rewritten mesh creator to support more general creation2019-06-08T13:31:08ZPraetorius, Simonrewritten mesh creator to support more general creationAutomatically create dune grids by different strategies.
1. If a `macro file name` is given, try to determine by file extension which reader to use and read the grid from file
2. else if the parameter `mesh->structured` is given, try...Automatically create dune grids by different strategies.
1. If a `macro file name` is given, try to determine by file extension which reader to use and read the grid from file
2. else if the parameter `mesh->structured` is given, try to construct a structured grid
3. else try to create the grid depending on the grid typehttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/58Add generalized derivative and local-to-global adapter to handle the global d...2019-06-08T13:02:21ZPraetorius, SimonAdd generalized derivative and local-to-global adapter to handle the global derivatives uniformly### Summary
Cleanup of Gridfunctions, i.e. separate order, derivative and gridfunction concepts. Add generalized derivative with gradient, divergence and partial derivatives. Add a local-to-global adapter similar to the one found in dune...### Summary
Cleanup of Gridfunctions, i.e. separate order, derivative and gridfunction concepts. Add generalized derivative with gradient, divergence and partial derivatives. Add a local-to-global adapter similar to the one found in dune-localfunctions.
### Details
1. Cleanup of Gridfunctions:
The `GridFunctionConcepts` is split into several parts, `Order.hpp`, `Derivative.hpp` and `GridFunction.hpp` for a cleaner structure. Thereby, the free functions `order()`, `derivative()` and `localFunctions()` now redirect to the corresponding member functions when those member functions are available.
2. Generalized derivatives:
The function `derivative()` is extended by an argument characterizing the type of the derivative, i.e. `tag::gradient`, `tag::divergence`, or `tag::partial` where the last one accepts an argument for the component of the partial derivative. In order to determine the range type of the grid functions, a class `DerivativeTraits` is added, parametrized with the derivative type and the function signature. For the discrete function it is possible to calculate all three derivative types. This is tested in `GradienTest` finally.
3. Local-to-Global adapter:
The calculation of global derivatives from local-basis and geometry Jacobians is abstracted and put into the new class `LocalToGlobalBasisAdapter` that performes cached evaluation of the local basis jacobians and geometry jacobians and the transforms those into global derivatives. This class can be used in the localoperators and is partially adapted already.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/63allow current directory for output and make it default2019-06-08T12:16:51ZPraetorius, Simonallow current directory for output and make it defaulthttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/62do not overwrite dirichlet node classification when iterating over intersections2019-06-08T12:16:28ZPraetorius, Simondo not overwrite dirichlet node classification when iterating over intersectionshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/60Added missing file BackupRestor.hpp to CMakeLists2019-05-16T11:29:28ZPraetorius, SimonAdded missing file BackupRestor.hpp to CMakeListshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/59change AMDiS::init to Environment in BackupRestoreTest2019-05-12T12:29:41ZPraetorius, Simonchange AMDiS::init to Environment in BackupRestoreTesthttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/56corrected solver creator for istl solvers and preconditioners2019-05-12T08:39:39ZPraetorius, Simoncorrected solver creator for istl solvers and preconditionersCorrected a bug introduced by MR for coefficient types. The test of the `field_type` of matrices was replaced.Corrected a bug introduced by MR for coefficient types. The test of the `field_type` of matrices was replaced.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/57allo parallel execution of backup-restore tests2019-05-11T22:23:58ZPraetorius, Simonallo parallel execution of backup-restore testsCorrects a bug introduced by MR of backup-restore feature. The test now writes in different files, to allow parallel execution without race conditions.Corrects a bug introduced by MR of backup-restore feature. The test now writes in different files, to allow parallel execution without race conditions.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/38Backup and restore facilities2019-05-09T14:05:00ZPraetorius, SimonBackup and restore facilitiesAdded backup and restore facilities for grid and dofvector. Either call
```c++
problemStat.backup(adaptInfo);
```
(This will backup the files to `[name]->backup->grid` and `[name]->backup->solution`)
and instead of `initialize()` c...Added backup and restore facilities for grid and dofvector. Either call
```c++
problemStat.backup(adaptInfo);
```
(This will backup the files to `[name]->backup->grid` and `[name]->backup->solution`)
and instead of `initialize()` call the function
```c++
problemStat.restore(INIT_ALL);
```
(This will read the grid and solution from the files `[name]->restore->grid` and `[name]->restore->solution`)
Or you can call
```c++
problemStat.backup(filename)
```
and
```c++
problemStat.restore(filename) -> std::unique_ptr<Grid>
```
directly to backup and restore the grid of the problemStat and `dofvector.backup(filename)` and `dofvector.restore(filename)` to backup and restore the data of the dofvector.
If the grid does not support backup-restore, the current gridView is written. This means that the hierarchy information is lost. A warning is printed in this case.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/50add static size information for Eigen matrix type2019-05-08T23:04:22ZPraetorius, Simonadd static size information for Eigen matrix typeTODO:
* [x] Add a test for static size informationTODO:
* [x] Add a test for static size informationhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/54add traits for testing whether something is a template or a type and add enab...2019-05-08T19:14:30ZPraetorius, Simonadd traits for testing whether something is a template or a type and add enable_if_allhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/51add hybrid utility SwitchCases for dynamic and static dispatching2019-05-08T15:56:54ZPraetorius, Simonadd hybrid utility SwitchCases for dynamic and static dispatchingThis is a hybrid variant of `Dune::switchCases` with runtime and compiletime index sets.
TODO:
* [x] Add a test for switch casesThis is a hybrid variant of `Dune::switchCases` with runtime and compiletime index sets.
TODO:
* [x] Add a test for switch caseshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/52add fake container-like datastructure with all no-op2019-05-08T14:17:38ZPraetorius, Simonadd fake container-like datastructure with all no-opThis fake container con be used as argument to functions expecting a container that is filled or accessed somehow, if you do not want to do anything.
TODO:
* [x] Needs a testThis fake container con be used as argument to functions expecting a container that is filled or accessed somehow, if you do not want to do anything.
TODO:
* [x] Needs a testhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/48Add explicit return type for lambdas2019-05-08T09:18:35ZPraetorius, SimonAdd explicit return type for lambdasIf there is an error within a lambda in a recursive hierarchy of calls, the return type might not be extracted correctly and I get an additional error `using xyz before deduction of auto` or something similar. This might be reduced, by e...If there is an error within a lambda in a recursive hierarchy of calls, the return type might not be extracted correctly and I get an additional error `using xyz before deduction of auto` or something similar. This might be reduced, by explicitly stating the return type of a lambda if known.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/49replace deprecated AMDiS::init and finalize with Environment2019-05-08T09:18:07ZPraetorius, Simonreplace deprecated AMDiS::init and finalize with EnvironmentAfter merging the `Environment` class, some examples and test need to be adapted.After merging the `Environment` class, some examples and test need to be adapted.