Commit Graph

48 Commits

Author SHA1 Message Date
Andreas Lauser
43ac2e36c6 remove the Flow prefixes of parameters only used by flow
this has been requested by [at]atgeirr.

Note: The FlowLinearSolverVerbosity, FlowNewtonMaxIterations and
FlowNewtonMinIterations parameters are still prefixed because they
clashes with parameters registered deeply within eWoms.
2018-08-15 23:34:32 +02:00
Andreas Lauser
0714ab5930 add the parameters which were introduced by the MILU PR
i.e., make it possible to specify them via the eWoms parameter system.
2018-08-15 23:34:32 +02:00
Andreas Lauser
b5cddef928 flow: switch it to use the eWoms parameter system
this has several advanges:

- a consistent and complete help message is now printed by passing the
  -h or --help command line parameters. most notably this allows to
  generically implement tab completion of parameters for bash
- the full list of runtime parameters can now be printed before the simulator
  has been run.
- all runtime parameters understood by ebos can be specified
- no hacks to marry the two parameter systems anymore
- command parameters now follow the standard unix convention, i.e.,
  `--param-name=value` instead of `param_name=value`

on the negative side, some parameters have been renamed and the syntax
has changed so calls to `flow` that specify parameters must adapted.
2018-08-15 23:34:32 +02:00
Markus Blatt
865a690243 Allow usage of red-black ILU0.
We introduced two runtime parameters for this: ilu_redblack and
ilu_reorder_spheres. If the last one is false, we try to preserve
the ordering within in the colors. Otherwise we try to achieve a D2
(alternative diagonal) ordering.
2018-07-20 14:43:40 +02:00
Markus Blatt
63058559bc Added various other variants of MILU.
These versions are inspired by the ones used in SuperLU and the enums
to choose them have simuilar names, but without leading S (MILU_1-MILU_3).

The following variants are supported (chosen by the enum MILU_VARIANT):
ILU: plain ILU
MILU_1:  lump diagonal with dropped row entries.
MILU_2:  lump diagonal with the sum of the absolute values of the dropped row
         entries.
MILU_3: if diagonal is positive add sum of dropped row entrires. Otherwise substract them.
MILU_4: if diagonal is positive add sum of dropped row entrires. Otherwise do nothing
2018-07-20 14:42:46 +02:00
Markus Blatt
0bae240a42 Allow user to choose modified ILU0 decomposition.
Using the parameter ilu_milu=true|false (default=false) the user can now choose
to use the modified ILU0 decomposition. If selected values will
not be dropped for nonzero entries but added to the diagonal of U.
This approach will result in A*e = L*U*e for vector e with all entries
beging 1.
2018-07-20 14:42:46 +02:00
Markus Blatt
e24d338ddc Resort to support the usual parameters (as for flow_legacy)
These are solver_approach=cpr cpr_use_amg=(true|false), etc.
2018-02-05 22:37:01 +01:00
Markus Blatt
f5d81513da First version of a AMG for the Blackoil equations.
The approach is inspired by Geiger's system-amg but we use dune-istl
aggregation AMG for it. On the fine level all unknowns attached to a cell
form a matrix block and are treated fully coupled. To form the first
coarse level system we use only the pressure component to guide the aggregation
and neglect all other unknowns on the fine level. All other level are formed
in the usual way by scalar aggregation.

Currently,it has to be requested for flow_ebos manually by passing
"linear_solver_use_amg=true amg_blackoil_system=true" to it.
2018-02-05 22:37:01 +01:00
Arne Morten Kvarving
141186ad1d changed: opm/[core -> common]/utility/parameters 2018-01-30 16:33:45 +01:00
Robert Kloefkorn
e3c898030c [cleanup] ilu_iteration --> ilu_fillin_level. 2017-06-13 15:48:01 +02:00
Robert Kloefkorn
e4f1bf9955 [feature] make ILU relaxation and iteration a dynamic parameter. 2017-06-13 15:48:01 +02:00
Arne Morten Kvarving
3c0cb9e950 adjust for changed ParameterGroup namespacing 2017-04-28 15:36:25 +02:00
Robert Kloefkorn
feea8c1753 Introduce parameter for time step in days when single precision should be used
in the linear solvers. Also, a parameter was introduced to toggle the use of AMG.
2016-11-21 17:18:24 +01:00
Tor Harald Sandve
739c0906ef Improvments in convergence for flow_ebos
- restrict pressure changes. Set default to 1.0 (this also effects flow)
- change default number of linear iterations to 150
- tell stabilized newton the residual occilates even if it occilates in
only one phase (this also effects flow)
- avoid problems realated to division on small numbers

