mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-12 08:54:53 -05:00
Do not store copy of weights inside BlackoilAmgCpr class.
This commit is contained in:
1 parent
416cc93f96
commit
2cf990e404
2 files changed
+3
-5
No files matched your search
@@ -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_;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user