make all non-implementation headers includable without
preconditions. Also, this removes the GravityColumnSolver.hpp file,
because it tried to include a non-existing file and it was thus unused.
for some of these files this is needed to make to keep it compiling
after the next patch because the new ErrorMacros.hpp file will no
longer implicitly includes <iostream>. for the remaining files it is
just good style.
While at it, the includes for most of these files have been ordered in
order of decreasing abstraction level.
The state that is passed to the simulator object is directly
accessible without any encapsulation towards the client. After
the notification callback was introduced, this allows the client
to observe the state in the middle of a simulation.
However, it may be that the simulator has some internal state
which is not reflected in the state object because there is a
cost associated by flushing it into the TwophaseState format.
The notification is called back on every timestep, not just the
ones that will do reporting. It may even be that reporting is
done dynamically and is not known at the time of setup. (It is
more like a condition variable).
Consequently, flushing the state in every timestep is a bad
idea. This patch sets up a new method sync() which it is expected
that the notification will call if it needs the state for
reporting purposes.
Currently it is a no-op. It just establishes a protocol that
other, compatible implementations can also use.
our policy is that we only use boost if necessary, i.e., if the oldest
supported compiler does not support a given feature but boost
does. since we recently switched to GCC 4.4 or newer, std::shared_ptr
is available unconditionally.
that one was due to the fact that the constructor arguments were no
longer used to initialize (unused) private member variables. These
warnings did not appear in CLang for some reason. Again, thanks to
Bård Skaflestad for the review.
most of them quite insignificant, but still annoying. The only
exception is the warning about the changed alignment for the 'work'
argument of spu_implicit_assemble(). AFAICT, the only reason why it
worked was that the pointer produced by malloc() was passed
directly. (malloc() seems to fulfill all alignment criteria.) To fix
this, I've changed that argument's type from char* to double*.
Template functions must be defined in the header since the library
cannot contain generic code. To keep only the interface in the main
header, all such function bodies are put in a separate _impl file.
Since a definition of the class is not in the header, no other
compilation units can safely access the internals of the Impl class
anyway, so it may as well be a regular struct so that the outer class
(SimulatorIncompTwophase) can access it.
Deleted some unused code (or moved to opm-porsol), moved all code dealing with
time-of-flight to opm/core/tof, moved code for implicit transport solver to
opm/core/transport/implicit, spu_[im|ex]plicit.[ch] to opm/core/transport/minimal.
Order of arguments for computePhaseFlowRatesPerWell() was wrong.
This fix was done previously for SimulatorCompressibleTwophase,
but the incompressible sim was ignored.
Also added an ASSERT that may help catch some misuse.
This is to improve consistency with other solvers, and relates
to the expression that is converted into a finite difference when
discretising:
(phi s) - (phi s)^0 = phi^0(s - s^0) + (phi - phi^0)s
^^^^^
The above marks the spot where we now use phi^0 instead of phi.
Also:
- solveGravity() interface changed to take surface volume as a parameter,
- gravity vector is now given in initGravity() instead of
solveGravity(), for consistency with the incompressible solver.
- Changed Wells constructor arg for SimulatorIncompTwophase to WellsManager.
- Insert checking code for well constrains (mostly copied from spu_2p.cpp).
Unrelated to the above changes.
- Added pressure normalization for incompressible case (from spu_2p.cpp)