mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: StandardWellEquations::sumDistributed
this sums up the global equation system for distributed wells
This commit is contained in:
parent
e9ed80d644
commit
4b4898d6ec
@ -385,6 +385,14 @@ extractCPRPressureMatrix(PressureMatrix& jacobian,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Scalar, int numEq>
|
||||||
|
void StandardWellEquations<Scalar,numEq>::
|
||||||
|
sumDistributed(Parallel::Communication comm)
|
||||||
|
{
|
||||||
|
// accumulate resWell_ and duneD_ in parallel to get effects of all perforations (might be distributed)
|
||||||
|
wellhelpers::sumDistributedWellEntries(duneD_[0][0], resWell_[0], comm);
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANCE(N) \
|
#define INSTANCE(N) \
|
||||||
template class StandardWellEquations<double,N>; \
|
template class StandardWellEquations<double,N>; \
|
||||||
template void StandardWellEquations<double,N>:: \
|
template void StandardWellEquations<double,N>:: \
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#ifndef OPM_STANDARDWELL_EQUATIONS_HEADER_INCLUDED
|
#ifndef OPM_STANDARDWELL_EQUATIONS_HEADER_INCLUDED
|
||||||
#define OPM_STANDARDWELL_EQUATIONS_HEADER_INCLUDED
|
#define OPM_STANDARDWELL_EQUATIONS_HEADER_INCLUDED
|
||||||
|
|
||||||
|
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
||||||
#include <opm/simulators/wells/WellHelpers.hpp>
|
#include <opm/simulators/wells/WellHelpers.hpp>
|
||||||
|
|
||||||
#include <dune/common/dynmatrix.hh>
|
#include <dune/common/dynmatrix.hh>
|
||||||
@ -113,6 +114,9 @@ public:
|
|||||||
//! \brief Get the number of blocks of the C and B matrices.
|
//! \brief Get the number of blocks of the C and B matrices.
|
||||||
unsigned int getNumBlocks() const;
|
unsigned int getNumBlocks() const;
|
||||||
|
|
||||||
|
//! \brief Sum with off-process contribution.
|
||||||
|
void sumDistributed(Parallel::Communication comm);
|
||||||
|
|
||||||
// two off-diagonal matrices
|
// two off-diagonal matrices
|
||||||
OffDiagMatWell duneB_;
|
OffDiagMatWell duneB_;
|
||||||
OffDiagMatWell duneC_;
|
OffDiagMatWell duneC_;
|
||||||
|
@ -526,8 +526,8 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// accumulate resWell_ and duneD_ in parallel to get effects of all perforations (might be distributed)
|
// accumulate resWell_ and duneD_ in parallel to get effects of all perforations (might be distributed)
|
||||||
wellhelpers::sumDistributedWellEntries(this->linSys_.duneD_[0][0], this->linSys_.resWell_[0],
|
this->linSys_.sumDistributed(this->parallel_well_info_.communication());
|
||||||
this->parallel_well_info_.communication());
|
|
||||||
// add vol * dF/dt + Q to the well equations;
|
// add vol * dF/dt + Q to the well equations;
|
||||||
for (int componentIdx = 0; componentIdx < numWellConservationEq; ++componentIdx) {
|
for (int componentIdx = 0; componentIdx < numWellConservationEq; ++componentIdx) {
|
||||||
// TODO: following the development in MSW, we need to convert the volume of the wellbore to be surface volume
|
// TODO: following the development in MSW, we need to convert the volume of the wellbore to be surface volume
|
||||||
|
Loading…
Reference in New Issue
Block a user