Commit Graph

350 Commits

Author SHA1 Message Date
Joakim Hove
a5f00298e0 Protecting against use of unassigned deck values. 2015-01-14 11:41:41 +01:00
Andreas Lauser
e530ce03d8 PVT properties: allow them to be temperature dependent
Note that this patch does not introduce any real temperature
dependence but only changes the APIs for the viscosity and for the
density related methods. Note that I also don't like the fact that
this requires so many changes to so many files, but with the current
design of the property classes I cannot see a way to avoid this...
2014-12-01 20:06:31 +01:00
Atgeirr Flø Rasmussen
383bd4d91e Remove old legacy unit constants.
They should have been removed a long time ago, but were overlooked.
2014-09-22 13:28:17 +02:00
Atgeirr Flø Rasmussen
9afe054c25 Remove include guards from warning suppression headers.
They are intended to temporarily change compiler state, and may be
included multiple times in a single compilation unit.
2014-09-20 10:36:10 +02:00
Atgeirr Flø Rasmussen
a47e6775bd Honor SILENCE_EXTERNAL_WARNINGS in suppression headers. 2014-09-20 10:36:10 +02:00
Atgeirr Flø Rasmussen
763c9de6ef Add disabling and reenabling header files.
The files check for compiler versions to avoid using incompatible
pragmas. Only enabled for gcc >= 4.6 and clang.
2014-09-20 10:36:10 +02:00
Bård Skaflestad
1a3f7b230f Merge pull request #639 from atgeirr/threshold-pressure
Threshold pressure function
2014-08-29 09:13:27 +02:00
Bård Skaflestad
59205f2e65 Add missing 'not' in documentation. 2014-08-28 10:20:07 +02:00
Bård Skaflestad
7f875a6c34 Use correct name in name-space closing comment
Pointed out by [at] atgeirr.
2014-08-28 10:14:55 +02:00
Bård Skaflestad
f22bd0c208 Fix class reference in documentation
CompressedAccess<> was the former name of class template Compressed<>.
2014-08-27 22:55:15 +02:00
Bård Skaflestad
37dfc4a3b5 Add facility for accessing active subset of global data array
This commit introduces a fairly general mechanism for accessing the
active subset of a global grid (property) array.  Essentially, this
takes on the role of translating the active cell index through the
"global_cell" mapping when accessing, e.g., the net-to-gross data
value.

The primary component is class template

    Opm::GridPropertyAccess::Compressed<DataArray,Tag>

which implements a read-only

    value_type operator[](const int c)

that encapsulates and performs the compressed-to-global cell index
translation.  Template parameter "DataArray" is intended as a policy
parameter that for instance wraps access to a "GridProperty<T>" from
module opm-parser (with a fall-back default value if the data is not
specified on input).  The "Tag" parameter is a provision for type
safety--e.g., to prevent passing a region ID into a function that
requires a porosity value.
2014-08-27 21:19:41 +02:00
Atgeirr Flø Rasmussen
e1ea795cdc Fix minor typo in comment. 2014-08-27 18:13:15 +02:00
Atgeirr Flø Rasmussen
5604745642 New free function thresholdPressures(). 2014-08-27 18:07:46 +02:00
Andreas Lauser
cbb5910a93 incorperate the review comments/decisions for multi-region PVT
the largest change is that all classes below opm/core/props/pvt take
the PVT region index as an argument, the higher-level ones (i.e.,
BlackoilProps*) take cell indices.
2014-06-04 11:11:35 +02:00
Markus Blatt
ebc86bc624 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Manually resolved conflicts in:
	opm/core/io/eclipse/EclipseWriter.cpp
	opm/core/io/eclipse/EclipseWriter.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp
