mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
extra_timing
This commit is contained in:
parent
5cdde7230e
commit
1f8c878699
@ -96,6 +96,7 @@ assembleControlEq(const WellState<Scalar>& well_state,
|
||||
const bool stopped_or_zero_target,
|
||||
DeferredLogger& deferred_logger) const
|
||||
{
|
||||
OPM_TIMEFUNCTION();
|
||||
/*
|
||||
This function assembles the control equation, similar as for StandardWells.
|
||||
It does *not* need communication.
|
||||
@ -221,7 +222,7 @@ assembleAccelerationTerm(const int seg_target,
|
||||
This method is called in MultisegmentWellEval::assembleAccelerationPressureLoss.
|
||||
It does *not* need communication.
|
||||
*/
|
||||
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg_target][SPres] -= accelerationTerm.value();
|
||||
eqns.D()[seg_target][seg][SPres][SPres] -= accelerationTerm.derivative(SPres + Indices::numEq);
|
||||
@ -245,7 +246,7 @@ assembleHydroPressureLoss(const int seg,
|
||||
This method is called in MultisegmentWellEval::assembleAccelerationAndHydroPressureLosses.
|
||||
It does *not* need communication.
|
||||
*/
|
||||
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][SPres] -= hydro_pressure_drop_seg.value();
|
||||
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
|
||||
@ -264,6 +265,7 @@ assemblePressureEqExtraDerivatives(const int seg,
|
||||
/*
|
||||
This method does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
// disregard residual
|
||||
// Frac - derivatives are zero (they belong to upwind^2)
|
||||
@ -284,6 +286,7 @@ assemblePressureEq(const int seg,
|
||||
/*
|
||||
This method does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][SPres] += pressure_equation.value();
|
||||
eqns.D()[seg][seg][SPres][SPres] += pressure_equation.derivative(SPres + Indices::numEq);
|
||||
@ -315,6 +318,7 @@ assembleTrivialEq(const int seg,
|
||||
and assembleICDPressureEq is responsible for the remaining segments.
|
||||
This method does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][SPres] = value;
|
||||
eqns.D()[seg][seg][SPres][WQTotal] = 1.;
|
||||
@ -331,6 +335,7 @@ assembleAccumulationTerm(const int seg,
|
||||
This method is called from MultisegmentWell::assembleWellEqWithoutIteration.
|
||||
It only assembles on the diagonal of D and it does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][comp_idx] += accumulation_term.value();
|
||||
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
|
||||
@ -350,6 +355,7 @@ assembleOutflowTerm(const int seg,
|
||||
This method is called from MultisegmentWell::assembleWellEqWithoutIteration.
|
||||
It does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][comp_idx] -= segment_rate.value();
|
||||
eqns.D()[seg][seg][comp_idx][WQTotal] -= segment_rate.derivative(WQTotal + Indices::numEq);
|
||||
@ -375,6 +381,7 @@ assembleInflowTerm(const int seg,
|
||||
This method is called from MultisegmentWell::assembleWellEqWithoutIteration.
|
||||
It does *not* need communication.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
eqns.residual()[seg][comp_idx] += inlet_rate.value();
|
||||
eqns.D()[seg][inlet][comp_idx][WQTotal] += inlet_rate.derivative(WQTotal + Indices::numEq);
|
||||
@ -401,6 +408,7 @@ assemblePerforationEq(const int seg,
|
||||
and after calling this function, the diagonal of the matrix D and the residual need to be combined by calling
|
||||
the function MultisegmentWellEquations::sumDistributed.
|
||||
*/
|
||||
OPM_TIMEFUNCTION();
|
||||
MultisegmentWellEquationAccess<Scalar,numWellEq,Indices::numEq> eqns(eqns1);
|
||||
// subtract sum of phase fluxes in the well equations.
|
||||
eqns.residual()[seg][comp_idx] += cq_s_effective.value();
|
||||
|
@ -178,6 +178,7 @@ apply(BVector& r) const
|
||||
template<class Scalar, int numWellEq, int numEq>
|
||||
void MultisegmentWellEquations<Scalar,numWellEq,numEq>::createSolver()
|
||||
{
|
||||
OPM_TIMEFUNCTION();
|
||||
#if HAVE_UMFPACK
|
||||
if (duneDSolver_) {
|
||||
return;
|
||||
@ -202,6 +203,7 @@ MultisegmentWellEquations<Scalar,numWellEq,numEq>::solve() const
|
||||
// It is ok to do this on each process instead of only on one,
|
||||
// because the other processes would remain idle while waiting for
|
||||
// the single process to complete the computation.
|
||||
OPM_TIMEFUNCTION();
|
||||
return mswellhelpers::applyUMFPack(*duneDSolver_, resWell_);
|
||||
}
|
||||
|
||||
@ -212,6 +214,7 @@ MultisegmentWellEquations<Scalar,numWellEq,numEq>::solve(const BVectorWell& rhs)
|
||||
// It is ok to do this on each process instead of only on one,
|
||||
// because the other processes would remain idle while waiting for
|
||||
// the single process to complete the computation.
|
||||
OPM_TIMEFUNCTION();
|
||||
return mswellhelpers::applyUMFPack(*duneDSolver_, rhs);
|
||||
}
|
||||
|
||||
|
@ -1819,6 +1819,7 @@ namespace Opm
|
||||
const GroupState<Scalar>& group_state,
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
OPM_TIMEFUNCTION();
|
||||
if (!this->isOperableAndSolvable() && !this->wellIsStopped()) return;
|
||||
|
||||
// update the upwinding segments
|
||||
|
Loading…
Reference in New Issue
Block a user