Commit Graph

1294 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
84acbc4601 Make saturation functions work with two phases again.
Note that this changes ExplicitArraysFluidState to take
a run-time argument for the number of phases.
2015-08-12 13:38:32 +02:00
Atgeirr Flø Rasmussen
23fd80d0b2 Bugfix: add forgotten setIndex() call. 2015-08-12 13:38:10 +02:00
Atgeirr Flø Rasmussen
5216550cdf Suppress warnings. 2015-08-10 16:07:45 +02:00
Robert Kloefkorn
9c8460d471 TofDiscGalReorder and TofReader: remove warnings due to new boost version. 2015-08-07 12:02:59 +02:00
Atgeirr Flø Rasmussen
b80a202287 Define the UF_long type if necessary.
The UF_long type is deprecated in UMFPack, and actually seems
to be removed from the latest versions.
2015-08-06 09:54:05 +02:00
Robert Kloefkorn
d3962fb7cf SimulatorState: added copyright
BlackoilState: added copyright

Also, small docu fix.
2015-07-08 13:23:36 +02:00
Robert Kloefkorn
78c53fa1ed SimulatorState: store all data in a vector to allow for flexibility when used with
derived states.
BlackoilState: adjusted to SimulatorState changes.
2015-07-08 13:23:36 +02:00
Atgeirr Flø Rasmussen
131bbd5846 Fix unused argument warnings. 2015-07-08 12:37:11 +02:00
Andreas Lauser
85cfd8da2a use the multiplexer saturation function in SaturationPropsFromDeck
this makes it possible to switch to different saturation functions
again. So far the only supported function besides the default one is
the one which implements the "Stone 2" model.
2015-06-29 14:49:20 +02:00
Andreas Lauser
e3ab614c73 SaturationPropsFromDeck: make the jump to fluid states
this means the following changes:

- the "SatFuncGwseg" class is converted
- for now, Gwseg is the only saturation function supported by
  SaturationPropsFromDeck. (will be changed in later commits.)
- the funcForCell() method of SaturationPropsFromDeck is removed as it
  just occludes things
2015-06-29 14:49:20 +02:00
Andreas Lauser
2d5798f51a SaturationPropsFromDeck: remove the 'SatFuncSet' template parameter
in any reasonable simulator which reads an ECL deck the deck is going
to decide which saturation function is to be used and not the outside
code. also, the table this which function will be using is not really the
calling code's business. (for any reasonable deck it is always going to
be a non-uniform table so it makes a lot of sense to avoid unnecessary
complexity IMO.)

this patch temporarily removes the ability to use anything except the
ECL default saturation function ("Gwseg"). this ability will be
restored later in this patch series.
2015-06-29 14:49:20 +02:00
Andreas Lauser
5af89a0e55 add some fluid state classes
namely BlackoilStateToFluidState which takes a BlackoilState object
and exposes it as a opm-material like fluid state object. Similar for
ExplicitArraysFluidState, which takes raw arrays.

