mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
simplify: applyScaleAdd can be shared between regular and domain operators
This commit is contained in:
parent
4a797a7017
commit
e5f8ea3e13
@ -194,24 +194,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void applyscaleadd(field_type alpha, const X& x, Y& y) const override
|
||||
{
|
||||
OPM_TIMEBLOCK(applyscaleadd);
|
||||
if (this->wellMod_.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->scaleAddRes_.size() != y.size()) {
|
||||
this->scaleAddRes_.resize(y.size());
|
||||
}
|
||||
|
||||
this->scaleAddRes_ = 0.0;
|
||||
// scaleAddRes_ = - C D^-1 B x
|
||||
this->apply(x, this->scaleAddRes_);
|
||||
// Ax = Ax + alpha * scaleAddRes_
|
||||
y.axpy(alpha, this->scaleAddRes_);
|
||||
}
|
||||
|
||||
void addWellPressureEquations(PressureMatrix& jacobian,
|
||||
const X& weights,
|
||||
const bool use_well_weights) const override
|
||||
|
Loading…
Reference in New Issue
Block a user