In a constructor initialisation list, the order should be the same
as the order in which the variables actually are initialised, which
is given by the order they are declared in the class and not by the
order in the initialisation list.
The only stage where parallelism changes the adaptive time
stepping is when some inner products on the saturation and
pressure are computed.
This commit makes this part parallel by added an additonal boost::any
parameter to the time stepping and the controller. Per default this
is empty. In a parallel run it contains a ParallelIstlInformation object
encapsulating the information about the parallelisation. This then used
to compute the parallel inner product.
-max time step parameter
PIDTimeStepControl --> TimeStepControl:
- added simple iteration count time step control
- bug fix in PIDAndIterationCountTimeStepControl
AdaptiveTimeStepping: apply the above changes.
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...
because the name "currentTime()" can be mistaken for the point in
real-life time at which the simulation is run (e.g. March 11, 2014,
15:07:45.123), the _point_ in time which the simulator timer currently
represents (e.g. Jun 5, 1985, 02:33:12.345) instead of the simulator
time in seconds which elapsed since the START date
(e.g. 52633.345 s).
this rename may lead to some fallout in other modules. I'll
fix them after this PR has been merged...
because the name "currentTime()" can be mistaken for the point in
real-life time at which the simulation is run (e.g. March 11, 2014,
15:07:45.123), the _point_ in time which the simulator timer currently
represents (e.g. Jun 5, 1985, 02:33:12.345) instead of the simulator
time in seconds which elapsed since the START date
(e.g. 52633.345 s).
this rename may lead to some fallout in other modules. I'll
fix them after this PR has been merged...
Since SimulatorTimer is a fairly shallow shim if using the TimeMap, it
can also be removed relatively easily. Having said this, that would
trigger _many_ changes in _a lot_ of places and I'm not motivated at
all to fight that battle as long as the old parser needs to be
supported. I thus decided that the best way is to add a "wrapper mode"
to SimulationTimer...
The step number is zero before the first timestep has been taken, and
one after. The step number is one before the second timestep has been
taken, and two after. This was not clear from the text.
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)