mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
New updateState
-- a new updateState is implemented based on dune vectors -- the old is kept for comparision in this PR -- the updateState is not identical. Tested on spe1, spe9 and norne and it improves the convergence compares to the old one.
This commit is contained in:
@@ -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 };
|
||||
|
||||
@@ -138,6 +145,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_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user