Do not store copy of weights inside BlackoilAmgCpr class.

This commit is contained in:
Atgeirr Flø Rasmussen authored and Markus Blatt committed 2019-04-10 14:40:46 +02:00
1 parent 416cc93f96
commit 2cf990e404
2 files changed
+3 -5

No files matched your search

+2 -4
View File
@@ -136,12 +136,10 @@ namespace Opm
{
}
void updatePreconditioner(const typename TwoLevelMethod::FineDomainType& weights,
const Operator& fineOperator,
void updatePreconditioner(const Operator& fineOperator,
const SmootherArgs& smargs,
const Communication& comm)
{
weights_ = weights;
*scaledMatrix_ = *Detail::scaleMatrixDRS(fineOperator, COMPONENT_INDEX, weights_, param_);
smoother_.reset(Detail::constructSmoother<Smoother>(*scaledMatrixOperator_, smargs, comm));
twoLevelMethod_.updatePreconditioner(*scaledMatrixOperator_,
@@ -170,7 +168,7 @@ namespace Opm
private:
const CPRParameter& param_;
typename TwoLevelMethod::FineDomainType weights_; //make copy
const typename TwoLevelMethod::FineDomainType& weights_;
std::unique_ptr<Matrix> scaledMatrix_;
std::unique_ptr<Operator> scaledMatrixOperator_;
std::shared_ptr<Smoother> smoother_;
+1 -1
View File
@@ -268,7 +268,7 @@ namespace Opm
if(this->parameters_.cpr_solver_verbose_){
std::cout << " Only update amg solver " << std::endl;
}
amg_->updatePreconditioner(this->weights_,opARef, smootherArgs, comm);
amg_->updatePreconditioner(opARef, smootherArgs, comm);
}
// Solve.
//SuperClass::solve(linearOperator, x, istlb, *sp, *amg, result);