2014-04-08 21:50:00 +02:00
Atgeirr Flø Rasmussen
283dc96776 Added size() method to CellRange inner class. 2014-02-27 08:58:38 +01:00
Markus Blatt
c82ed437ce Added support for computePoreVolume for grids apart from UnstructuredGrid. 2014-02-25 15:12:16 +01:00
Atgeirr Flø Rasmussen
34595ae225 Move RegionMapping class to its own header, add test.
Class now resides in opm/core/utility/RegionMapping.hpp.
2014-02-24 15:19:04 +01:00
Markus Blatt
3aad1a6cc5 Merge remote-tracking branch 'origin/opm-parser-integrate' into refactor-for-cpgrid-support
Resolved Conflicts:
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/props/rock/RockFromDeck.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp
2014-02-19 15:22:18 +01:00
Markus Blatt
8da99e11c5 Refactored parts needed for Blackoil in autodiff to get rid of UG dependency.
This patch refactors (hopefully) all parts of opm-core that are needed
by the fully implicite black oil solver in opm-autodiff and that inherently
relied on UnstructuredGrid.

We added a new simple grid interface consisting out of free functions
that will allow us to use CpGrid without copying it to an UnstructuredGrid
by the means of the GridAdapter. Using this interface we have add methods that
allow specifying the grid information (global_cell, cartdims, etc.) wherever
possible to prevent introducing grid parameters for the type of the grid.
Unfortunately this was not possible everywhere.
2014-02-17 13:23:01 +01:00
Atgeirr Flø Rasmussen
a9bcbd64db Fix unused argument warning and wrong behaviour.
The class WarnAndContinueOnError should write warnings irrespective
of the status of the OPM_VERBOSE symbol.
2014-02-05 15:07:17 +01:00
Atgeirr Flø Rasmussen
9396d8b3ed Fix unused argument warnings. 2014-02-05 15:04:56 +01:00
Atgeirr Flø Rasmussen
48f3161a3c Portability fix: 'uint' is nonstandard. 2014-01-15 12:25:50 +01:00
Joakim Hove
a19881f5f4 Implemented well_controls based on well_controls_iset_xxx() functions. 2014-01-06 14:19:09 +01:00
Joakim Hove
0b37bdd1ec Temporarily added symbol HAVE_WELLCONTROLS before including well_controls.h - to get acces to the internal elements in struct WellControls. 2014-01-05 16:25:31 +01:00
Joakim Hove
e75552750a Extracted everything related to well controls to separate header well_controls.h - to simplify introducing new parser. 2014-01-03 16:04:12 +01:00
Andreas Lauser
34e26ae5bc Property system: some simplifications and bugfixes
this simplifies the template meta programming a bit. (Which does not
mean that it suddenly gets easy.) The main motivation for this work is
to make the splices feature work properly which allows eWoms to
properly select the spatial discretization at any point.

Further, the number of type tags a node can inherit from now is truely
unlimited thanks the the generic tuple reversal class provided by
https://sydius.me/2011/07/reverse-tuple-in-c/ . (before, the maximum
number of nodes from which a type tag could inherit was 11, so this
limitation did not really matter in practice.)
2013-12-11 17:26:24 +01:00
Bård Skaflestad
ee456f9851 Include <limits> for std::numeric_limits<> template 2013-12-03 15:52:07 +01:00
Bård Skaflestad
b92e120da0 Sort headers into logical groups.
This is an aesthetic-only change.
2013-12-03 15:43:06 +01:00
Bård Skaflestad
1b1f50ac45 Merge branch 'mrst' of github.com:totto82/opm-core into match-reference/properties 2013-12-03 15:17:16 +01:00
Tor Harald Sandve
dd20f9715f Compute initial saturations from surface volumes
Add new function is added that computes saturation from surface volumes
solving z = As for each cell. This function is used to compute an
intial guess to the saturations in initState_impl.hpp.
2013-11-28 15:56:17 +01:00
Roland Kaufmann
3b22d1b8f9 Remove superfluous backing class for share_obj
I originally wanted to make share_obj a class so that I could hide the
helper function, but it turned out that I needed a function after all
since a function template can be inferred from the parameters but the
type cannot from the constructor.

