Commit Graph

52 Commits

Author SHA1 Message Date
Markus Blatt
11211ca7d2 Update copyright notices 2015-05-20 09:26:25 +02:00
Markus Blatt
764e1e26c1 Used the correct parallel information for the whole system.
The whole system consists out of three equations per cell. Using
the parallel index set of the grid cells for it is wrong. Therefore
we use PR OPM/opm-core#803 to set up an  additional parallel index set
for the whole system and use this for the communication that is needed e.g.
by the ILU preconditioner.
2015-05-19 19:41:32 +02:00
Atgeirr Flø Rasmussen
f007bf561c Modify default solver parameters.
These should work well for both Norne and the SPE cases.
2015-04-21 12:40:21 +02:00
Robert Kloefkorn
2badc765a6 std::runtime_error --> LinearSolverProblem when linear solver was not converged.
Since LinearSolverProblem is derived from std::runtime_error everything should work as
before.
2015-04-16 11:41:28 +02:00
Robert Kloefkorn
1ccf74eb4e NewtonIterationBlackoilCPR: fix uninitialized parameter and make the parameters const. 2015-04-08 11:48:16 +02:00
Robert Kloefkorn
adac4a7995 CPRPreconditioner: added tolerance and max iter as a parmeter.
Parameters are now a separate class to avoid long constructor parameter list.
2015-03-31 12:15:54 +02:00
Atgeirr Flø Rasmussen
085c279a0a Use vertcatCollapseJacs() for improved performance. 2015-03-20 11:19:42 +01:00
Atgeirr Flø Rasmussen
f0ba4a5797 Use swap() and move() to reduce copying in formEllipticSystem(). 2015-03-16 14:22:32 +01:00
Atgeirr Flø Rasmussen
04b255a03f Make more use of move semantics in AD code.
This makes some API changes to AutoDiffBlock.
 - Add overload for the constant() constructor taking rvalue ref.
 - Add overload for the variable() constructor taking rvalue ref.
 - Make the function() constructor *require* rvalue refs.
 - Add a swap() function.

The remaining changes in this commit are follow-ups especially
to the third change (adding std::move in many places), and
some removal of unnecessary block pattern arguments from calls to
the constant() static method.
2015-03-16 14:22:32 +01:00
Robert Kloefkorn
96bda6a453 FullImplicitBlackOil and CPR: allow for dynamically changed tolerances from parameter
file. Default is as before.
2015-03-03 13:42:03 +01:00
Atgeirr Flø Rasmussen
a4024a3f9e Remove unused functions. 2015-02-17 13:42:26 +01:00
Markus Blatt
a7f1614f63 Adds copyright declarations and more documentation. 2015-02-12 10:41:44 +01:00
Markus Blatt
4527ce8ffd Add access to the underlying information about the parallelization.
We need it serveral places and all of them seem to have access to
NewtonIterationBlackoilInterface. This makes it natural to give access
to it and prevent users from having to forward it manually at several
places in the simulator driver.
2015-02-12 10:41:43 +01:00
Markus Blatt
221565f038 Enable the use of parallel dune-istl solvers.
As with opm-core we use boost::any to provide additional
information about a parallel run. It is used to set a
ParallelISTLInformation object and and fill it with the
information obtained from a parallel Cpgrid.

Note that the simulator currently compiles sucessfully. Still,
we have to test the runs and do debugging.
2015-02-12 10:41:43 +01:00
Robert K
463e4bc5e3 BlockOilSimulator: allow to run without wells (mainly for testing and debugging). 2015-01-20 11:38:46 +01:00
Atgeirr Flø Rasmussen
28af900f0b Merge pull request #250 from dr-robertk/PR/performance-avoid-zero-matrix-entries
Further performance improvement by avoiding zeros in matrix-matrix product.
2014-12-16 14:12:14 +01:00
Robert K
9a2a95c6eb This commits allows for flexible choice of either ILU(0) or ILU(n) where n is a
dynamical parameter given in the parameter file. The default is 0 (as before).
In addition the relaxation parameter has been added to the parameter with the
default preserving the state from before.
Also, the default parameter for use_amg and use_bicgstab in the constructor of
CPRPrecondition have been removed.
2014-12-05 14:03:58 +01:00
Atgeirr Flø Rasmussen
5b6765f9d8 Use fastSparseProduct() in place of Eigen's product. 2014-12-05 13:09:46 +01:00
Robert K
cbfb4f0489 remove typename. 2014-12-04 14:01:06 +01:00
Robert K
2ac6a211b2 use correct types of SparseMatrices. 2014-12-02 12:39:21 +01:00
Robert K
9cffb51543 [bugfix] use SparseLU when UMFPack was not found. 2014-11-19 11:22:57 +01:00
Atgeirr Flø Rasmussen
933cfaf666 Improve performance of CPR preconditioner.
This restores the performance to approximately the level it had before
the change to support non-diagonal well jacobians, for SPE9. All changes
are to the eliminateVariable() method.
 - Explicitly compute and apply the inverse.
 - Change loop ordering to apply inverse only num_eq - 1 times, instead
   of (numeq - 1)^2.
 - Use UmfPackLU instead of SparseLU.