Tested on SPE9, norne and Model 2 with significant improvments.
2016-11-14 13:26:38 +01:00
Robert Kloefkorn
7dd76cc967 NewtonIterationBlackoilInterleaved: added flag to allow to ignore solver convergence
failure.
2016-05-27 12:55:46 +02:00
Tor Harald Sandve
09ab530674 Add the option of computing the full sparity pattern based on all phases
- For some cases (for instance involving solvent flow) the reasoning for
only adding the pressure derivatives seems to fail. As getting the
sparsity pattern is non-trivial, in terms of work, the full sparsity
pattern is only added when specified by the parameter
"require_full_sparsity_pattern"
- For solvent runs "require_full_sparsity_pattern" defaults to true for
all other runs the default is to only extract the sparsity pattern from
the pressure derivatives.
2016-05-11 15:13:52 +02:00
Robert Kloefkorn
3aa8ed200f NewtonBlackoilInterleaved: increase maximal allowed iteration to 75. 2016-02-12 12:14:02 +01:00
Robert Kloefkorn
82d508727f MatrixBlock: added function firstmatrixelement.
NewtonBlackoilInterleaved: some cleanup and variable naming.
2016-02-12 12:14:02 +01:00
Robert Kloefkorn
31812bd2f9 NewtonBlackoilInterleaved: add solver option for single precision. 2016-02-12 12:14:02 +01:00
Markus Blatt
fd78f1c0b9 Moved includes to \*.cpp file. 2015-12-01 14:56:29 +01:00
Markus Blatt
dc1d7c526f Moved ParallelOverlappingILU0 to its own file. 2015-12-01 14:41:06 +01:00
Markus Blatt
dd77556252 Added restricted parallel schwarz and overlapping ILU0 preconditioner 2015-11-25 08:43:46 +00:00
Robert Kloefkorn
ac034bd80e NewtonIterationBlackoilInterleaved: fix docu. 2015-10-09 12:06:29 +02:00
Robert Kloefkorn
885aedb1e8 NewtonIterationBlackoilInterleaved: make parameter a struct to avoid multi reading. 2015-10-09 12:03:58 +02:00
Robert Kloefkorn
d93a1a5b63 NewtonIterationBlackoilInterleaved: replace switch-case statement by proper template
recursion.
2015-10-08 15:54:21 +02:00
Robert Kloefkorn
6304e44242 NewtonIterationBlackoilInterleeaved: remove unused headers. 2015-10-08 15:54:21 +02:00
Robert Kloefkorn
c485e3fdc7 NewtonBlackølInterationInterleaved: NewtonBlackølInterationInterleavedImpl implements
the Iteration for a fixed number of cell variabled which is then used by the
NewtonBlackølInterationInterleaved class via a switch-case over the actually existing
numbers.
2015-10-08 15:54:21 +02:00
Joakim Hove
76f674b16b Updated path to warning suppression header. 2015-10-06 12:11:49 +02:00
Markus Blatt
32b8ed654e Prevent memory leaks in case SeqILU0 throws an exception. 2015-09-08 14:38:29 +02:00
Markus Blatt
3c1498ce92 Only construct SeqILU0 in try block.
The rest is not needed and this simplyfies code.
2015-09-08 12:06:03 +02:00
Markus Blatt
c97f125b56 Include rank into error message. 2015-09-08 11:48:06 +02:00
Markus Blatt
315251da2c Fix typo wether->whether. 2015-09-08 11:44:46 +02:00
Markus Blatt
de8c638308 Put space around braces where it seems approppriate. 2015-09-08 11:15:46 +02:00
Markus Blatt
ccac548420 Introduces parallel exception handling for ILU0 preconditioner.
When running Norne with the interleaved solver sometimes exceptions
(diagonal matrix block is not invertible) occur for some rows in the
ILU decomposition. In a parallel run this means that some, but not all
processes will see the exceptions. This leads to a classic deadlock.

With this commit we catch the exception during the setup of the preconditioner,
determine with the other processes whether there were any exceptions, and
in this case all the processes will throw an exception.

Currently this limited to Dune::MatrixBlockError, but we could extend this.
2015-09-08 09:46:35 +02:00
Markus Blatt
0adde744bf [bugfix] Make sequential preconditioner live as long as the parallel one.
It holds a reference to the sequential code. Previously this reference
point to a temporary object that was deleted upon exit of
constructPrecond.

With this commit use a unique_ptr to store the parallel
preconditioner. It also gets a custom deleter that will delete the
nested sequential iterator during destruction.
2015-09-05 16:09:33 +02:00
babrodtk
5b287e0ea8 Fixed warnings 2015-09-02 13:02:27 +02:00
Atgeirr Flø Rasmussen
9af29fd496 Merge pull request #434 from atgeirr/fix-minor-memleak
Fix minor memory leak
2015-08-17 16:38:18 +02:00
Atgeirr Flø Rasmussen
18a3b0b7a2 Minor whitespace fix. 2015-08-17 16:36:01 +02:00
Atgeirr Flø Rasmussen
c9b76880b6 Fix minor memory leak. 2015-08-17 15:44:58 +02:00
Kai Bao
a816f4c06c optimizing the formInterleavedSystem().
The current implementation avoids the using of formEllipticSystem() and
vercatCollapseJacs(), which take a significant amount of computing time
during the non-linear solutions.
2015-08-17 13:36:44 +02:00
Atgeirr Flø Rasmussen
ae6caaac61 Move parallel overload into HAVE_MPI block. 2015-06-19 14:06:27 +02:00
Atgeirr Flø Rasmussen
f3623270cc Fix case in include statement. 2015-06-19 13:35:36 +02:00
Atgeirr Flø Rasmussen
700ce9e13d Move forming interleaved matrix to own function/ 2015-06-19 11:33:30 +02:00
Atgeirr Flø Rasmussen
5e513642d7 Add paralell preconditioner, enable parallel case. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
5476b7a6ac Clean up headers, copyright. 2015-06-19 10:53:33 +02:00
Atgeirr Flø Rasmussen
8cbce1bfdf Working interleaved solver implemented. 2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
63285bf6f9 Remove usage of CPRPreconditioner. 2015-06-19 10:53:32 +02:00
Atgeirr Flø Rasmussen
5d0f654443 Add class NewtonIterationBlackoilInterleaved.
Initially it is just a copy of the NewtonIterationBlackoilCPR class.
Also, add use_interleaved parameter to use the class.
2015-06-19 10:53:32 +02:00