dumux merge requestshttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests2020-06-04T09:38:21Zhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2162[WIP] Feature/restructure ff fluxvars2020-06-04T09:38:21ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] Feature/restructure ff fluxvarshttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2146WIP: [box] Update all element volume variables when deflecting solution2021-10-28T20:46:23ZTimo Kochtimokoch@math.uio.noWIP: [box] Update all element volume variables when deflecting solutionFixes #892Fixes #892https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2142WIP: Feature/freeflow outflow as neumann2021-03-25T08:51:25ZMartin SchneiderWIP: Feature/freeflow outflow as neumannInstead of outflow conditions we want to use Neumann conditions with convenience outflow functions provided in some fluxhelper class.
ToDos
- [x] Check turbulence models
- [ ] Check coupled models
- [ ] Deprecate outflow conditions
- [ ...Instead of outflow conditions we want to use Neumann conditions with convenience outflow functions provided in some fluxhelper class.
ToDos
- [x] Check turbulence models
- [ ] Check coupled models
- [ ] Deprecate outflow conditions
- [ ] Fix failing tests
- [ ] Documentation of helper classes3.5Kilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.dehttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2130WIP Feature/finite element method2020-10-16T08:57:48ZDennis GläserWIP Feature/finite element methodThis is a first draft of an FEM framework. Currently, major limitations/assumptions are:
* assumes Standard-Galerkin approach
* assumes non-composite dune function space bases
I have tried to incorporate suggestions stemming from ...This is a first draft of an FEM framework. Currently, major limitations/assumptions are:
* assumes Standard-Galerkin approach
* assumes non-composite dune function space bases
I have tried to incorporate suggestions stemming from the discussion in #884, in particular it is:
1. The state of the grid variables was always dependent on the problem (e.g. due to BCs) and a current solution. Nevertheless, we had grid variables and problem and cursol as arguments in several assembly-related functions. In particular, we did `assembler.assemble(curSol)`. The assembler introduced here fulfills this interface (for compatibility with NewtonSolver), but does not use curSol. Instead, the assembler is instantiated with grid variables, which are updated with a solution and a problem. Thus, the assembler takes the solution and problem from the grid variables. So, you would want to do `Assembler assembler(gridVariables); assembler.assemble()`. This could help implementing other time stepping schemes, where you create grid variables on different time levels (stages), make an assembler from them and let it assemble the stage. The assembler is basically a copy of `FVAssembler`, which was almost general and non fv-specific. There is one piece of commented code related to parallelism with box (with a todo in the comment) which has to be figured out still.
2. Local assemblers are now a `localView` of the assembler, no which you then call `bind` with only an element. The problem & current solution are extracted from the grid variables with which the assembler was instantiated. This guarantees that a wrong combination of _problem state_, _solution state_ and _grid variables state_ is passed to it.
3. None of the classes use the property system anymore. I wrote a little test solving a poisson equation, which completely works without the property system. See test/discretization/fem/poisson. Therein, a problem and local residual have to be implemented. Currently, I implemented it in a "Dumux conforming" way, also implementing a spatial parameters class that stores the tensor and an "IntegrationPointVariables" class (the equivalent of vol vars in fv schemes), which hold the tensor at an integration point. The test implementation could be simplified very much if the custom local residual simply called `problem.getTensor()` or so - that would get rid of the spatial params and the integration point variables implementations. I did it this way for now to illustrate the complete workflow for implementing a new model and test.
All of this is subject to discussion, and all new headers have "TODOs" all over the place which can be discussed.https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2126[WIP] Feature/ff stokes reverse coupling2021-03-09T12:25:16ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] Feature/ff stokes reverse coupling__TODO__
- [x] make backwards compatible
- [ ] fix failing tests
- [ ] implement for compositional, compressible flow
depends on !2128 !2133__TODO__
- [x] make backwards compatible
- [ ] fix failing tests
- [ ] implement for compositional, compressible flow
depends on !2128 !2133Kilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.dehttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2125WIP: [assembly] Add element view for assembly routines2021-02-25T21:01:55ZTimo Kochtimokoch@math.uio.noWIP: [assembly] Add element view for assembly routinesSuggestion for an element view for assembly rountinesSuggestion for an element view for assembly rountineshttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2113WIP: Feature/new istl linear solvers2021-07-16T13:11:46ZTimo Kochtimokoch@math.uio.noWIP: Feature/new istl linear solvers* [x] Revisit template arguments
* [x] Introduce linear algebra backend or similar to make usage simpler
* [x] Adapt all linear solvers to provide `norm`
* [x] In Newton call `linearSolver->norm(r)` if available otherwise call `assembler...* [x] Revisit template arguments
* [x] Introduce linear algebra backend or similar to make usage simpler
* [x] Adapt all linear solvers to provide `norm`
* [x] In Newton call `linearSolver->norm(r)` if available otherwise call `assembler->residualNorm();` (depends on !2311 to be merged)
* [x] Deprecate conversion of multitype matrices in Newton (do in solver instead if necessary)
Depends on !2310 to be merged.
The matrix and vector type now have to be known to construct the solver.
This was previously delayed until the solve call but made the structure kind of intransparent because it wasn't really clear which vector type has to come in but only specific types work anyway.
Hard coding the solver hopefully reduces compile times wrt the factory. Also the implementation should be
* more compact than the old backends
* have more runtime option due to parameter tree-based params
* work in parallel as well
If this works out, we would deprecated the old solver backends.3.5Kilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.dehttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2112WIP: Cleanup/assembly properties2021-03-25T08:52:56ZTimo Kochtimokoch@math.uio.noWIP: Cleanup/assembly properties* [ ] test everything
* [ ] update changelog for `ElementBoundaryTypes` in `LocalResidual`
* [ ] think about `NumEqVector`* [ ] test everything
* [ ] update changelog for `ElementBoundaryTypes` in `LocalResidual`
* [ ] think about `NumEqVector`Dennis GläserDennis Gläserhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2012[WIP] TEMP: first draft of new staggered fvgridgeometry2020-06-26T06:43:45ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] TEMP: first draft of new staggered fvgridgeometryThis is a first prototype for a "real" staggered fvGeometry.
Results of discussion so far:
* staggered fvGeometry contains 4 (2D quad cells) scvs and 12 scvfs
This is a first prototype for a "real" staggered fvGeometry.
Results of discussion so far:
* staggered fvGeometry contains 4 (2D quad cells) scvs and 12 scvfs
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/2001[WIP] Feature/python fluidsystem2021-07-19T06:31:44ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] Feature/python fluidsystemThis is only a proof of concept.
We should decide what types of fluidsystems we want (e.g, 2pnc).
Probably, it also makes sense to create python components.This is only a proof of concept.
We should decide what types of fluidsystems we want (e.g, 2pnc).
Probably, it also makes sense to create python components.3.5Kilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.dehttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1989[WIP] [linear] Add first draft of SIMPLE preconditioner2021-04-13T12:38:00ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] [linear] Add first draft of SIMPLE preconditioner__SIMPLE__
Goal: solve
```math
\begin{pmatrix}
A & B\\
C & D
\end{pmatrix}
\begin{pmatrix}
u\\
p
\end{pmatrix}
=
\begin{pmatrix}
f\\
g
\end{pmatrix}
```
__Equations__
Exact velocity: $`~~~~~~u = u^* + \delta u...__SIMPLE__
Goal: solve
```math
\begin{pmatrix}
A & B\\
C & D
\end{pmatrix}
\begin{pmatrix}
u\\
p
\end{pmatrix}
=
\begin{pmatrix}
f\\
g
\end{pmatrix}
```
__Equations__
Exact velocity: $`~~~~~~u = u^* + \delta u ~~~~~~~ (1)`$
Exact pressure: $`~~~~~~p = p^* + \delta p ~~~~~~~ (2)`$
Exact velocity equation: $`~~~~~~A u + B p = f ~~~~~~~ (3)`$
Approximate velocity equation using some pressure guess $`p^*`$: $`~~~~~~A u^* + B p^* = f ~~~~~~~ (4)`$
Substract: (3-4) : $`~~~~~~A (u - u^*) + B (p-p^*) = 0 ~~~~~~~ (5)`$
$`~~~~~~A \delta u + B \delta p = 0 ~~~~~~~ (6)`$
Assumption (SIMPLE): $`~~~~~~diag(A) \approx A ~~~~~~~ (7)`$
Rearrange (6) and insert (7): $`~~~~~~\delta u = - diag(A)^{-1} B \delta p~~~~~~~ (7)`$
Mass conservation: $`~~~~~~C u = g~~~~~~~ (8)`$
$`~~~~~~C (u^* + \delta u) = g~~~~~~~ (9)`$
$`~~~~~~C (u^* + - C diag(A)^{-1} B \delta p) = g~~~~~~~ (10)`$
$`~~~~~~C u^* = g + C diag(A)^{-1} B \delta p~~~~~~~ (11)`$
Schur complement $`~~~~~~C diag(A)^{-1} B \delta p = C u^* - g ~~~~~~~ (12)`$
__Algorithm__
1.) Solve (4) for $`u^*`$
2.) Solve (12) for $`\delta p`$
3.) Get $`\delta u`$ from (7)
4.) update $`p=p^* + \alpha \delta p`$
5.) update $`u= u^* +\delta u`$
Naive implementation of https://www.cs.umd.edu/~elman/papers/tax.pdf
Converges, but is slower than Uzawa.
The internal GMRES solver to invert the Schur complement is not preconditioned yet (Richardson, w = 1).
Richardson seems to be the only preconditioner that does not require an assembled matrix.
Maybe we can write our own Jacobi preconditioner? If one can apply the action of the Schur complement without a matrix (what we do right now), is it also possible to apply the inverse of its diagonal without having the matrix?
__Udpate__ : There seem to be various matrix-free preconditioning methods
http://www2.cs.cas.cz/~tuma/ps/cutu06.pdf
https://hal.inria.fr/inria-00074080/document
http://www2.cs.cas.cz/semincm/lectures/2009-05-15-DuintjerTebbens.pdf
https://arxiv.org/pdf/1805.11930.pdf
https://arxiv.org/pdf/2006.06052.pdf
https://gitlab.dune-project.org/exadune/exadune-appl/-/blob/feature/blockiterative-preconditioner-FlexibleGMRES/src/blockiterativesolver/blockdiagonalpreconditioner.hh
A very simple (and probably expensive) option to test if preconditioning helps inverting the approximate Schur $`\tilde{S}`$ complement would be
```math
\tilde{S}^{-1}_{0,0} = \left(\tilde{S} \cdot (1, 0, ... ,n)^T \right) \cdot (1, 0, ... ,n)^T \\
\tilde{S}^{-1}_{1,1} = \left(\tilde{S} \cdot (0, 1, ... ,n)^T \right) \cdot (0, 1, ... ,n)^T \\
....
```
With that, one could construct a Jacobi preconditioner after doing n matrix vector operations.
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1975WIP: [io][gridmanagerbase] Fix dune deprecation warning2021-03-25T08:51:20ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deWIP: [io][gridmanagerbase] Fix dune deprecation warningfixes #859
Should probably be backported to 3.2fixes #859
Should probably be backported to 3.23.5Timo Kochtimokoch@math.uio.noTimo Kochtimokoch@math.uio.nohttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1950WIP: Block-diagonal AMG in parallel2021-03-25T08:52:30ZBernd FlemischWIP: Block-diagonal AMG in parallelMake the `BlockDiagAMGBiCGSTABSolver` work in parallel.
On the user side, this requires passing argument and template tuples. For the currently working test in `multidomain/poroelastic/el1p`, this amounts to
```cpp
using GridGeometr...Make the `BlockDiagAMGBiCGSTABSolver` work in parallel.
On the user side, this requires passing argument and template tuples. For the currently working test in `multidomain/poroelastic/el1p`, this amounts to
```cpp
using GridGeometries = std::tuple<OnePFVGridGeometry, PoroMechFVGridGeometry>;
using LinearSolver = BlockDiagAMGBiCGSTABSolver<GridGeometries>;
auto views = std::make_tuple(std::cref(leafGridView), std::cref(leafGridView));
auto mappers = std::make_tuple(onePFvGridGeometry->dofMapper(), poroMechFvGridGeometry->dofMapper());
auto groups = std::make_tuple(std::string("OneP"), std::string("PoroElastic"));
auto linearSolver = std::make_shared<LinearSolver>(views, mappers, groups);
```
So far, only `YaspGrid` works.
1. [x] Make it work for [dumux-sediment](https://git.iws.uni-stuttgart.de/dumux-appl/dumux-sediment).
2. [x] Make it work for `UGGrid` and `ALUGrid`.
3. [x] Decide where to put what.3.5Bernd FlemischBernd Flemischhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1834[WIP] Feature/amg freeflow2020-01-17T14:49:30ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] Feature/amg freeflowDo not merge this. For testing only.Do not merge this. For testing only.https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1821[WIP][md] Implement box staggered coupling2021-11-30T16:44:59ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP][md] Implement box staggered couplingTodos:
- [x] Add test for segment-segment intersection algorithm
- [x] Make segment-segment intersection algorithm more efficient
- [x] Put segment-segment in different MR
- [x] Extract Box-Forchheimer to separate MR
- [x] New BJ test ...Todos:
- [x] Add test for segment-segment intersection algorithm
- [x] Make segment-segment intersection algorithm more efficient
- [x] Put segment-segment in different MR
- [x] Extract Box-Forchheimer to separate MR
- [x] New BJ test (existing test uses indefinite perm. matrix)
- [x] Change convergence script to specify convergence rate
- [ ] It currently only works for `DiffusionCoefficientAveragingType::ffOnly`
- [ ] Maxwell Stefan Diffusion law not yet implemented when using Box
- [ ] Renaming: Use ff/pm instead of stokes/darcy
- [ ] New IC assume specific parameter group "Darcy", generalise this
- [ ] Add missing tests
Suggestions:
- [x] Currently, we retrieve the entire context via `couplingContextVector()`, but the old interface is still there. I would shrink this to only one interface and probably rename it. Currently, there is one context object per coupling segment, so maybe we can find a better name.
- [x] At the moment the coupling segment geometry is stored in both the darcy and the stokes coupling info objects in the mapper. I don't think this is the most memory consuming part of the code, but there is room for memory efficiency improvements.
Fixes #788.Dennis GläserDennis Gläserhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1781WIP: Feature/create co2 tables2021-11-29T16:34:03ZMartin UtzWIP: Feature/create co2 tablesclose #690
The CO2 tables are created by the help of a website (https://webbook.nist.gov/chemistry/fluid), which can calculate the needed values. The query for these is automated by a python script, which also does the formatting of th...close #690
The CO2 tables are created by the help of a website (https://webbook.nist.gov/chemistry/fluid), which can calculate the needed values. The query for these is automated by a python script, which also does the formatting of the received values.3.5https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1716WIP: Feature/explicit flashs of implicit models2021-03-25T08:51:07ZBeatrix BeckerWIP: Feature/explicit flashs of implicit models**What this MR does / why does DuMux need it**:
Introduces a 2p2c-specific constraint solver, that explicitly calculates mass fractions for two-phase state, assuming ideal mixtures (as does the generic mpnc constraint solver for two-phas...**What this MR does / why does DuMux need it**:
Introduces a 2p2c-specific constraint solver, that explicitly calculates mass fractions for two-phase state, assuming ideal mixtures (as does the generic mpnc constraint solver for two-phase state).
Changes in volumevariables: The new constraint solver is used for two-phase state. In the one-phase state the `ComputeFromReferencePhase` solver is used, since it does the simplest thing possible for ideal mixtures.
`useConstraintSolver` is deleted because it's not needed anymore.
Resolves #761
**Special notes for your reviewer**:
Is it okay to have a new header for the 2p2c-specific constraint solver or should I integrate it as a special case in the generic one? I guess this is not backward compatible (deleted `useConstraintSolver`)? Do I have to deprecate the entire old volumevariables? @holle : The 2p2c tests parse with the new constraint solver (they did so before with the old, in my opinion slightly less correct/buggy version, too, although that was never tested...). Does it look good to you, too?3.5Holger ClassHolger Classhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1703WIP Feature/multidomain analytic jac2021-03-25T08:51:15ZTimo Kochtimokoch@math.uio.noWIP Feature/multidomain analytic jac3.5Dennis GläserDennis Gläserhttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1655[WIP] Add first draft of Boussinesq comparison2019-06-28T13:15:59ZKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.de[WIP] Add first draft of Boussinesq comparisonDO NOT MERGE YETDO NOT MERGE YETKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.deKilian Weishauptkilian.weishaupt@iws.uni-stuttgart.dehttps://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/merge_requests/1510Feature/multidomain auto bind2021-03-25T08:50:33ZDennis GläserFeature/multidomain auto bindI posed this MR into the box-facet-coupling branch so that the diff is easier to read. If we wait for !1492, which itself has to wait for !1431, then we can merge this into master at one point.
@timok, @kweis, maybe you can have a look ...I posed this MR into the box-facet-coupling branch so that the diff is easier to read. If we wait for !1492, which itself has to wait for !1431, then we can merge this into master at one point.
@timok, @kweis, maybe you can have a look at this. If we want to keep this, we would have to:
- [x] deprecate old interfaces
- [x] change all tests where cm now receives grid variables
- [x] ~~create an issue to remove the deprecated interfaces in all __facet coupling managers__ and the __poroelasticcouplingmanager__ until version 3.2 release~~ (edit Timo: don't need an issue for that)
- [x] update reference to `test_md_facet_tracer_box` (velocity is included now, which tests the MD vel output)
- [x] Put a note in the changelog that scvfs now have to implement `neighbor()`
Fixes #619.Timo Kochtimokoch@math.uio.noTimo Kochtimokoch@math.uio.no