mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Reset the total penalty card after each nonlinear iteration
This commit is contained in:
@@ -392,6 +392,7 @@ namespace Opm {
|
||||
// For each iteration we store in a vector the norms of the residual of
|
||||
// the mass balance for each active phase, the well flux and the well equations.
|
||||
residual_norms_history_.clear();
|
||||
total_penaltyCard_.reset();
|
||||
current_relaxation_ = 1.0;
|
||||
dx_old_ = 0.0;
|
||||
convergence_reports_.push_back({timer.reportStepNum(), timer.currentStepNum(), {}});
|
||||
|
||||
@@ -62,6 +62,13 @@ namespace Opm
|
||||
return nonConverged + distanceDecay + largeWellResiduals;
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
nonConverged = 0;
|
||||
distanceDecay = 0;
|
||||
largeWellResiduals = 0;
|
||||
}
|
||||
|
||||
PenaltyCard& operator+=(const PenaltyCard& other) {
|
||||
nonConverged += other.nonConverged;
|
||||
distanceDecay += other.distanceDecay;
|
||||
|
||||
Reference in New Issue
Block a user