mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-20 01:32:57 -06:00
refactoring solveJacobianSystem() not to handle xw.
which is one step to avoid to access the type of xw, which is related to the implementation of the well model.
This commit is contained in:
parent
b080874b89
commit
51226af445
@ -284,10 +284,9 @@ namespace Opm {
|
||||
const int nc = AutoDiffGrid::numCells(grid_);
|
||||
const int nw = numWells();
|
||||
BVector x(nc);
|
||||
BVector xw(nw);
|
||||
|
||||
try {
|
||||
solveJacobianSystem(x, xw);
|
||||
solveJacobianSystem(x);
|
||||
report.linear_solve_time += perfTimer.stop();
|
||||
report.total_linear_iterations += linearIterationsLastSolve();
|
||||
}
|
||||
@ -488,7 +487,7 @@ namespace Opm {
|
||||
|
||||
/// Solve the Jacobian system Jx = r where J is the Jacobian and
|
||||
/// r is the residual.
|
||||
void solveJacobianSystem(BVector& x, BVector& xw) const
|
||||
void solveJacobianSystem(BVector& x) const
|
||||
{
|
||||
const auto& ebosJac = ebosSimulator_.model().linearizer().matrix();
|
||||
auto& ebosResid = ebosSimulator_.model().linearizer().residual();
|
||||
@ -510,13 +509,6 @@ namespace Opm {
|
||||
Operator opA(ebosJac, well_model_);
|
||||
istlSolver().solve( opA, x, ebosResid );
|
||||
}
|
||||
|
||||
if( xw.size() > 0 )
|
||||
{
|
||||
// recover wells.
|
||||
xw = 0.0;
|
||||
wellModel().recoverVariable(x, xw);
|
||||
}
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user