Skip to content

Commit

Permalink
Mark the spots where we multiply with D^(-1) - do this only on one pr…
Browse files Browse the repository at this point in the history
…ocess later
  • Loading branch information
lisajulia committed Nov 20, 2024
1 parent 8ea0aa8 commit 10e3d24
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opm/simulators/wells/MultisegmentWellEquations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ apply(const BVector& x, BVector& Ax) const
this->pw_info_.communication().sum(Bx.data(), Bx.size());

// invDBx = duneD^-1 * Bx_
// TODO: do this only on one process and distribute the solution
const BVectorWell invDBx = mswellhelpers::applyUMFPack(*duneDSolver_, Bx);

// Ax = Ax - duneC_^T * invDBx
Expand All @@ -167,6 +168,7 @@ void MultisegmentWellEquations<Scalar,numWellEq,numEq>::
apply(BVector& r) const
{
// invDrw_ = duneD^-1 * resWell_
// TODO: do this only on one process and distribute the solution
const BVectorWell invDrw = mswellhelpers::applyUMFPack(*duneDSolver_, resWell_);
// r = r - duneC_^T * invDrw
duneC_.mmtv(invDrw, r);
Expand Down Expand Up @@ -196,13 +198,15 @@ template<class Scalar, int numWellEq, int numEq>
typename MultisegmentWellEquations<Scalar,numWellEq,numEq>::BVectorWell
MultisegmentWellEquations<Scalar,numWellEq,numEq>::solve() const
{
// TODO: do this only on one process and distribute the solution
return mswellhelpers::applyUMFPack(*duneDSolver_, resWell_);
}

template<class Scalar, int numWellEq, int numEq>
typename MultisegmentWellEquations<Scalar,numWellEq,numEq>::BVectorWell
MultisegmentWellEquations<Scalar,numWellEq,numEq>::solve(const BVectorWell& rhs) const
{
// TODO: do this only on one process and distribute the solution
return mswellhelpers::applyUMFPack(*duneDSolver_, rhs);
}

Expand All @@ -220,6 +224,7 @@ recoverSolutionWell(const BVector& x, BVectorWell& xw) const
resWell -= Bx;

// xw = D^-1 * resWell
// TODO: do this only on one process and distribute the solution
xw = mswellhelpers::applyUMFPack(*duneDSolver_, resWell);
}

Expand Down

0 comments on commit 10e3d24

Please sign in to comment.