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...
instead, use Opm::EclipseState. This requires to pass the PhaseUsage
object to the EclipseWriter, as this one cannot be recovered from
EclipseState (yet?).
copying the EclipseGrid object is required as the final set of active
cells requires knowledge of the grid used by the simulator which is
not available in opm-parser. In turn, this requires to call
EclipseGrid::resetACTNUM() which is non-const.
instead, the wrapper classes now call ERT directly, so it's easy to
see what a given class does. interestingly the amount of additional
code required is neglectible (or even negative).
ERT has been a requirement for opm-parser for a while now and
opm-parser is a prerequisite of opm-core, so ERT is always
available. Thus remove the stub code to avoid bitrot...
In this pull requested we resorted to storing the data items (e.g. cart_dims, global_cell,
etc.) instead of the UnstructuredGrid. Unfortunately, this is a change of the lifetime
guarantees: Previously, a shared_ptr to the Unstructuredgrid was stored. Thus the data members
were available for the lifetime of the EclipseWriter. With the previous changes the grid could
actually have been destroyed before the writer.
Therefore we no store a shared_ptr to the UnstructuredGrid again (in addition to the datamembers).
Thus at least for UnstructuredGrid the old guarantees still hold.
Removed conflicts in
opm/core/wells/WellsManager.cpp
that were due to the change
```diff
- pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getDiameter());
+ pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getSkinFactor());
```
in WellsManager::createWellsFromSpecs which moved from WellsManager.cpp to WellsManager_impl.hpp file in a previous commit.
because as discussed with Atgeirr, this function should no longer
write the initial solution, it also does no longer need to know the
initial simulator state...
this patch gets rid of the old-parser-taking methods of
EclipseWriter. this avoids quite a few consistency issues and also
reduces the amount of duplicate work required.
maybe it is not a bug but a slightly spec. The problem is that GCC 4.4
does not implicitly convert std::shared_ptr<$FOO> to
std::shared_ptr<const $FOO> which caused the recent Jenkins build
errors at Statoil. Note that this problem only occurs with the output
writer in conjunction with the old Eclipse parser, so
OPM/opm-autodiff#105 also makes the problem disappear. The present
patch addresses the root cause, though...
At least for g++-4.4. shared_ptr does not have a constructor
taking an integer and therefore compilation fails. Therefore we
resort statements to construct empty pointers, like
```parser_(0)```
to using the empty constructor:
```parser_()```
This patch closes#533
This means that EclipseKeyword now never processes the data it
gets. Instead the data must be explicitly preprocessed by the calling
site using the new auxiliary functions "convertUnit()",
"extractFromStriped()", etc. This approach needs a few additional
temporary copies of the data, but given the facts that readability of
this code is much better using this approach, and that EclipseWriter
is neither a performance- nor a memory critical codepath, I don't care
too much about those temporary arrays...
- the output=true|false parameter gets respected now
- if output is "true", it is checked that the value of the
"output_dir" parameter is a directory (although I did not find an
easy way to check whether it is writable short of writing a file to
it.)
- the "output_interval" parameter gets respected as well
- the index of a written timestep is now independent of the time step
index of the simulation: the initial solution is always 0, the first
result written to disk is always 1 and so on... (i.e., it does not
matter anymore how many steps the simulator needed between two writes)
these changes have been proposed by @atgeirr. Thanks!