since fluid states are a local API, the index of the cell to be used
for these two classes must be set externally. The advantage of this
concept is that it is possible to make "saturation functions" which
not only depend on saturations but also on arbitrary other quanties
(like temperature or phase composition) without having to change the
API of the "saturation" functions.
2015-06-29 14:49:20 +02:00
Andreas Lauser
55786028fd remove obsolete and empty file SaturationPropsFromDeck.cpp 2015-06-26 13:01:22 +02:00
Atgeirr Flø Rasmussen
e8dc0a7148 Add missing include statement. 2015-06-22 13:04:14 +02:00
Edvin Brudevoll
b4e01187ff OPM-188: Fixup after review 2015-06-17 09:41:00 +02:00
Fredrik Gundersen
13f30e294a Added support for WPIMULT 2015-06-02 13:24:37 +02:00
Atgeirr Flø Rasmussen
a5da86a9ec Silence multiple warnings.
Also add more warnings to the disabling list of disable_warnings.h.
2015-05-28 14:05:09 +02:00
Markus Blatt
7f266458b5 Fix creation of initial value for computing the max (Fixes PR #805).
Bård spotet a bug after PR #805 was merged. Indead returning
-numeric_limits<type>::min() does not make sense for integral
values. This commit resorts to returning numeric_limits<type>::min().

Kudos to Bård for his attention.
2015-05-27 15:03:28 +02:00
Markus Blatt
a4e28119a3 Adds the possibility to compute a parallel inner product. 2015-05-27 11:07:15 +02:00
Markus Blatt
3fb7af1719 Do not use the masked value of the first container entry as initial value.
This behaviour does not work for computing a global inner product.
Therfore this commit introduces a new function to the functor that
returns an appropriate initial value.
2015-05-27 11:07:15 +02:00
Markus Blatt
fa279d6b16 Use correct type get the maximum value.
Previously we hardcoded float. Now we use the result_type of
the binary_function without any qualifiers. With any cv or reference
qualifiers std::numeric_limits uses a default implementation which
produces nonesense (e.g. numeric_limits<const int>::max() returns 0).
2015-05-27 11:07:15 +02:00
Markus Blatt
3aa869cfa0 Removes well debugging output. 2015-05-27 09:22:54 +02:00
Markus Blatt
63d8d5e781 [bugfix,parallel] Deactivate non-existing wells in manager.
Previously, we used the setStatus method to set wells that do not
exist on the local grid to SHUT. Or at least this is what I thought
that ```well.setStatus(timestep, SHUT)```. Unfortunately, my
assumption was wrong. This was revealed while testing a parallel run
with SPE9 that threw an expeption about "Elements must be added in
weakly increasing order" in Opm::DynamicState::add(int, T). Seems like
the method name is a bit misleading.

As it turns out the WellManager has its own complete list of active
wells (shut wells are simply left out). Therefore we can use this
behaviour to our advantage: With this commit we not only exclude shut
wells from the list, but also the ones that do not exist on the local
grid. We even get rid of an ugly const_cast.

Currently, I have running a parallel SPE9 test that has not yet
aborted.
2015-05-26 21:01:16 +02:00
Markus Blatt
ca3bcb2662 Use more accurate name for the size of the global components.
The new name is num_global_components, which actually is an upper bound
for the the number of global components (1 plus the maximum global index).
2015-05-19 19:58:05 +02:00
Markus Blatt
e2df1e981c Add spaces around binaries and explicit braces. 2015-05-19 19:56:37 +02:00
Markus Blatt
be7abe0706 Rename no_components to num_components. 2015-05-19 19:53:37 +02:00
Markus Blatt
202a0ab827 Update copyright information. 2015-05-19 16:20:57 +02:00
Markus Blatt
104c75d575 Allow to create the correct communication information if there are several unknowns.
In this case the parallel index set might represent N entries (this might be the number of
cells of grid). Nevertheless, there several (n) equations/unknowns attached to each index.
In this case we construct a larger index set representing N*n unknows, where each unknown
is attached to an index.

This change only affects parallel runs.
2015-05-19 16:18:14 +02:00
Atgeirr Flø Rasmussen
f24b9a1dc2 Merge pull request #800 from blattms/parallel-verbose-only-on-master
Allow to prevent printing to std::cout.
2015-05-13 14:42:37 +02:00
Markus Blatt
1a7ab6b81c Get rid of unclear continue; statement in favor of if-else 2015-05-12 15:30:20 +02:00
Markus Blatt
9514b8c89a Switched from default constructing to explicit construction with false. 2015-05-08 19:44:50 +02:00
Markus Blatt
2b4ebb94cc Adds possibility of having a well not stored on a grid partitioning.
In a parallel run each process only knows a part of the grid. Nevertheless
it does hold the complete well information. To resolve this the WellsManager
must be able to handle this case.

With this commit its constructor gets a flag indicating whether this is
a parallel run. If it is, then it does not throw if a well has cells that
are not present on the local part of the grid. Nevertheless it will check
that either all or none of the cells of a well are stored in the local part
of the grid.

Wells with no perforated cells on the local will still be present but set to SHUT.
2015-05-08 16:35:00 +02:00
Markus Blatt
802895acaf Allow to prevent SimulatorReport for printing to std::cout.
This commit adds a verbose flag to the constructor of
SimulatorReport to allow for deactivating any
output to std:cout. This is handy for parallel runs where we only
want to print statistics on one process.
2015-05-08 11:12:23 +02:00
Atgeirr Flø Rasmussen
928660ec0f New method SimulatorReport::reportFullyImplicit().
It does not make sense to report transport and pressure separately
for fully implicit solvers. It still makes sense to separate solver
from init and output though.
2015-04-21 10:48:02 +02:00
Markus Blatt
16d05fcc93 Correct documentation of why we use operator[] to initialize map.
This commit updates the source code comment about using operator[] to
initialize the unordered map. Thanks to Bard's persistence we found
out that the cause is not the construction of the key value of type
std::string from const char* but the mapped type being a (mutable)
char* (due to C?).

This completes the PR #784.
2015-04-14 09:36:47 +02:00
Markus Blatt
236718cff9 Deactivate PETSc's KSPCHEBYSHEV (not available in 3.2!) 2015-04-13 11:01:24 +02:00
Markus Blatt
b791d0743b Use operator[] to populize unordered_map with string as the key
g++-4.4 has problems converting const char* to char*
which it thinks is needed for constructing std::string.
Using operator[] circumvents this problem.

The compiler error fixed here was:
/usr/include/c++/4.4/bits/stl_pair.h: In constructor ‘std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = const char*, _U2 = const char*, _T1 = const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _T2 = char*]’:
/home/mblatt/src/dune/opm/opm-core/opm/core/linalg/LinearSolverPetsc.cpp:40:   instantiated from here
/usr/include/c++/4.4/bits/stl_pair.h:107: error: invalid conversion from ‘const char*’ to ‘char*’
make[2]: *** [CMakeFiles/opmcore.dir/opm/core/linalg/LinearSolverPetsc.cpp.o] Fehler 1
2015-04-13 10:58:31 +02:00
Atgeirr Flø Rasmussen
d0820dcb3f Suppress sign-comparison warnings. 2015-03-27 15:38:21 +01:00
Atgeirr Flø Rasmussen
aa7dcf91d3 Merge pull request #765 from andlaus/implement_temperature_dependent_density
Implement temperature dependent density
2015-03-26 15:10:13 +01:00
Atgeirr Flø Rasmussen
2d534f0536 Fix property method calls.
Cell argument can not be null for BlackoilPropertiesFromDeck class.
2015-03-23 16:19:40 +01:00
Andreas Lauser
53aa151e1c add a wrapper for thermal gas PVT objects 2015-03-17 12:40:14 +01:00
Andreas Lauser
44e218ffca add a wrapper for thermal oil PVT objects 2015-03-17 12:40:09 +01:00
Andreas Lauser
1b961652b8 add a wrapper for thermal water PVT objects 2015-03-17 12:40:07 +01:00
Robert Kloefkorn
a77f681999 iostream --> ostream. 2015-03-04 14:48:50 +01:00
Robert Kloefkorn
e75551127f SimulatorReport: add total number of newton and linear iterations to report struct. 2015-03-04 14:01:13 +01:00
Atgeirr Flø Rasmussen
8a1b35d4f6 Fix unneeded-internal-declaration warning.
Again related to anonymous namespace function only being used
in template functions.
2015-03-02 10:28:55 +01:00
Markus Blatt
7539a80ed2 Put spaces around operators. 2015-02-20 14:30:06 +01:00
Markus Blatt
c1d61705c9 Rely on auto instead of querying the explicit type
via e.g. typename UgGridHelpers::Face2VerticesTraits<Grid>::Type
2015-02-20 14:29:05 +01:00
Markus Blatt
5b8442d985 Ported initStateEquil to using the GridHelpers.
Currently the keyword EQUIL is not supported by the fully
implicit blackoil simulator when using CpGrid. This
commit is a first step towards this as it makes the
implementation of initStateEquil generic.
2015-02-20 09:39:50 +01:00
Markus Blatt
a458aa7688 Prevents unsigned-signed-comparison warnings for container with signed size.
Well, you never know. There are containers that use a signed integer
for storing its size. This results in a warning about comparing signed with
unsigned integers. This commit prevents this by explicitly casting the size
to std::size_t.
2015-02-19 09:13:39 +01:00