Commit Graph

369 Commits

Author SHA1 Message Date
Bård Skaflestad
c010d4c3e2 RegionMapping<>: Support arbitrary region IDs
This commit introduces a new public method, activeRegions(), that
retrieves those region IDs that contain at least one active cell.
We furthermore extend the cells() method to support lookup of
arbitrary region IDs.  Non-active region IDs produce empty cell
ranges.

Intended use case is

    for (const auto& reg : rmap.activeRegions()) {
        const auto& c = rmap.cells(reg);

        // use c
    }
2015-09-15 15:33:22 +02:00
Atgeirr Flø Rasmussen
5bd95582d2 Remove unnecessary include. 2015-09-15 14:53:46 +02:00
Atgeirr Flø Rasmussen
1ca5300f6e Move implementation to .cpp file. 2015-09-15 14:45:07 +02:00
Atgeirr Flø Rasmussen
f2c6344d04 Moved compressedToCartesian() to its own file. 2015-09-15 14:13:58 +02:00
Markus Blatt
7db80ba2c6 Fix complaint about initial declaration in foor loop.
gcc-4.7.2 (Debian 4.7.2-5) complained about:
"‘for’ loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code"
when seeing a loop like
for(int i=0; i<end; ++i)

This is fixed by moving the declaration before the for loop with
this commit. Altenatively, we could use the above option.
2015-09-03 14:03:25 +02:00
Joakim Hove
f8fb0ab7ab Using map base ThresholdPressure implementation. 2015-08-25 16:22:37 +02:00
Fredrik Gundersen
352a5d826b Updated as needed by new opm-parser functinality 2015-08-24 15:37:49 +02:00
Fredrik Gundersen
09aa2b7bf7 Added suport for new Threshold Pressure behavior 2015-08-20 13:00:01 +02:00
Joakim Hove
20968d9c0a Added small utility memcmp_double() 2015-08-12 14:31:07 +02:00
Atgeirr Flø Rasmussen
2e4a8da02c Remove warning-suppression utility headers.
They have been moved upstream to opm-parser.
2015-08-10 10:52:52 +02:00
Kai Bao
64fe376ac5 Adding two more warnings to disable_warnings.h.
-Wpragmas and -Wunused-but-set-variable
2015-06-17 10:57:45 +02:00
Atgeirr Flø Rasmussen
a645c82a00 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
52b40c9477 Allow to prevent ParameterGroup from printing to std::cout.
This commit adds a verbose flag to the constructor of
ParameterGroup 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:13:30 +02:00
Andreas Lauser
f66a43288f remove some unused classes
This is mostly infrastructural code (Opm::Spline,
Opm::TriDiagonalMatrix, property system and the cubic polynomial
inversion code) that is only used by opm-material and eWoms. The
original intention of bringing this code into opm-core was to allow
other modules to start to use this easily. Since nothing in this
direction happened during the last one and a half years, the code only
represents baggage in the opm-core context and should thus be moved to
their consumer modules to make the life of everyone involved simpler.
2015-04-28 12:46:59 +02:00
Atgeirr Flø Rasmussen
f902b7e265 Modified behaviour for unhandled arguments.
Use constructor argument verify_syntax to decide course of action: if false,
store unhandled arguments, if true, write a message and throw.
2015-04-14 15:29:55 +02:00
Atgeirr Flø Rasmussen
dfe6e730eb Return const reference from unhandledArguments(). 2015-04-14 13:55:29 +02:00
Atgeirr Flø Rasmussen
1fb2bc651c Store unhandled command-line arguments.
A new method ParameterGroup::unhandledArguments() is available to
access the list of unhandled arguments. Before, when such arguments
were encountered they were ignored and a warning was printed to
standard out.

Apart from the lack of a (potentially misleading) warning, this
should not change the behaviour of existing clients of the class.
2015-04-14 13:39:43 +02:00
chflo
c7cbb4ea12 opm-166: Changes after review 2015-02-16 11:59:16 +01:00
chflo
0e2f786480 OPM-166: Use SimulationConfig instead of Deck to get threshold pressure 2015-02-16 08:43:47 +01:00
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