Markus Blatt
7261759065
Reuse UMFPack decomposition whenever possible.
...
We hold a shared pointer to the umpfack solver that gets reset
whenever the matrix is changed. When applying the decomposition
we will be recomputed if the solver pointer is null.
2020-08-18 17:55:50 +02:00
Markus Blatt
ce409737fe
Allow applyUMFPack to decompose if needed.
2020-08-18 17:55:50 +02:00
Markus Blatt
a011244d9c
refactored invDxDirect to allow for reusing the decomposition.
2020-08-18 17:55:50 +02:00
Markus Blatt
f65eca3310
Use RelaxedMaxPvFraction 0 for now.
...
This should make the tests work.
2020-08-18 16:57:16 +02:00
Markus Blatt
e040484580
relaxed tolerance for CNV if only small fraction of PV is violated
...
Previously we used relaxed tolerance once a certain number of Newton
steps was exceeded. Now we check for all cells violating CNV locally
and if their pore volume is less than a certaun fraction (default 3%)
we use the relaxed tolerance (default: 1e9)
Original idea originated from Norce.
2020-08-18 16:57:16 +02:00
Tor Harald Sandve
bd9186b41d
implement Saltvd
2020-08-18 10:55:43 +02:00
Kai Bao
b88501bc7d
Merge pull request #2711 from blattms/fix-unused-vars-wells
...
Remove unused variable groups from BlackoilWellModel::wellsToState.
2020-08-12 22:29:07 +02:00
Kai Bao
08b93424f3
setting UseInnerIterationsWells default to be false
...
and reducing default MaxInnerIterWells to be 50, which should not matter
much. We should try to reduce it further to something like 20, 10 later.
2020-08-11 09:46:23 +02:00
Kai Bao
a38dc27bcb
refactoring for iterateWellEquations
2020-08-11 09:10:19 +02:00
Kai Bao
11807747cb
renaming solveWellEqUntilConverged to be iterateWellEquations
2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fefa5c22ce
make assembleWellEqIteration private
2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fc45b1bd47
Add inner iterations for standard wells also
2020-08-11 09:10:19 +02:00
Markus Blatt
5743a979e3
Formatting: added missing space.
2020-08-07 09:38:10 +02:00
Markus Blatt
8d3eac81a5
[OpenCL] Fixes out of bounds read in reordering code in ILU0.
...
rowPerColor only has size numColors!
2020-08-05 21:22:01 +02:00
Markus Blatt
c28a12636a
Also free memory allocated with CUDA also with CUDA
...
With multisegment wells we allocate WellContributions::hx and hy with
`CudaMallocHost`. Yet we tried to deallocate them with
`delete[]`. This caused segementation faults e.g. for
model1/MSW_MODEL_1. Now we use `CudaFreeHost` for freeing if we used
CUDA.
Closes #2719
2020-08-04 12:54:27 +02:00
Markus Blatt
13ff454e56
Remove unused variable groups from BlackoilWellModel::wellsToState.
...
Alternatively it could be marked as [[maybe_unused]] if it will be
used sometime in the future.
2020-07-21 11:35:43 +02:00
Markus Blatt
f37fa8bbd9
Prevent unused variable warnings without CUDA in WellContributions.
2020-07-21 11:24:19 +02:00
Markus Blatt
59064b4ac2
Prevent warning about shadowing dim_wells and dim.
2020-07-10 13:40:38 +02:00
Markus Blatt
efd3aeb290
Catch exceptions by const reference to prevent warnings.
...
e.g. gcc issued: "warning: catching polymorphic type ‘class cl::Error’ by value [-Wcatch-value=]"
2020-07-10 13:40:38 +02:00
Markus Blatt
faaee51d09
Merge pull request #2682 from Tongdongq/openclSolver
...
Added openclSolver
2020-07-10 13:38:32 +02:00
T.D. (Tongdong) Qiu
5971a7ae9e
Split WellContributions into .cpp and .cu
2020-07-10 11:13:55 +02:00
Tongdongq
f90bb85960
Merge pull request #1 from blattms/openCLSolver-g++-8.3
...
include missing header for OpenCLSolver with g++-8.3
2020-07-09 09:25:08 +02:00
Bård Skaflestad
47d4a5087f
Merge pull request #2698 from totto82/applyPVTWsalt
...
Pass the salt concentration to the water PVT
2020-07-08 09:32:51 +02:00
T.D. (Tongdong) Qiu
af02fc3924
Added try-catch around the linear solve
2020-07-07 16:07:42 +02:00
T.D. (Tongdong) Qiu
0b20762e59
Clarified parameter help print and chosen OpenCL platform and device
2020-07-07 14:26:02 +02:00
T.D. (Tongdong) Qiu
ab49f60eca
Added opencl.hpp to define variables and import opencl
...
Added opencl.cpp to get OpenCL error strings
2020-07-07 13:46:47 +02:00
Markus Blatt
7a571c98db
include missing header for OpenCLSolver with g++-8.3
...
Without I got compilation errors.
2020-07-07 11:10:19 +02:00
T.D. (Tongdong) Qiu
478e2ee971
Improved rowsPerColor usage
2020-07-07 11:00:38 +02:00
T.D. (Tongdong) Qiu
5aa8dda487
Changed default parallel strategy to GRAPH_COLORING
2020-07-06 13:56:27 +02:00
T.D. (Tongdong) Qiu
4c037b0998
Removed unused test kernels
2020-07-06 13:56:27 +02:00
T.D. (Tongdong) Qiu
a164a57220
Added memory management to BlockedMatrix
2020-07-06 13:55:50 +02:00
T.D. (Tongdong) Qiu
779a713330
Simplified BdaSolverStatus
2020-07-06 13:40:44 +02:00
T.D. (Tongdong) Qiu
833ea8ae72
Added templated blockinversion for C-style arrays
2020-07-06 13:40:44 +02:00
T.D. (Tongdong) Qiu
bb622449b6
Changed platformID and deviceID to commandline parameter. Make sure Flow exits cleanly upon invalid platform- or deviceID.
2020-07-06 13:38:57 +02:00
Tom Hogervorst
c8eb14aaac
Graph coloring now uses CSC-format version of input pattern as well.
2020-07-06 13:29:30 +02:00
Tom Hogervorst
38c58bffae
Renamed functions to all used Camel case, and renamed parameters to better represent what is stored in them.
...
Fixed mistake of using wrong sparsity pattern data to call canBeStarted function, and removed nnzValues of CSCmat, which were never used.
2020-07-06 13:18:46 +02:00
T.D. (Tongdong) Qiu
7f8faa018b
Replaced timing function with Dune::Timer
2020-07-06 11:22:11 +02:00
T.D. (Tongdong) Qiu
845563c37b
Replaced hardcoded constant with template
2020-07-06 11:20:43 +02:00
Joakim Hove
b9b1e734cb
Add data::GroupValues member to RestartValue
2020-07-04 10:06:03 +02:00
Tor Harald Sandve
fdf0f1ed27
SALTVD and BDENSITY is not implemented
2020-07-02 13:49:05 +02:00
Tor Harald Sandve
88ee892fdf
pass the saltConcentration to the waterPVT
2020-07-02 13:44:01 +02:00
Bård Skaflestad
5bb4321824
Simulator Group Data: Chase Upstream API Update
...
This commit makes the 'groupData()' function return a
map<string, Opm::data::GroupData>
object instead of a
map<string, Opm::data::GroupConstraints>
object. The 'GroupData' structure adds a level of indirection to
the current per-group summary quantities that are directly assigned
by the simulator. While here, also move the assignment of the
current group constraints/control values out to a separate helper
to reduce the body of the per-group loop in 'groupData()'.
This is in preparation of adding support for reporting group-level
production/injection guiderates (Gx[IP]GR) to the summary file.
2020-07-01 22:52:26 +02:00
Bård Skaflestad
8e20e0957f
Don't Name Type that does not Exist in Sequential Configurations
...
This commit makes the constructor PressureInverseOperator that
accepts a Dune::OwnerOverlapCopyCommunication<> object contingent on
having MPI. The type does not exist otherwise.
2020-07-01 21:52:57 +02:00
Markus Blatt
c01e6d14f7
Merge pull request #2694 from atgeirr/flexible-wellop
...
Allow well operators with FlexibleSolver.
2020-07-01 20:30:44 +02:00
Atgeirr Flø Rasmussen
f2395f6d94
Merge pull request #2695 from totto82/addBrineOutput
...
Add brine to output
2020-07-01 11:46:23 +02:00
Atgeirr Flø Rasmussen
a66260fe87
Merge pull request #2684 from totto82/convertUsingPriviousRates
...
use rates from previous time-step in the guiderate conversion
2020-07-01 11:04:22 +02:00
Tor Harald Sandve
6a7e816368
Add brine to output
2020-06-30 14:15:54 +02:00
Atgeirr Flø Rasmussen
c94eec872f
Allow well operators with FlexibleSolver.
2020-06-30 12:33:57 +02:00
Tor Harald Sandve
fce0ba6759
Add oil water brine specialization
2020-06-30 10:41:28 +02:00
Bård Skaflestad
6d644da88e
Merge pull request #2688 from akva2/add_spe1_thermal_watvisc_reg_test
...
Add spe1 thermal watvisc reg test
2020-06-26 23:59:53 +02:00
Arne Morten Kvarving
e31062aa4e
add missing license header
2020-06-26 09:49:01 +02:00
T.D. (Tongdong) Qiu
8913e1d057
Make sure OpenCL can be used without CUDA
2020-06-25 18:44:49 +02:00
T.D. (Tongdong) Qiu
b7f47c9787
Clarified preprocessor macros
2020-06-25 15:01:23 +02:00
T.D. (Tongdong) Qiu
c76630687d
Removed config.h in header files
2020-06-25 14:49:41 +02:00
T.D. (Tongdong) Qiu
0471da3815
Rewritten Graph Coloring
2020-06-25 14:42:35 +02:00
T.D. (Tongdong) Qiu
ca83a8f53c
Removed unused headers
2020-06-25 13:12:12 +02:00
T.D. (Tongdong) Qiu
4ad234bf55
Changed some ints to unsigned
2020-06-25 12:29:20 +02:00
T.D. (Tongdong) Qiu
b692b66d3a
Added block_size templates to BlockedMatrix and Reorder functions
2020-06-25 11:51:41 +02:00
Atgeirr Flø Rasmussen
c59f4f7118
Make ghost-last feature available in PreconditionerFactory.
2020-06-25 10:56:11 +02:00
Atgeirr Flø Rasmussen
c2c79f0903
Move well operators to separate file.
...
Also introduce new class WellModelAsLinearOperator making a well model
into an actual Dune::LinearOperator, this prevents the TypeTag dependent
type from leaking into the type of the WellModelMatrixAdapter instantiation.
As a side benefit, the adapter classes can now adapt (i.e. combine with a
matrix operator) any linear operator.
2020-06-25 10:13:12 +02:00
T.D. (Tongdong) Qiu
8f9fa15ecd
Fixed warnings, mostly shadowed parameters
2020-06-25 09:40:20 +02:00
T.D. (Tongdong) Qiu
98ddf47b44
Added block_size template to BdaSolvers and BILU0
2020-06-25 09:39:55 +02:00
Atgeirr Flø Rasmussen
7a69db02de
Merge pull request #2685 from blattms/fix-owner-cells-not-first
...
Alternative fix running in parallel with --owner-cells-first=false
2020-06-25 00:29:58 +02:00
T.D. (Tongdong) Qiu
2a48f5f63f
Simplified usage of BdaSolver::second() for timing
2020-06-24 19:48:50 +02:00
T.D. (Tongdong) Qiu
3dc368b0b4
Added block_size templates to the BdaBridge. Removed unused gpu_mode variable
2020-06-24 16:46:04 +02:00
Atgeirr Flø Rasmussen
d3efb01e89
Merge pull request #2645 from hakonhagland/refac_fullyimpl
...
Refactor run() in `SimulatorFullyImplicitBlackoilEbos.hpp`
2020-06-24 16:35:09 +02:00
T.D. (Tongdong) Qiu
26133c4fd7
Fixed type of gpu_mode when HAVE_CUDA is false
2020-06-24 15:55:03 +02:00
Markus Blatt
27c9ed5c85
Consistently use ISTLSolverEbos::getMatrix to get correct matrix.
2020-06-24 15:37:43 +02:00
Markus Blatt
27ace20378
[bugfix] remove redundant copyjacToNoGhost in ISTLSolverEbos::solve
...
It uses a null pointer and make flow segfault. The copying is already
done in ISTLSolverEbos::prepare.
2020-06-24 15:25:24 +02:00
Tor Harald Sandve
a99254f917
clean up based on review
2020-06-24 09:48:09 +02:00
Tor Harald Sandve
8e3c124b23
use rates from privious time-step in the guiderate conversion to reduce oscilation
2020-06-24 09:38:18 +02:00
T.D. (Tongdong) Qiu
e4417fdc01
Set default value for use_gpu, using Dune would segfault because of the unitialized value
2020-06-23 18:20:10 +02:00
T.D. (Tongdong) Qiu
b9e4bd3a95
Updated HAVE_XX guards. Replaced string == compare with .compare()
2020-06-23 18:19:33 +02:00
Håkon Hægland
23505cf5c9
Fixed up minor issues from review of PR #2645
...
Renamed some functions, and checked the return value from runStep().
2020-06-23 12:14:07 +02:00
Tor Harald Sandve
39e23c4d41
store polymer rates for output
2020-06-23 12:01:34 +02:00
Håkon Hægland
e8a4065192
Refactor SimulatorFullyImplicitBlackoilEbos.hpp
...
A resubmission of commit bb20804
in PR #2403 and PR #2442 to work with the
current master.
Continues the work in #2619 and #2631 to refactor main simulation loop in
flow to work with the Python bindings.
The run() method in SimulatorFullyImplicitBlackoilEbos.hpp is refactored
in preparation for the implementation of a Python step() function in a
later commit. Currently run() is called from runSimulatorInitOrRun() in
FlowMainEbos.hpp using the runSimulatorRunCallback_(). Later, there
will be other callbacks like runSimulatorStepInitCallback_(), and
runSimulatorStepCallback_(), that will need to call different parts of
the code in run(). The run() function is thus refactored into run(),
runInit(), runStep(), and runLastStep(). Also, some of the local
variables in run() have to be made persistent between calls to
runStep(), this applies to variables report, solverTimer, totalTimer,
and adaptiveTimeStepping, which are made private class variables.
2020-06-23 11:50:57 +02:00
T.D. (Tongdong) Qiu
39df7c9381
Updated comments, fixed shadowed declaration warnings
2020-06-23 11:30:15 +02:00
T.D. (Tongdong) Qiu
f974a5f6db
Added openclSolver
...
Usage: --gpu-mode=[cusparse|opencl|none] on command line
2020-06-22 18:26:49 +02:00
Atgeirr Flø Rasmussen
c58456faae
Add missing include.
2020-06-20 16:28:59 +02:00
Atgeirr Flø Rasmussen
427eac5132
Use macro for instantiations, and clean up includes.
2020-06-19 16:37:43 +02:00
Atgeirr Flø Rasmussen
fb99dd6fee
Use unique_ptr rather than shared_ptr.
2020-06-19 16:03:46 +02:00
Atgeirr Flø Rasmussen
226697ec6f
Merge pull request #2679 from akva2/janitoring
...
make parseSuccess dependent on MPI
2020-06-19 15:10:38 +02:00
Atgeirr Flø Rasmussen
5105b80e50
Merge pull request #2667 from atgeirr/flexible-solver-separate-compile-unit
...
Use explicit instantiation for FlexibleSolver to reduce compile times.
2020-06-19 15:03:30 +02:00
Atgeirr Flø Rasmussen
faddef0321
Do not instantiate things requiring MPI when HAVE_MPI is false.
2020-06-19 10:01:16 +02:00
Arne Morten Kvarving
41e7201c73
make parseSuccess dependent on MPI
...
avoids unused warnings when building without
2020-06-19 09:46:21 +02:00
Joakim Hove
5484264854
Add actionState argument also for non MPI branch
2020-06-19 05:21:05 +02:00
Joakim Hove
d89a2e5eb7
Merge pull request #2674 from joakim-hove/use-action-state
...
Add Action::State member to EclPropblem and pass it to io/ActionX
2020-06-18 18:39:08 +02:00
Atgeirr Flø Rasmussen
dcd5d21415
Split constructor to reduce instantiation.
...
Without the split, certain combinations with Dune::Amg::SequentialInformation
as template argument for Comm needlessly get instantiated.
2020-06-18 08:28:20 +02:00
Atgeirr Flø Rasmussen
3784ab9d77
Amended copyrights and made the _impl.hpp a proper header file.
2020-06-17 21:07:13 +02:00
Atgeirr Flø Rasmussen
f24b2cd708
Split instantiation files to enable parallel build.
2020-06-17 13:03:57 +02:00
Joakim Hove
b52366926a
Add Action::State member to EclPropblem and pass it to io/ActionX
2020-06-17 12:25:03 +02:00
Atgeirr Flø Rasmussen
2dc2e053d1
Change order of constructor arguments.
...
This allows simplification, and having just two constructors.
2020-06-17 09:31:19 +02:00
Tor Harald Sandve
43d434d42e
trivial clean up
2020-06-17 08:39:19 +02:00
Tor Harald Sandve
e9d040a284
Fix upwining for friction, acceleration, valve and SIGD for MSW
...
Note 1:
The rate vectors used for the pressure equation now contains derivatives wrt to the upwind segment for fractions.
To make sure derivatives wrt. to different segmens gets mixed we disregard the derivatives for the properties (density, viscosity) evaluated at the upwind segment.
Note 2:
A factor 2 is added to the velocity head term similar as in the friction term
Note 3:
A sign change is added to the acceleration term for massrates > 0. Is this correct. It seems like the reference simulator does this.
2020-06-17 08:39:19 +02:00
Atgeirr Flø Rasmussen
a6d186551b
Use explicit instantiation for FlexibleSolver to reduce compile times.
2020-06-17 07:43:30 +02:00
Joakim Hove
f03dd20b96
Merge pull request #2636 from joakim-hove/serialize-gpmaint
...
Instantiate packer for std::optional<GPMaint>
2020-06-12 12:19:28 +02:00
Bård Skaflestad
201ef4adef
Remove Redundant 'packSize' Declaration
...
The 'std::string' case is covered by a call to ADD_PACK_PROTOTYPES.
2020-06-12 00:14:41 +02:00
Joakim Hove
baba9b6773
Merge pull request #2642 from joakim-hove/icd-variant
...
Use std::variant access to Segment::icd
2020-06-11 11:32:08 +02:00
Joakim Hove
be5f3ff2e1
Use std::variant access to Segment::icd
2020-06-10 20:41:14 +02:00
Kai Bao
23a9f4732b
Merge pull request #2666 from atgeirr/msw-log-output-cleanup
...
Prettifying and reducing log output from MSW.
2020-06-10 19:44:01 +02:00