2014-11-13 16:56:11 +01:00
Tor Harald Sandve
12b8e9f061 Adressing comments in the PR
1. The right hand side is solved only once
2. The solver is constructed directly with the matrix
3. const is added where it was missing
4. More commennts is added
5. Variable names are changed for clarification
2014-11-12 09:11:16 +01:00
Tor Harald Sandve
ab7472b64c Change the maximum number of linear iteration
If we need more than 150 linear iterations, it's probably something
wrong, and we may be better of by restarting with smaller time-steps.
TODO: make it possible for the user to specify this number.
2014-11-10 12:17:36 +01:00
Tor Harald Sandve
6c4d62d7fd Solve submatrix system in the Schur complement
The non-diagonal elements in the sub-matrices in the Schur complement is
no longer ignored. Instead of assuming the matrix do be diagonal, and
compute the invert of the sub-matrix, small linear systems are solved
using superLU.

Tested on SPE3 and Norne. (With this fix a slightly modified norne runs
until 3292 days)
2014-11-10 10:26:12 +01:00
Robert Kloefkorn
c9859f6293 Merge remote-tracking branch 'upstream/master' into timestepcontrol 2014-10-09 15:45:43 +02:00
Robert Kloefkorn
9f58ad5476 bugfix, Mismatched free() / delete / delete [] in DuneMatrix due to use of new instead
of the matrix internal allocators.

This fix also avoid the copying of the BCRSMatrix by providing a contructor that creates
the DuneMatrix for a given Eigen SparseMatrix.
2014-10-09 14:06:02 +02:00
Robert Kloefkorn
ed75a02ac0 Merge remote-tracking branch 'upstream/master' 2014-10-09 14:03:42 +02:00
Robert Kloefkorn
62cefb3a3e print warning when off-diagonal element is found in Schur complement instead of OPM_THROW. 2014-10-07 10:00:38 +02:00
Robert K
c2e6b368ae revert Schur fix. 2014-10-06 15:59:01 +02:00
Robert K
faf191b9f1 Merge remote-tracking branch 'upstream/master' into timestepcontrol 2014-10-06 13:58:54 +02:00
Atgeirr Flø Rasmussen
304e0a7bfc Remove unneeded template argument. 2014-10-06 11:08:44 +02:00
Robert K
f535761a17 only warn when non-diagonal block is found. 2014-10-01 15:45:11 +02:00
Robert K
d03f9411b6 first attempt to implement a time step control. 2014-10-01 13:50:08 +02:00
Robert K
739be5a873 revert to upstream/master. 2014-10-01 12:54:30 +02:00
Robert K
b337873e7f First version of time step control. Not really fully functioning yet. 2014-09-30 15:53:43 +02:00
Atgeirr Flø Rasmussen
31197e268f Remove unused code. 2014-09-30 10:12:10 +02:00
Atgeirr Flø Rasmussen
1602fce6b9 Add DuneMatrix class.
This is a hack to get a more efficient constructor for dune-istl
matrices from Eigen matrices.
2014-09-26 15:03:59 +02:00
Atgeirr Flø Rasmussen
5d59a97972 Add parameters controlling amg usage in cpr preconditioner.
New parameters are:
 - cpr_use_amg      (default false) if true, use AMG preconditioner for elliptic part
 - cpr_use_bicgstab (default true)  if true, use BiCGStab (else use CG) for elliptic part
2014-09-22 10:10:11 +02:00
Atgeirr Flø Rasmussen
25c9b36d4f Use new location of warning suppression header. 2014-09-20 10:39:34 +02:00
Atgeirr Flø Rasmussen
f48ee55c0d Change error message. 2014-05-21 13:15:42 +02:00
Atgeirr Flø Rasmussen
fec6154d81 Remove unused data members and parameters. 2014-05-20 15:23:04 +02:00
Atgeirr Flø Rasmussen
023a46fa12 Put creation of elliptic system in separate function. 2014-05-20 14:24:24 +02:00
Atgeirr Flø Rasmussen
307cd6ef33 Add convergence check, local whitespace cleanup. 2014-05-19 11:21:23 +02:00
Atgeirr Flø Rasmussen
ec03062b51 Remove unused code. 2014-05-19 11:13:17 +02:00
Atgeirr Flø Rasmussen
d9d5074dd2 Initial implementation of CPR preconditioner done.
With some caveats:
  - scaling factors for material balance equations and pressure are hardcoded.
  - pressure system is formed from sum of material balance equations, with
    no check for diagonal dominance.
2014-05-16 14:21:14 +02:00
Atgeirr Flø Rasmussen
bbf11c42c6 Pass elliptic matrix part to CPR preconditioner.
For now, the top left part is passed with no summing of equations or checks
for diagonal dominance.
2014-05-15 15:49:14 +02:00
Atgeirr Flø Rasmussen
c10a6f0804 Instantiate new preconditioner.
Using it so far only for comparing to existing solver.
2014-05-14 15:53:54 +02:00
Atgeirr Flø Rasmussen
b73367deda Let computeNewtonIncrement() eliminate well equations.
In its current state, we still don't do CPR, but eliminate the well equations,
solve the resulting system and finally recover the eliminated well unknowns.
2014-05-13 15:02:11 +02:00
Atgeirr Flø Rasmussen
c60a080a73 Added some utility functions for the CPR preconditioner.
The new functions are:
    - eliminateVariable()
    - recoverVariable()
    - isDiagonal()
2014-05-13 14:58:13 +02:00