fix some serious screw-ups

almost all of them were caused by recent changes in the master
branch:

- there were methods added which depend on the types `V` and
`DataBlock`. these do not make much sense in the context of the
frankenstein simulator. Also, these types are defined globally for the
whole Opm namespace in `BlackoilModelBase_impl.hpp` (which should be
prosecuted as a fellony IMO)! Besides this, their names are useless;
'V' is the letter which comes after `U` in the alphabet and when it
comes to computers basically everything can be seen as a chunk of data
(i.e., a `DataBlock`).
- it seems like the new and shiny dense-AD based well model was never
compiled with assertations enabled, at least some asserts referenced
non-existing variables.
- the recent output-related API changes were pretty unfortunate
because they had the effect of tying the (sub-optimal, IMO) internal
structure of the model even closer to the output code: as far as I can
see, `rq` does only make sense if the model works *exactly* like
BlackoilModelBase and friends. (for flow_ebos, this could be
replicated, but first it would be another unnecessary conversion step
and second, most of the quantities in `rq` are of type `ADB` and much
of the "frankenstein" excercise is devoted to getting rid of these.) I
thus reverted back to an old version of the output code and created a
`frankenstein` branch in my personal `opm-output` github fork.
This commit is contained in:
Andreas Lauser
2016-09-12 23:28:44 +02:00
parent 62de30d9b2
commit 4ecd6ca64a
18 changed files with 998 additions and 73 deletions

View File

@@ -47,7 +47,7 @@
#include <opm/autodiff/WellDensitySegmented.hpp>
#include <opm/autodiff/BlackoilDetails.hpp>
#include <opm/autodiff/BlackoilModelParameters.hpp>
#include <opm/autodiff/LinearisedBlackoilResidual.hpp>
#include<dune/common/fmatrix.hh>
#include<dune/istl/bcrsmatrix.hh>
@@ -305,7 +305,7 @@ namespace Opm {
}
void addRhs(BVector& x, Mat& jac) const {
assert(x.size() == rhs.size());
assert(x.size() == rhs_.size());
x += rhs_;
// jac = A + duneA
jac = matAdd( jac, duneA_ );
@@ -955,7 +955,6 @@ namespace Opm {
dx_new_eigen(idx) = dx_new[w][flowPhaseToEbosCompIdx(p)];
}
}
assert(dx.size() == total_residual_v.size());
updateWellState(dx_new_eigen.array(), well_state);
updateWellControls(well_state);
setWellVariables(well_state);
@@ -1995,7 +1994,6 @@ namespace Opm {
}
EvalWell wellVolumeFraction(const int wellIdx, const int phaseIdx) const {
assert(fluid_.numPhases() == 3);
const int nw = wells().number_of_wells;
if (phaseIdx == Water) {
return wellVariables_[nw + wellIdx];