From f07874cf42e7f620de64325b129524c77629449b Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 2 Mar 2018 20:39:59 +0100 Subject: [PATCH] Cleanup code. Removed unused boolean switch in WellModelMatrixAdapter and removed commented code. --- opm/autodiff/BlackoilModelEbos.hpp | 8 ++------ opm/autodiff/StandardWell_impl.hpp | 5 ----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index 435b2add3..70b307629 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -490,12 +490,12 @@ namespace Opm { // set initial guess x = 0.0; + const Mat& actual_mat_for_prec = matrix_for_preconditioner_ ? *matrix_for_preconditioner_.get() : ebosJac; // Solve system. if( isParallel() ) { typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel, true > Operator; Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(), - param_.matrix_add_well_contributions_, istlSolver().parallelInformation() ); assert( opA.comm() ); istlSolver().solve( opA, x, ebosResid, *(opA.comm()) ); @@ -504,7 +504,6 @@ namespace Opm { { typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel, false > Operator; Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(), - param_.matrix_add_well_contributions_ ); istlSolver().solve( opA, x, ebosResid ); } } @@ -554,10 +553,8 @@ namespace Opm { WellModelMatrixAdapter (const M& A, const M& A_for_precond, const WellModel& wellMod, - bool matrix_add_well_contributions, const boost::any& parallelInformation = boost::any() ) - : A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), comm_(), - matrix_add_well_contributions_(matrix_add_well_contributions) + : A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), comm_() { #if HAVE_MPI if( parallelInformation.type() == typeid(ParallelISTLInformation) ) @@ -608,7 +605,6 @@ namespace Opm { const matrix_type& A_for_precond_ ; const WellModel& wellMod_; std::unique_ptr< communication_type > comm_; - bool matrix_add_well_contributions_; }; /// Apply an update to the primary variables, chopped if appropriate. diff --git a/opm/autodiff/StandardWell_impl.hpp b/opm/autodiff/StandardWell_impl.hpp index 0908c8f12..8a0d3c79f 100644 --- a/opm/autodiff/StandardWell_impl.hpp +++ b/opm/autodiff/StandardWell_impl.hpp @@ -671,11 +671,6 @@ namespace Opm // specializations in for 3x3 and 4x4 matrices. auto original = invDuneD_[0][0]; Dune::FMatrixHelp::invertMatrix(original, invDuneD_[0][0]); - - // if ( param_.matrix_add_well_contributions_ ) - // { - // addWellContributions( ebosJac ); - // } }