-- added more timing to get better coverage of amg solver

-- added includes needed
This commit is contained in:
hnil
2023-07-24 12:28:08 +02:00
parent 941e4230c1
commit c065d34d0e
18 changed files with 50 additions and 18 deletions

View File

@@ -72,12 +72,14 @@ public:
*/
void apply(const X& x, Y& y) const override
{
OPM_TIMEBLOCK(apply);
wellMod_.apply(x, y);
}
//! apply operator to x, scale and add: \f$ y = y + \alpha A(x) \f$
virtual void applyscaleadd(field_type alpha, const X& x, Y& y) const override
{
OPM_TIMEBLOCK(applyscaleadd);
wellMod_.applyScaleAdd(alpha, x, y);
}
@@ -92,10 +94,12 @@ public:
}
void addWellPressureEquations(PressureMatrix& jacobian, const X& weights,const bool use_well_weights) const override
{
OPM_TIMEBLOCK(addWellPressureEquations);
wellMod_.addWellPressureEquations(jacobian, weights, use_well_weights);
}
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const override
{
OPM_TIMEBLOCK(addWellPressureEquationsStruct);
wellMod_.addWellPressureEquationsStruct(jacobian);
}
int getNumberOfExtraEquations() const override
@@ -149,6 +153,7 @@ public:
virtual void apply( const X& x, Y& y ) const override
{
OPM_TIMEBLOCK(apply);
A_.mv( x, y );
// add well model modification to y
@@ -163,6 +168,7 @@ public:
// y += \alpha * A * x
virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const override
{
OPM_TIMEBLOCK(applyscaleadd);
A_.usmv(alpha,x,y);
// add scaled well model modification to y
@@ -178,10 +184,12 @@ public:
void addWellPressureEquations(PressureMatrix& jacobian, const X& weights,const bool use_well_weights) const
{
OPM_TIMEBLOCK(addWellPressureEquations);
wellOper_.addWellPressureEquations(jacobian, weights, use_well_weights);
}
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const
{
OPM_TIMEBLOCK(addWellPressureEquations);
wellOper_.addWellPressureEquationsStruct(jacobian);
}
int getNumberOfExtraEquations() const
@@ -235,6 +243,7 @@ public:
virtual void apply( const X& x, Y& y ) const override
{
OPM_TIMEBLOCK(apply);
for (auto row = A_.begin(); row.index() < interiorSize_; ++row)
{
y[row.index()]=0;
@@ -252,6 +261,7 @@ public:
// y += \alpha * A * x
virtual void applyscaleadd (field_type alpha, const X& x, Y& y) const override
{
OPM_TIMEBLOCK(applyscaleadd);
for (auto row = A_.begin(); row.index() < interiorSize_; ++row)
{
auto endc = (*row).end();
@@ -268,10 +278,12 @@ public:
void addWellPressureEquations(PressureMatrix& jacobian, const X& weights,const bool use_well_weights) const
{
OPM_TIMEBLOCK(addWellPressureEquations);
wellOper_.addWellPressureEquations(jacobian, weights, use_well_weights);
}
void addWellPressureEquationsStruct(PressureMatrix& jacobian) const
{
OPM_TIMEBLOCK(addWellPressureEquationsStruct);
wellOper_.addWellPressureEquationsStruct(jacobian);
}
int getNumberOfExtraEquations() const