Commit Graph

4618 Commits

Author SHA1 Message Date
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
58f55f3c90 Reimplement assign* in terms of Compressed<>
This is a demonstration of using the

    GridPropertyAccess::Compressed<>

class template.  We save (some) memory by not creating the zero
fall-back vector in assignPermeability(), preferring instead to use
the fall-back/default mechanism of ArrayPolicy::ExtractFromDeck<>.

While here, adjust vector<PermComponent>::reserve() capacity to
reflect actual requirements.
2014-08-27 21:19:41 +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
Bård Skaflestad
7f07964e0c assignPermeability: Remark on storage order
Clients expect column-major (Fortran) ordering of the contiguous
"permeability_" array so that's what we create despite "tensor"
being row-major.

Suggested by: [at] atgeirr
2014-08-27 21:19:40 +02:00
Bård Skaflestad
008702817d Merge pull request #637 from atgeirr/add-minpv
Add MINPV processing to GridManager
2014-08-27 19:34:34 +02:00
Atgeirr Flø Rasmussen
8896ef0e5e Merge pull request #635 from bska/fix-perm-assignment
Fix permeability assignment
2014-08-27 16:07:26 +02:00
Atgeirr Flø Rasmussen
5e940faa8b Use syntax for std::array which works with GCC 4.4. 2014-08-27 16:00:57 +02:00
Atgeirr Flø Rasmussen
ce4168df27 Refactor set/getCellCorn() with private method.
Also const-ify everything that can be const.
2014-08-27 13:17:28 +02:00
Atgeirr Flø Rasmussen
0f02dba2d4 Correct doc error (zcorn is also output argument). 2014-08-27 11:15:00 +02:00
Atgeirr Flø Rasmussen
7ca1922c77 Remove unneeded const_cast. 2014-08-27 11:13:37 +02:00
Bård Skaflestad
bcec9fd0f6 Simplify diagonal component thresholding
This commit switches the assignment

    diagonal = max(diagonal, minval)

to using a reference in the "diagonal" expression.  This guarantees
that the indexing is done once which eases maintainability.  While
here, replace the hard-coded dimension stride ('3') with the current
run-time dimension.  This is mostly for symmetry because the overall
code is only really supported in three space dimension.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
2ae64c1df2 Remove obsolete comment
This comment was needed when the code was first developed, but
subsequent development has rendered it obsolete.  Remove it to avoid
confusion.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
194b6eda7a Fix semantics of permeability assignment
Calling code relies on permeability tensors being stored in column
major order (row index cycling the most rapidly).  Honour that
requirement.  The previous assignment implied row major ordering
(column index cycling the most rapidly).  This, however, is a
pedantic rather than visible change because the surrounding code
enforces symmetric tensors whence both orderings produce the same
results when the array is viewed contiguously.
2014-08-26 23:50:04 +02:00
Atgeirr Flø Rasmussen
fd57d547a7 Merge pull request #631 from andlaus/add_-fext-numeric-literals
FindQuadmath: add -fext-numeric-literals if the compiler supports it
2014-08-26 22:36:03 +02:00
Atgeirr Flø Rasmussen
6297fb7991 Merge pull request #630 from totto82/fix_init_spe9
The water/gas press. are calculated only if woc/goc is within the reservoar
2014-08-26 22:27:11 +02:00
Atgeirr Flø Rasmussen
4efadca6cb Merge pull request #632 from bska/cpchop-precision
Increase precision from CornerpointChopper::writeGrdecl
2014-08-26 22:24:30 +02:00
Atgeirr Flø Rasmussen
4279170284 Change loop order. 2014-08-26 22:10:31 +02:00
Atgeirr Flø Rasmussen
37604618ec Documented MinpvProcessor. 2014-08-25 15:39:33 +02:00
Atgeirr Flø Rasmussen
4ad160d2de Add new constructor, that can handle MINPV processing. 2014-08-25 15:20:41 +02:00
Atgeirr Flø Rasmussen
f74a0bb3e6 New class MinpvProcessor, and test. 2014-08-25 15:20:01 +02:00
Bård Skaflestad
492b64faac CornerpointChopper::writeGrdecl(): Increase vector precision
This commit increases the precision of the (floating-point) vector
output (e.g., permeabilities) from method writeGrdecl().  This
reduces the impact of rounding errors when the sub-set sample is
output to disk for subsequent processing (e.g., property upscaling).
2014-08-25 14:01:03 +02:00
Bård Skaflestad
71596fe8a3 CornerpointChopper::writeGrdecl(): Write fewer items per line
This is in preparation of increasing the vector output precision to
reduce the impact of rounding errors in subsequent upscaling.  The
change impacts floating-point vectors only.

