Commit Graph

4462 Commits

Author SHA1 Message Date
Markus Blatt
1e205adcf1 Added support for the parallel solvers of dune-istl.
To support this the solveSystem methods of the LinearSolverInterface gets
an optional additional template parameter of type boost::any. It can hold any
copy constructable object. In our case it is used to pass the information about
the parallelization into the solvers of dune-istl without the compiler needing to know
their type. Inside of LinearSolverIstl::solveSystem we check whether the type stored inside of
boost::any is the new ParallelIstlInformation. If this is the case we extract the information
and use the parallel solvers if available, otherwise we solve serial/sequential.

The new ParallelIstlInformation is needed as the OwnerOverlapCopyCommunication is not copy
constructable. This is indeed a design flaw that should and will fixed upstream, but for the
time being we need ParallelIstlInformation to transfer the ParallelIndexSet and RemoteIndices
objects.
2014-03-20 21:59:29 +01:00
Andreas Lauser
2397eecf6f EclipseWriter: work around a GCC 4.4 smart_ptr bug
maybe it is not a bug but a slightly spec. The problem is that GCC 4.4
does not implicitly convert std::shared_ptr<$FOO> to
std::shared_ptr<const $FOO> which caused the recent Jenkins build
errors at Statoil. Note that this problem only occurs with the output
writer in conjunction with the old Eclipse parser, so
OPM/opm-autodiff#105 also makes the problem disappear. The present
patch addresses the root cause, though...
2014-03-20 16:58:57 +01:00
Andreas Lauser
2443903928 EclipseWriter: don't convert the pressure field to active cells
because that array already is restricted to the active cells...

found using ASAN.
2014-03-20 15:59:02 +01:00
Markus Blatt
5777547219 Explicitly construct the ScalarProduct, and SequentialInformation.
This patch refactors the calls to the dune-istl solvers.
The SeqScalarProduct, and SequentialInformation is now explicitly
constructed and later used to construct the smoothers
generically. Aditionally the linear operator (MatrixAdapter) is
constructed before calling the various solver dependent solve
routines.

While this does not change the behaviour of the code it is a
preparatory step to support parallel solvers. These parallel
solvers only differ in the type of the scalarproduct and
linear operator used from the sequential ones.
2014-03-20 12:09:24 +01:00
Atgeirr Flø Rasmussen
ae5d9746e0 Merge pull request #534 from blattms/fixes-issue-533
Use empty constructor to construct empty shared_ptr.
2014-03-20 11:00:00 +01:00
Markus Blatt
ae6ef8249b Use empty constructor to construct empty shared_ptr.
At least for g++-4.4. shared_ptr does not have a constructor
taking an integer and therefore compilation fails. Therefore we
resort statements to construct empty pointers, like
```parser_(0)```
to using the empty constructor:
```parser_()```

This patch closes #533
2014-03-20 10:51:18 +01:00
Markus Blatt
e2ca18261d Explicitly construct the ScalarProduct, and SequentialInformation.
This patch refactors the calls to the dune-istl solvers.
The SeqScalarProduct, and SequentialInformation is now explicitly
constructed and later used to construct the smoothers
generically. Aditionally the linear operator (MatrixAdapter) is
constructed before calling the various solver dependent solve
routines.

While this does not change the behaviour of the code it is a
preparatory step to support parallel solvers. These parallel
solvers only differ in the type of the scalarproduct and
linear operator used from the sequential ones.
2014-03-20 10:39:48 +01:00
Atgeirr Flø Rasmussen
550048b468 Merge pull request #523 from andlaus/EclipseWriter_add_new_parser
EclipseWriter: add new parser
2014-03-20 09:03:06 +01:00
Atgeirr Flø Rasmussen
b21d61c151 Merge pull request #532 from blattms/add-linsolver-test
Added a test for the linear solver interface.
2014-03-20 08:46:17 +01:00
Markus Blatt
7281a9567f Added a test for the linear solver interface.
This test sets up a simple laplace problem and solves it with the available
solvers. It assume that either dune-istl or UMFPack is present, which is
assume to be safe.
2014-03-19 21:48:07 +01:00
Atgeirr Flø Rasmussen
b461e35ae5 Merge pull request #531 from blattms/support-fast-amg-2.3-part2
Complete cf7f07b PR #530 to support FastAMG with dune-istl 2.3
2014-03-19 20:47:48 +01:00
Markus Blatt
b773c3de89 Include fastamg.hh for dune-istl 2.3
For the inofficial 2.2 release this was included automatically with amg.hh.
2014-03-19 19:51:17 +01:00
Markus Blatt
69a6a38856 Complete cf7f07b PR #530 to support FastAMG with dune-istl 2.3
This fixes further occurences of DUNE_HAS_FASTAMG that were
missed in pull request #530.