By returning a shared_ptr directly, the compiler can do return object
optimization.
2013-11-25 14:14:48 +01:00
Roland Kaufmann
b6c192fea5 Move shared object hack into more useful generic
The template function share_obj let you pass regular references
as shared pointers, which makes it easy (perhaps too easy) to quick-
fix old code which pass references and have stern warnings about the
lifetime rules of the objects in the documentation section instead.
2013-11-25 14:14:48 +01:00
Andreas Lauser
ff619105eb fixup! spline: avoid bogous "might be used uninitialized" compiler warning on GCC 2013-11-11 18:13:43 +01:00
Andreas Lauser
434a3a8dd5 spline: avoid bogous "might be used uninitialized" compiler warning on GCC 2013-11-10 17:55:41 +01:00
Andreas Lauser
ae901534c3 spline: fix the monotinic_() method and creation of monotonic splines
also, extend the unit test for it. (*phew* that was much more fun than
appreciated because of all the index shifts. I'm still not 100% sure
that everything works in all corner cases, but at least my confidence
is at 95%.)
2013-11-07 19:53:31 +01:00
Andreas Lauser
c9067c4bda spline: some fixes to make Spline::intersect() work correctly
most of these issues are fallout from the conversion of the spline
class from a moments (second derivative) based approach to hermite
base functions:

- the second and third derivatives where incorrect, and the third
  derivative was not available in the public interface.
- The unit test did not check the derivatives
- The coefficients for the monomial basis were off by the factors
  stemming from the derivatives
- The intersectIntervall_() method used std::max() instead of
  std::min() at one place and still added the base offset for the x
  values as indicated by Stoer
2013-11-07 15:06:59 +01:00
Bård Skaflestad
3fd6a41de5 Merge pull request #394 from andlaus/fix_spline_monotonic
Spline: fix a few issues with the monotonic() methods
2013-09-26 04:52:16 -07:00
Andreas Lauser
bbf5a9767a spline: actually return something in evalDerivative() in the extrapolate case
once more, thanks to @bska to catching this!
2013-09-26 13:32:20 +02:00
Andreas Lauser
fc6503d2e7 spline: use evalDerivative_() instead of evalDerivative() if the segment index is known
thanks to @bska for catching this!
2013-09-26 13:28:13 +02:00
Roland Kaufmann
afdb330d54 Provide stream that ignores everything written to it
Use this stream when you want a straight code path, but also be able
to disable output at will.
2013-09-26 12:37:02 +02:00
Andreas Lauser
d1bd0f24e4 Spline: fix a few issues with the monotonic() methods
This should fix the common case where the curve is non-constant within
an intervall. I'm not really sure whether it's correct in all corner
cases, though.

this fixes the eWoms test case for the blackoil model which failed in
debug mode due to some asserts incorrectly triggering...
2013-09-25 15:02:33 +02:00
Andreas Lauser
3ac996debe fix the averages wrt negative values and divisions by zero
it could be discussed whether it's better to throw a
std::runtime_error instead...
2013-09-25 11:04:23 +02:00
Atgeirr Flø Rasmussen
d5dd74aa9f Further improved WellReport and Watercut docs. 2013-09-24 14:39:41 +02:00
Atgeirr Flø Rasmussen
754ee7aa82 Documented WellReport and Watercut classes. 2013-09-24 14:14:54 +02:00
Andreas Lauser
a0c41819f7 include <tuple> in Spline.hpp
it seems like this is implicitly included by some other header, but
only in debug mode. *grr* thanks to @bska for catching this...
2013-09-23 15:21:39 +02:00
Andreas Lauser
c971e7c590 remove 'constexpr' from the property system
it is not really needed and unneccessarily breaks the build on gcc-4.4
2013-09-23 13:45:41 +02:00
Atgeirr Flø Rasmussen
d086ee5c63 Merge pull request #344 from andlaus/import_propertysystem
Import propertysystem
2013-09-23 04:18:02 -07:00
Andreas Lauser
71e6638f04 className(): minor comment and guard macro name fixes 2013-09-20 12:45:10 +02:00
Andreas Lauser
1b3217ec4b className(): get rid of the ugly ClassNameHelper_ class
since full specialization of function templates is okay in C++ (only
partial specialization is not allowed for them).
2013-09-20 12:36:40 +02:00