Commit Graph

144 Commits

Author SHA1 Message Date
Markus Blatt
b4b8e7aff1
Merge pull request #4558 from Tongdongq/move-cpu-decomposition
Only do CPU decomposition if needed, when using GPU
2023-03-29 12:54:38 +02:00
hnil
2e4d5ee57b - Remove wrong output if already converged 2023-03-29 09:47:02 +02:00
hnil
445e4f10fe fixed spelling 2023-03-29 08:55:31 +02:00
hnil
6b4082a1fe better messages 2023-03-28 13:54:09 +02:00
hnil
992edc1fec - added a reduced tolerance for linear for the nonlinear solver to accept the result 2023-03-28 11:43:00 +02:00
Tong Dong Qiu
0bf91691fe Only do CPU decomposition if needed, when using GPU 2023-03-27 11:43:26 +02:00
Arne Morten Kvarving
aaaf00f2fd adjust to timing macro header split 2023-03-01 13:18:16 +01:00
Atgeirr Flø Rasmussen
7acc6feb18 Make names more consistent. 2023-02-28 13:58:02 +01:00
hnil
fd98d8ea27 added timing blocks to most important parts 2023-02-15 09:41:37 +01:00
Markus Blatt
b67388e6f0 Use cpr if requested in RUNSPEC section of data file.
Can be overwritten using command line parameter `--linear-solver=...`.
2023-01-18 22:02:35 +01:00
Arne Morten Kvarving
4a0bdc38e1 ISTLSolverEbos: avoid use of sstream 2023-01-02 15:18:34 +01:00
Atgeirr Flø Rasmussen
3832b02367 Adjust default behaviours for CPR variants.
- Remove two unused parameters. CprEllSolvetype is never used, and CprEllMaxIter
   is not used correctly as is (if used, it should change the maximum iterations of
   the coarse solver, not the repeats of the preconditioner) and is better left for
   JSON file customization.
 - Make the default AMG setup for "cpr" (including "cpr_trueimpes" and "cpr_quasiimpes")
   match the setup for "cprw". In particular, beta = 0.0 (not 1e-4) and
   prolongationdamping = 1.0 (not 1.6).
 - Just as we override the default maximum number of linear iterations for cpr and cprw
   (unless the user actually specified on the command line) to 20 instead of 100, we
   change the default reduction to be 0.005 instead of 0.01.
2022-12-21 13:23:13 +01:00
Arne Morten Kvarving
f17a90170d use exception classes from opm-common 2022-12-13 12:56:13 +01:00
Tong Dong Qiu
21b23b7aa4 Combine multiple defines into one 2022-11-18 13:09:39 +01:00
Tong Dong Qiu
35287a61ff Remove FPGASolver and references 2022-11-17 09:38:01 +01:00
Tong Dong Qiu
5466fdd289 Add missing macro guards 2022-11-03 15:47:38 +01:00
Tong Dong Qiu
42410d408f Removed GRAPH_COLORING opencl reordering option.
Simplified and renamed opencl_ilu_reorder parameter.
2022-09-27 15:54:19 +02:00
Atgeirr Flø Rasmussen
caca77dc67 Rename command line option --linsolver to --linear-solver. 2022-09-21 09:31:19 +02:00
Arne Morten Kvarving
8e2b385f4d changed: put parts of ISTLSolverEbos in separate compile unit
in particular this means simulator objects are now not dependent
on FlexibleSolver.hpp and BdaBridge.hpp
2022-09-12 12:44:56 +02:00
Arne Morten Kvarving
1a348c0d29 changed: get rid of duplicate MatrixBlock headers/classes
this has already led to some confusion. move some of the code
upstream to opm-models and remove the rest of the duplicated code.

the remainder of MatrixBlock.hpp is renamed to SmallDenseMatrixUtils.hpp
2022-08-25 12:48:53 +02:00
Bård Skaflestad
a56cd6752c
Revert "changed: reduce some code duplication" 2022-08-24 20:34:52 +02:00
Arne Morten Kvarving
447d77b579 changed: get rid of duplicate MatrixBlock headers/classes
this has already led to some confusion. move some of the code
upstream to opm-models and remove the rest of the duplicated code.