Previously we relied on the define DUNE_HAS_FAST_AMG to detect
whether these preconditioners are available. This define is only
available in the 2.2 release with cmake support. Therfore we now
addtionally test whether we are using dune-istl 2.3 or newer.
2014-03-19 17:40:02 +01:00
Andreas Lauser
75374c8745 EclipseWriter: add method variants taking the new instead of the old parser 2014-03-19 17:36:05 +01:00
Andreas Lauser
4aa4108367 EclipseWriter: Don't mingle multiple operations using arguments
This means that EclipseKeyword now never processes the data it
gets. Instead the data must be explicitly preprocessed by the calling
site using the new auxiliary functions "convertUnit()",
"extractFromStriped()", etc. This approach needs a few additional
temporary copies of the data, but given the facts that readability of
this code is much better using this approach, and that EclipseWriter
is neither a performance- nor a memory critical codepath, I don't care
too much about those temporary arrays...
2014-03-19 17:36:05 +01:00
Atgeirr Flø Rasmussen
f2d3098e50 Merge pull request #530 from blattms/support-fast-amg-2.3
Makes KAMG and FastAMG solver available with dune-istl 2.3
2014-03-19 15:28:23 +01:00
Markus Blatt
1ad8381b04 [cmake] do not export dune-istl version but use module local detection.
According to @rolk defines should only be exported in
cmake/Modules/<module>-prereqs.cmake if they are used in the
headers. This is not the case for the dune-istl version macros and
therefore we use opm_need_version_of in the config_hook in the top
level CMakefile with this patch.
2014-03-19 15:15:55 +01:00
Atgeirr Flø Rasmussen
3d9ef44625 Merge pull request #528 from blattms/fix-nonunifom
Fixes compilation of BlackoilPropertiesFromDeck.cpp.
2014-03-19 12:31:05 +01:00
Atgeirr Flø Rasmussen
f4c899db4b Merge pull request #525 from andlaus/SimulatorTimer_allow_to_be_limited_to_subranges
SimulatorTimer: allow it to be limited to a sub-range of all report steps
2014-03-19 12:21:37 +01:00
Atgeirr Flø Rasmussen
830459d9d0 Merge pull request #529 from andlaus/change_default_threephase_model
endpoint scaling: change default threephase_model to gwseg
2014-03-19 12:19:28 +01:00
Andreas Lauser
95985f0694 SimulatorTimer: allow it to be limited to a sub-range of all report steps 2014-03-19 11:36:39 +01:00
Andreas Lauser
829f791261 endpoint scaling: change default threephase_model to gwseg
and throw an exception if "simple" is encountered...

According to Ove, gwseg should be used, because "gwseg is the model
relevant to the norne case - i.e the model eclipse uses.

The fix for the simple model has to wait for a refac of the satfunc
complex."
2014-03-19 11:22:43 +01:00
Markus Blatt
cf7f07b179 Makes KAMG and FastAMG solver available with dune-istl 2.3
Previously we relied on the define DUNE_HAS_FAST_AMG to detect
whether these preconditioners are available. This define is only
available in the 2.2 release with cmake support. Therfore we now
addtionally test whether we are using dune-isl 2.3 or newer.
2014-03-19 11:19:25 +01:00
Markus Blatt
fed0136a21 Fixes compilation of BlackoilPropertiesFromDeck.cpp.
Patch 31c09aed was erroneous as it was trying to assing a
SaturationPropsFromDeck<SatFuncSimpleNonuniform> to a
SaturationPropsFromDeck<SatFuncSimpleUniform> in the constructor
taking the new parser. This patch fixes this.
2014-03-19 11:09:13 +01:00
Atgeirr Flø Rasmussen
a529dd5ae4 Merge pull request #517 from blattms/issue-516
Apply changes from commit a953ba8 to new parser code too.
2014-03-19 08:29:16 +01:00
Atgeirr Flø Rasmussen
847e0b3bcb Merge pull request #527 from andlaus/fix_blackoil_pvt_props_in_new_parser
fix densities for new parser in BlackoilPvtProperties
2014-03-18 23:27:31 +01:00
Andreas Lauser
5c55fb7341 fix densities for new parser in BlackoilPvtProperties
that is one of the more subtle differences between the old and the
new parsers. now, valgrind does not seem to complain anymore, so everything
should be All Right (TM) ;)
2014-03-18 20:42:40 +01:00
Atgeirr Flø Rasmussen
24e4d087d8 Merge pull request #526 from andlaus/endpoint_scaling_correct_revers_condition
endpoint scaling: invert condition
2014-03-18 15:51:16 +01:00
Andreas Lauser
83dcf17d5b endpoint scaling: invert condition
yeah, true and false are difficult things sometimes...
2014-03-18 15:11:38 +01:00
Atgeirr Flø Rasmussen
1ef11653b4 Merge pull request #515 from andlaus/EclipseWriter_cleanups
Eclipse writer cleanups
2014-03-17 15:24:07 +01:00
Bård Skaflestad
ebe2a80439 Merge pull request #522 from atgeirr/explicit-constructors
Made single-argument constructors explicit.
2014-03-17 07:44:25 -05:00
Atgeirr Flø Rasmussen
f8f7550782 Made single-argument constructors explicit.
Avoids unintended implicit conversions.
2014-03-17 13:27:50 +01:00
Bård Skaflestad
e65d99ad4c Merge pull request #508 from atgeirr/adjust-initial-wellrates
Adjustment to well rate initialisation.
2014-03-15 14:59:27 +01:00
Andreas Lauser
314b3a32d8 some cleanups for EclipseWriter
- the output=true|false parameter gets respected now
- if output is "true", it is checked that the value of the
  "output_dir" parameter is a directory (although I did not find an
  easy way to check whether it is writable short of writing a file to
  it.)
