Cleanup code.

Removed unused boolean switch in WellModelMatrixAdapter and removed commented code.
This commit is contained in:
Markus Blatt 2018-03-02 20:39:59 +01:00
parent af3c45dd6a
commit f07874cf42
2 changed files with 2 additions and 11 deletions

View File

@ -490,12 +490,12 @@ namespace Opm {
// set initial guess // set initial guess
x = 0.0; x = 0.0;
const Mat& actual_mat_for_prec = matrix_for_preconditioner_ ? *matrix_for_preconditioner_.get() : ebosJac;
// Solve system. // Solve system.
if( isParallel() ) if( isParallel() )
{ {
typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel<TypeTag>, true > Operator; typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel<TypeTag>, true > Operator;
Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(), Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(),
param_.matrix_add_well_contributions_,
istlSolver().parallelInformation() ); istlSolver().parallelInformation() );
assert( opA.comm() ); assert( opA.comm() );
istlSolver().solve( opA, x, ebosResid, *(opA.comm()) ); istlSolver().solve( opA, x, ebosResid, *(opA.comm()) );
@ -504,7 +504,6 @@ namespace Opm {
{ {
typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel<TypeTag>, false > Operator; typedef WellModelMatrixAdapter< Mat, BVector, BVector, BlackoilWellModel<TypeTag>, false > Operator;
Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(), Operator opA(ebosJac, matrix_for_preconditioner_, wellModel(),
param_.matrix_add_well_contributions_ );
istlSolver().solve( opA, x, ebosResid ); istlSolver().solve( opA, x, ebosResid );
} }
} }
@ -554,10 +553,8 @@ namespace Opm {
WellModelMatrixAdapter (const M& A, WellModelMatrixAdapter (const M& A,
const M& A_for_precond, const M& A_for_precond,
const WellModel& wellMod, const WellModel& wellMod,
bool matrix_add_well_contributions,
const boost::any& parallelInformation = boost::any() ) const boost::any& parallelInformation = boost::any() )
: A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), comm_(), : A_( A ), A_for_precond_(A_for_precond), wellMod_( wellMod ), comm_()
matrix_add_well_contributions_(matrix_add_well_contributions)
{ {
#if HAVE_MPI #if HAVE_MPI
if( parallelInformation.type() == typeid(ParallelISTLInformation) ) if( parallelInformation.type() == typeid(ParallelISTLInformation) )
@ -608,7 +605,6 @@ namespace Opm {
const matrix_type& A_for_precond_ ; const matrix_type& A_for_precond_ ;
const WellModel& wellMod_; const WellModel& wellMod_;
std::unique_ptr< communication_type > comm_; std::unique_ptr< communication_type > comm_;
bool matrix_add_well_contributions_;
}; };
/// Apply an update to the primary variables, chopped if appropriate. /// Apply an update to the primary variables, chopped if appropriate.

View File

@ -671,11 +671,6 @@ namespace Opm
// specializations in for 3x3 and 4x4 matrices. // specializations in for 3x3 and 4x4 matrices.
auto original = invDuneD_[0][0]; auto original = invDuneD_[0][0];
Dune::FMatrixHelp::invertMatrix(original, invDuneD_[0][0]); Dune::FMatrixHelp::invertMatrix(original, invDuneD_[0][0]);
// if ( param_.matrix_add_well_contributions_ )
// {
// addWellContributions( ebosJac );
// }
} }