Merge remote-tracking branch 'remotes/totto82/frankenstein_mod' into frankenstein_merge_master

* remotes/totto82/frankenstein_mod:
  Fix seg-fault for cases without wells
  Some micro performance improvments and cleaning
  Add THP support in the denseAD well model
  Only solve the linear system when it is not converged.
  Revert changes to NewtonIterationBlackoilInterleaved.cpp
  add and use class wellModelMatrixAdapter
  Remove unused code and remove Eigen vectors
  New updateState
  Some cleaning and small changes
This commit is contained in:
Andreas Lauser
2016-09-14 15:03:17 +02:00
13 changed files with 878 additions and 1914 deletions

View File

@@ -24,6 +24,9 @@
#include <opm/autodiff/AutoDiffBlock.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/simulator/SimulatorTimerInterface.hpp>
#include <opm/autodiff/DuneMatrix.hpp>
#include <dune/common/fmatrix.hh>
#include <dune/istl/bcrsmatrix.hh>
#include <memory>
namespace Opm {
@@ -40,6 +43,10 @@ namespace Opm {
typedef ADB::V V;
typedef ADB::M M;
typedef double Scalar;
typedef Dune::FieldVector<Scalar, 3 > VectorBlockType;
typedef Dune::BlockVector<VectorBlockType> BVector;
// Available relaxation scheme types.
enum RelaxType { DAMPEN, SOR };
@@ -150,6 +157,8 @@ namespace Opm {
/// Apply a stabilization to dx, depending on dxOld and relaxation parameters.
void stabilizeNonlinearUpdate(V& dx, V& dxOld, const double omega) const;
void stabilizeNonlinearUpdate(BVector& dx, BVector& dxOld, const double omega) const;
/// The greatest relaxation factor (i.e. smallest factor) allowed.
double relaxMax() const { return param_.relax_max_; }