- the "output_interval" parameter gets respected as well
- the index of a written timestep is now independent of the time step
  index of the simulation: the initial solution is always 0, the first
  result written to disk is always 1 and so on... (i.e., it does not
  matter anymore how many steps the simulator needed between two writes)

these changes have been proposed by @atgeirr. Thanks!
2014-03-14 19:45:15 +01:00
Atgeirr Flø Rasmussen
065efc5b0e Merge pull request #520 from qilicun/plyshear
Read keyword PLYSHEAR.
2014-03-14 12:36:21 +01:00
Atgeirr Flø Rasmussen
d2e6ccec33 Fix logic related to open/shut wells initialisation. 2014-03-14 11:27:20 +01:00
Atgeirr Flø Rasmussen
d25b9cd13a Merge pull request #514 from joakim-hove/wells-cpos-manipulation
Removed cpos = ~cpos constructions for closing a well
2014-03-14 11:08:53 +01:00
Liu Ming
5fff1d25dc Read keyword PLYSHEAR. 2014-03-14 15:34:38 +08:00
Atgeirr Flø Rasmussen
c59727720d Merge pull request #511 from andlaus/initStateFromDeck_reverse_PRESSURE_and_EQUIL
initStateFromDeck: reverse the priorities of the PRESSURE and EQUIL keywords
2014-03-13 20:30:31 +01:00
Andreas Lauser
de792c72c7 initStateFromDeck(): do not accept potentially contradicting ways to set the initial condition
i.e. PRESSURE and EQUIL are now considered mutually exclusive...
2014-03-13 16:33:32 +01:00
Markus Blatt
847f48aa78 Make initStateFromDeck with the new parser deck usable again.
My last merge broke compilation of opm-autodiff, as this new function
still relied on the old behaviour (the one taking a grid instead of
the data directly). This patch moved initStateFromDeck to the new behaviour.
2014-03-13 15:59:37 +01:00
Markus Blatt
a6fb099fbb Fixed SaturationPropsFromDeck::initEPSKey for new parser and non-UG
There the cell_centroids where still treated like double*. This patch
uses the UgGridHelpers instead.
2014-03-13 15:41:59 +01:00
Markus Blatt
eeb0039683 Merge branch 'refactor-for-cpgrid-support' into master-refactor-for-cpgrid-support
Manually resolved conflicts in:
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/wells/WellsManager.cpp
2014-03-13 13:41:45 +01:00
Markus Blatt
21bf14de0d Fixed missed on occurence of number of samples 2014-03-13 12:13:11 +01:00
Markus Blatt
31c09aed09 Apply changes from commit a953ba8 to new parser code too.
The mentioned commit was applied before the merge of
opm-parser-integrate and therefore the changes did not carry over
to the code that uses the new parser. This code mimics the
changed behaviour for the new parser.

Closes issue #516
2014-03-13 12:00:01 +01:00
Joakim Hove
58f96a5808 Will check if a well is open before throwing for an invalid control. 2014-03-12 20:27:17 +01:00
Andreas Lauser
3aef6578f9 SimulatorTimer: rename currentTime() to simulationTimeElapsed()
because the name "currentTime()" can be mistaken for the point in
real-life time at which the simulation is run (e.g. March 11, 2014,
15:07:45.123), the _point_ in time which the simulator timer currently
represents (e.g. Jun 5, 1985, 02:33:12.345) instead of the simulator
time in seconds which elapsed since the START date
(e.g. 52633.345 s).

this rename may lead to some fallout in other modules. I'll
fix them after this PR has been merged...
2014-03-12 19:01:58 +01:00
Joakim Hove
1f94abcf14 Removed cpos = ~cpos constructions for closing a well; using well_controls_shut_well explicitly instead. 2014-03-12 17:41:40 +01:00
Atgeirr Flø Rasmussen
ddf256a451 Merge pull request #512 from karbor/master
Added support of SWCR and SOWCR in CornerpointChopper
2014-03-11 20:54:02 +01:00
Bård Skaflestad
baf4294e8b Merge pull request #513 from flikka/use-dyn-boost-check-once
Only look for BOOST´s unit test framework module if not already found. Sync version requirement.

This resolves #509.
2014-03-11 19:16:04 +01:00