the remainder of MatrixBlock.hpp is renamed to SmallDenseMatrixUtils.hpp
2022-08-24 15:54:01 +02:00
Arne Morten Kvarving
3ef07d7f62 changed: put ParallelOverlappingILU0 in separate compile unit
i chose to split in a separate _impl file because this code is so
generic that there may be downstream users who want to use on other
matrix types than what we use in opm-simulators.
2022-08-22 11:21:31 +02:00
Arne Morten Kvarving
a32a32649d changed: put MILU in separate compile unit 2022-08-16 10:46:20 +02:00
Elyes Ahmed
5c2b60bcd0 rebasing 2022-07-28 20:40:34 +02:00
Atgeirr Flø Rasmussen
ffb09ee53e
Merge pull request #3937 from atgeirr/pressure-bhp-cpr
Pressure bhp cpr
2022-06-16 17:15:49 +02:00
Atgeirr Flø Rasmussen
2992ec25d8 Address issues raised in review. 2022-06-10 15:59:45 +02:00
hnil
4ead854b69 - taking pullrequest information into account
- Moving transfere level to be template of OwningTwolevelPrecontitioner
2022-06-08 17:03:27 +02:00
hnil
8f4cf8a952 removed compiler warnings 2022-06-08 17:03:27 +02:00
hnil
66c4a8c862 made resue interval separate paramter 2022-06-08 17:03:27 +02:00
hnil
141a816e5d new restart options 2022-06-08 17:03:25 +02:00
hnil
f3acfcde0b Adding functions for pressure system manipulation to well models.
Also add well-aware operator and transfer policy.
This will be used for CPR with custom operators.
2022-06-08 17:01:33 +02:00
Bård Skaflestad
e6dff88eb7 Temporarily Limit Block-Jacobi Partitioner to OpenCL Only
The block-Jacobi partitioner (commit e360c00b7) uses grid interfaces
that are only available in CpGrid and this blocks introducing other
grid managers such as ALUGrid.  Since the partitioner was only added
for OpenCL, guard special purposes accesses with HAVE_OPENCL.

This is a temporary measure and we will venture to restore the
partitioner later, although possibly restricted to CpGrid only.
2022-06-08 16:14:39 +02:00
Tong Dong Qiu
4db112cafa Use row_wise mode to build jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
1a1bc24bef Delay creating sparsity pattern for jacobi Matrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
2683019280 Bugfix: set vector size for MSwells was removed during refactoring 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
1cec56fa68 Use implicit mode to build jacMatrix
Fix print variable
2022-04-21 17:19:01 +02:00
Tong Dong Qiu
550ce92902 Faster copying to jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
61f693dbaf reenable normal opencl
Rebased
2022-04-21 17:18:54 +02:00
Tong Dong Qiu
e360c00b73 add block-jacobi partitioner option. Add block-jacobi matrix for use in OpenCL preconditioner
Rebased
2022-04-21 17:18:32 +02:00
Tong Dong Qiu
6465cf9cbb Add CPR preconditioner for openclSolver and
change raw pointers to vector for Matrix
2021-12-01 11:43:30 +01:00
Markus Blatt
50867bf23c Guard include of WellContributions.cpp 2021-11-17 19:23:46 +01:00
Markus Blatt
d2caf41037 Fix incomplete type ‘Opm::WellContributions’ compiler error (g++-8)
Fixes
```
In file included from opm-simulators/opm/simulators/flow/BlackoilModelEbos.hpp:53,
                 from opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:26,
                 from opm-simulators/flow/flow_ebos_gaswater.cpp:28:
opm-simulators/opm/simulators/linalg/ISTLSolverEbos.hpp: In member function ‘bool Opm::ISTLSolverEbos<TypeTag>::solve(Opm::ISTLSolverEbos<TypeTag>::Vector&)’:
opm-simulators/opm/simulators/linalg/ISTLSolverEbos.hpp:265:56: error: incomplete type ‘Opm::WellContributions’ used in nested name specifier
                 auto wellContribs = WellContributions::create(accelerator_mode, useWellConn_);
                                                        ^~~~~~
```
2021-11-17 17:30:01 +01:00
Arne Morten Kvarving
e25caba8ed changed: refactor BDA well contributions
split in API specific classes for Cuda/OpenCL

this to
1) it's cleaner
2) it avoids pulling in openCL code in cuda classes which leads
to clashes between nvidia headers and opencl.hpp

there is still too much API specific things in interface between the
bda components to work through a virtual interface so we still have to cast
to the relevant implementation in various places.
2021-11-11 14:49:33 +01:00
Tong Dong Qiu
282f611f92 Make sure amgcl can be used without CUDA 2021-07-07 16:24:52 +02:00
Tong Dong Qiu
7c7911b9bc Allow to use amgcl when CUDA and OpenCL are not found 2021-07-07 16:24:51 +02:00
Tong Dong Qiu
5918c64b54 Add useWellConn parameter to WellContributions() 2021-07-07 16:24:51 +02:00
Markus Blatt
db0f19ba88 Determine index of pressure from model used.
Previously, the user had to specify it in the json file read from the
FlexibleSolver or 1 was used. Unfortunately, the index depends on the
model used and it seem rather opaque to a user what that index is.

With this commit we determine the pressure index from the model.
2021-06-10 16:19:18 +02:00
Arne Morten Kvarving
b7e2ad3bfe added: PropertyTree class
this is a thin wrapper around boost::property_tree
with this we avoid parsing property tree headers in all
simulator objects
2021-06-09 15:21:52 +02:00
Arne Morten Kvarving
29ae002a87 changed: avoid templating in setupPropertyTree
simply pass the required params to function instead.
2021-06-09 12:54:14 +02:00