amdis-core merge requestshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests2019-05-03T23:00:20Zhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/45Provide access function for vectors and matrices2019-05-03T23:00:20ZPraetorius, SimonProvide access function for vectors and matricesFor a general access of matrices and vectors, using various bracket types, the MR introduces the function `access(vector, i)` and `access(matrix, i,j)` that redirects to the specific implementation. Additionally Concepts are added to tes...For a general access of matrices and vectors, using various bracket types, the MR introduces the function `access(vector, i)` and `access(matrix, i,j)` that redirects to the specific implementation. Additionally Concepts are added to test whether an object can be accessed like a vector or matrix.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/44Resize abstraction for matrices and vectors2019-05-04T00:29:14ZPraetorius, SimonResize abstraction for matrices and vectorshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/43extend apply and for_each functions2019-05-03T16:15:35ZPraetorius, Simonextend apply and for_each functionshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/42add cxx feature test for auto templates2019-05-03T16:15:14ZPraetorius, Simonadd cxx feature test for auto templateshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/41allow parallel execution of runner tasks2019-05-03T16:12:23ZPraetorius, Simonallow parallel execution of runner taskshttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/40Make FactoryParametrization compatible to dune 2.72021-11-10T18:08:46ZPraetorius, SimonMake FactoryParametrization compatible to dune 2.7https://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/37Changed raw pointer to shared_ptr in DOFVector and DOFMatrix2019-04-30T14:10:08ZPraetorius, SimonChanged raw pointer to shared_ptr in DOFVector and DOFMatrixAlways store a `shared_ptr` of the GlobalBasis instead of a reference or raw pointer.Always store a `shared_ptr` of the GlobalBasis instead of a reference or raw pointer.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/36added Environment for MPI initialization2019-05-03T16:14:40ZPraetorius, Simonadded Environment for MPI initializationThis MR replaces the old `AMDiS::init()` - `AMDiS::finalize()` pattern with a RAII class `Environment`, to be instantiated at the begin of the main method, i.e.
```c++
int main(int argc, char** argv)
{
Environment env(argc, argv);
...This MR replaces the old `AMDiS::init()` - `AMDiS::finalize()` pattern with a RAII class `Environment`, to be instantiated at the begin of the main method, i.e.
```c++
int main(int argc, char** argv)
{
Environment env(argc, argv);
// get MPI rank and size from environment after instantiation:
std::cout << Environment::mpiRank();
std::cout << Environment::mpiSize();
}
```
the ``finalize'' is called automatically when `env` is destructed, i.e. at the end of main().https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/35make max and min work with user-defined casts2019-04-26T10:26:52ZPraetorius, Simonmake max and min work with user-defined castscorrects a problem with `max(double, FieldVector<double,1>)` and `max(double, FieldMatrix<double,1,1>)`.corrects a problem with `max(double, FieldVector<double,1>)` and `max(double, FieldMatrix<double,1,1>)`.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/34allow order() as memberfunction of gridfunctions2019-04-25T17:40:25ZPraetorius, Simonallow order() as memberfunction of gridfunctionsallow order() as memberfunction of gridfunctions and redirect free function to this memberfunction if availableallow order() as memberfunction of gridfunctions and redirect free function to this memberfunction if availablehttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/33WIP: block-structured bases2019-09-03T11:07:17ZPraetorius, SimonWIP: block-structured basesAllow block-structured bases and introduce corresponding matrix/vector data-structures.
**TODO**:
- [x] Implement Eigen backend with blocking structure, i.e. implement `MatrixWrapper`, `MatrixInserter` and `VectorWrapper` for Eigen.Allow block-structured bases and introduce corresponding matrix/vector data-structures.
**TODO**:
- [x] Implement Eigen backend with blocking structure, i.e. implement `MatrixWrapper`, `MatrixInserter` and `VectorWrapper` for Eigen.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/32istl AMG preconditioner added2019-04-26T11:21:28ZPraetorius, Simonistl AMG preconditioner addedThe dune-istl AMG method is available as precondition. The corresponding initfile parameters are
```
[...]->solver->precon: [amg,fastamg]
[...]->solver->precon->smoother: [jacobi,sor,ssor] % later more smoothers can be added
[...]->sol...The dune-istl AMG method is available as precondition. The corresponding initfile parameters are
```
[...]->solver->precon: [amg,fastamg]
[...]->solver->precon->smoother: [jacobi,sor,ssor] % later more smoothers can be added
[...]->solver->precon->[...] % general amg parameters, see Dune::Amg::Parameters
[...]->solver->precon->coarsening->[...] % Parameters of Dune::Amg::CoarseningParameters
[...]->solver->precon->aggregation->[...] % Parameters of Dune::Amg::AggregationParameters
[...]->solver->precon->dependency->[...] % Parameters of Dune::Amg::DependencyParameters
[...]->solver->precon->smoother->[...] % Parameters of Dune::Amg::DefaultSmootherArgs
```
See `amdis/linearalgebra/istl/AMGPrecon.hpp` for a detailed list of parameters. The parameter names follow the variable names in the Dune Parameters class.https://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/31updated the dune install script2019-03-28T11:33:31ZPraetorius, Simonupdated the dune install scripthttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/30Example/surface grid2019-04-26T20:36:29ZPraetorius, SimonExample/surface gridhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/29add operator+= to transposed view2019-03-28T11:33:56ZPraetorius, Simonadd operator+= to transposed viewhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/28make tuple_size and tuple_element a class2019-03-28T11:33:48ZPraetorius, Simonmake tuple_size and tuple_element a classhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/27Issue/amdisproject executable2019-03-28T12:09:12ZPraetorius, SimonIssue/amdisproject executablehttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/26Parallel ISTL2019-06-14T08:36:05ZMüller, FelixParallel ISTLThis changes the linear algebra interface such that parallel linear algebra backends can be used and provides the implementation of the interface for parallel ISTL solvers.
Adds:
- Support for parallel ISTL solvers using the current ...This changes the linear algebra interface such that parallel linear algebra backends can be used and provides the implementation of the interface for parallel ISTL solvers.
Adds:
- Support for parallel ISTL solvers using the current solver interface
- Runtime switch for overlap type of the ISTL solver used
- `solver->category: [default, sequential, nonoverlapping, overlapping]` initfile parameter
- `Comm` object for the linear algebra interface that is to be used as a container for all required information for running the backend's solvers in parallel
- Implementation of the `Comm` object for ISTL
Changes:
- Linear algebra classes now use a `Traits` class as template parameter
TODO:
* [x] Check if `Grid` uses overlap and use `[Non]OverlappingSchwarzOperator`
* [x] Provide an efficient method for computing the parallel index set
* [x] ~~Resolve all `TODO(FM)` markers~~
* [x] ~~Make an alternative implementation for nonoverlapping Schwarz~~
* [x] ~~Handle the corner case `overlapSize + ghostSize == 0`~~
* [x] Add an example or test file
* [x] ~~Update assembler element loops to use the proper partition set~~
Relates to #4.Müller, FelixMüller, Felixhttps://gitlab.math.tu-dresden.de/amdis/amdis-core/-/merge_requests/25Rewrite adaption interface to allow to attach bases to the grid-transfer2019-04-26T11:23:41ZPraetorius, SimonRewrite adaption interface to allow to attach bases to the grid-transferThe GlobalBasis needs to be updated after each grid change. So, we have added a list of callbacks that are called in the `GridTransfer` class in `preAdapt()`, after `adapt()` and in `postAdapt()`. There are two types of supported data:
...The GlobalBasis needs to be updated after each grid change. So, we have added a list of callbacks that are called in the `GridTransfer` class in `preAdapt()`, after `adapt()` and in `postAdapt()`. There are two types of supported data:
1. Classes with `preAdapt(bool)` and `postAdapt(bool)`
2. Classes with `update(gridView())`
The first one is typically implemented by data containers that need interpolation. The second one is implemented by a basis.
The `DOFVector` and its basis are automatically registered in the GridTransfer in construction of the `DOFVector`. If you have a data-container or a basis independent of a DOFVector you have to attach (and detach before destruction) yourself. Therefore, simply call
```c++
GridTransferManager::attach(grid, data); // or
GridTransferManager::detach(grid, data);
```
where data must implement on of the interface 1. or 2., described also in the `AdaptionInterface.hh`.
Note, the adaption cycle works as follows:
1. preAdapt
2. adapt
3. update
4. postAdapt
So, in the postAdapt step we can assume that all update callbacks are executed. The order of the update methods could be random, though. And also the order of the pre/postAdapt callbacks is arbitrary.