simplify: applyScaleAdd can be shared between regular and domain operators

This commit is contained in:
Arne Morten Kvarving 2024-12-20 11:05:41 +01:00
parent 4a797a7017
commit e5f8ea3e13

View File

@ -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