I have doubts if this will change anything in the binaries (and in my
personal opinion, these 'const's look quite ugly and are sometimes a
(small) annoyance when debugging), but I don't mind using the coding
style used by most of the rest of opm-core here.
we're correcting the pressure at the cell center depths to get the
pressure at the face depth, not the other way around. This is
confusing...
thanks to [at]totto82 for discovering this.
This needs to be done if a equilibration region transition is
mentioned by the THPRES keyword, but no value is given for this record
in the third item. (it seems that this is used quite frequently.)
Also, the approach taken by this patch also does not collide with the
restart machinery as far as I can see. This is because the initial
condition is applied by the simulator before the state at the restart
time is loaded. (I interpreted the code that way, but I could be
wrong, could anyone verify this?)
since it is pretty elaborate to calculate initial condition, this
patch is pretty messy. I also do not know if Eclipse does include
capillary pressure in this calculation or not (this patch does). Huge
kudos go to [at]totto82 for reviewing, testing and debugging this.
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
}
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.
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.
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.
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.
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...
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.
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.