mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
change assert with throw for isfinite primary variable
This commit is contained in:
parent
c599402318
commit
fdf6ce9c54
@ -359,7 +359,8 @@ namespace Opm
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
void updatePrimaryVariablesNewton(const BVectorWell& dwells,
|
||||
const WellState& well_state) const;
|
||||
const WellState& well_state,
|
||||
DeferredLogger& deferred_logger) const;
|
||||
|
||||
// update extra primary vriables if there are any
|
||||
void updateExtraPrimaryVariables(const BVectorWell& dwells) const;
|
||||
|
@ -854,7 +854,7 @@ namespace Opm
|
||||
{
|
||||
if (!this->isOperableAndSolvable() && !this->wellIsStopped()) return;
|
||||
|
||||
updatePrimaryVariablesNewton(dwells, well_state);
|
||||
updatePrimaryVariablesNewton(dwells, well_state, deferred_logger);
|
||||
|
||||
updateWellStateFromPrimaryVariables(well_state, deferred_logger);
|
||||
Base::calculateReservoirRates(well_state.well(this->index_of_well_));
|
||||
@ -868,7 +868,8 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
updatePrimaryVariablesNewton(const BVectorWell& dwells,
|
||||
const WellState& /* well_state */) const
|
||||
const WellState& /* well_state */,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
const double dFLimit = this->param_.dwell_fraction_max_;
|
||||
const double dBHPLimit = this->param_.dbhp_max_rel_;
|
||||
@ -876,11 +877,10 @@ namespace Opm
|
||||
|
||||
updateExtraPrimaryVariables(dwells);
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (double v : this->primary_variables_) {
|
||||
assert(isfinite(v));
|
||||
if(!isfinite(v))
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "Infinite primary variable after newton update well: " << this->name(), deferred_logger);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -1918,11 +1918,10 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
for (double v : this->primary_variables_) {
|
||||
assert(isfinite(v));
|
||||
if(!isfinite(v))
|
||||
OPM_DEFLOG_THROW(NumericalIssue, "Infinite primary variable after update from wellState well: " << this->name(), deferred_logger);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user