Background: The ECL simulator stipulates an upper bound on the
number of characters in a record (i.e., one line) and while we don't
have such limits, there's no reason to emit lines that can't be
input by other tools.
2014-08-25 14:01:03 +02:00
Bård Skaflestad
d3d38d2d6f Merge pull request #634 from osae/satFunc-eclState
Provide eclipse state to saturation property init.
2014-08-25 13:55:44 +02:00
Bård Skaflestad
c6c66c58c6 Merge pull request #633 from atgeirr/use-pinch
Unify grid construction, allow PINCH
2014-08-22 20:36:01 +02:00
Atgeirr Flø Rasmussen
393e7af8b2 Use new constructor for EclipseGrid. 2014-08-22 19:54:26 +02:00
osae
96823e04a3 Provide eclipse state to saturation property init. 2014-08-22 15:36:07 +02:00
Atgeirr Flø Rasmussen
cfd07600bc Create pointer-to-const objects.
Older gcc (4.4) does not allow conversion of shared_ptr<Foo> to
shared_ptr<const Foo>. Pointed out by @bska.
2014-08-21 15:24:39 +02:00
Atgeirr Flø Rasmussen
5690d20705 Add PINCH support to grid construction. 2014-08-21 14:32:13 +02:00
Atgeirr Flø Rasmussen
f72f823aab Make all construction from deck use EclipseGrid.
The deck constructor is still present, but it will construct an
EclipseGrid object instead of doing its own equivalent processing.
2014-08-21 14:21:21 +02:00
Atgeirr Flø Rasmussen
557fa6167c Remove unnecessary grid from fluid test. 2014-08-21 14:18:41 +02:00
Andreas Lauser
38e0800047 FindQuadmath: add -fext-numeric-literals if the compiler supports it
this is required for GCC >= 4.8 to support the 'Q' suffix for floating
point literals (which are used in the quadmath.h header)

In order to prevent compilers which eat the flag but do not support it
from complaining constantly, it is tested for with "-Werror" enabled...
2014-08-18 12:16:04 +02:00
Tor Harald Sandve
b331c68fbc Fixes issues pointed out in the PR comments 2014-08-18 08:57:23 +02:00
Tor Harald Sandve
12b245df3d The water/gas pressures are only calculated if woc and goc lies within
the reservoar
The water/gas pressure is set to -inf when woc and goc is above or below
the reservoar.
2014-08-15 08:56:35 +02:00
Atgeirr Flø Rasmussen
a6c173abad Merge pull request #625 from andlaus/fix_wells_in_summary_output
EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
2014-08-14 14:02:54 +02:00
Andreas Lauser
6e1bf4b3ab EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
The summary files now always features all wells which ever appear in
the deck in every timestep (even if they are not specified for the
time step). This _should_ fix the crashes when writing Eclipse output
in the Norne deck, but I have no idea if the resulting summary file is
correct. More testing would be thus highly appreciated...
2014-08-14 13:35:44 +02:00
Atgeirr Flø Rasmussen
7e48a7550e Merge pull request #626 from andlaus/better_regex_test
make the regex test more thorough
2014-08-12 12:22:02 +02:00
Atgeirr Flø Rasmussen
95879f2556 Merge pull request #629 from totto82/bug_fix110814
Bug fix #627
2014-08-12 09:43:19 +02:00
Tor Harald Sandve
c323345d3b Changes in the ref. solution in the DeakAllDead test 2014-08-12 07:08:57 +02:00
Atgeirr Flø Rasmussen
1d4e672c61 Merge pull request #628 from totto82/constCapPressInit2
Initialization for constant capillary pressure functions
2014-08-11 13:49:37 +02:00
Atgeirr Flø Rasmussen
3f002ab6d8 Merge pull request #627 from osae/update-equil-test
Correcting the equil test.
2014-08-11 13:43:51 +02:00
osae
9b30660d1e Correcting the equil test. 2014-08-11 13:19:17 +02:00
Tor Harald Sandve
28d7380d40 BUGFIX
Wrong placement of parentes
2014-08-11 12:45:52 +02:00
Tor Harald Sandve
5051658a07 Implements initialization for constant capillary pressure functions 2014-08-11 11:23:15 +02:00
Tor Harald Sandve
4f862e759e Computes saturations based on depths
For constant capillar pressure function the saturation is
    determined by cell depths:

    Sg_max, Sw_min
    ----- goc ----
    Sg_min, Sw_min
    ----- woc ----
    Sg_min, Sw_max
2014-08-11 11:22:47 +02:00
Andreas Lauser
29bed1cfb4 make the regex test more thorough
it seems like the std::regex delivered up to gcc 4.8 has problems with
constructs such as ".+". (at least if they appear at the end of a
regex...)
2014-08-08 16:13:30 +02:00
Atgeirr Flø Rasmussen
a455f23799 Merge pull request #623 from robertk-iris/dune-3.0-compat
Make code compile with dune trunk version (ie 3.0-git). This should incl...
2014-08-08 10:14:13 +02:00
Atgeirr Flø Rasmussen
9470ab7997 Merge pull request #620 from bska/satfunc-minor-issues
Correct a number of minor issues in capillary pressure scaling code
2014-08-08 10:11:38 +02:00
Bård Skaflestad
6b36dab2ee swatInitScaling(): Abide by OPM coding conventions
This commit attaches the reference-signifying ampersand to the type
as is preferred in the OPM code base.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00