Opm::NonlinearSystem< TypeTag > Class Template Reference

#include <NonlinearSystem.hpp>

Inheritance diagram for Opm::NonlinearSystem< TypeTag >:
Inheritance graph

Public Types

using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using Grid = GetPropType< TypeTag, Properties::Grid >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using Indices = GetPropType< TypeTag, Properties::Indices >
 
using Scalar = GetPropType< TypeTag, Properties::Scalar >
 
using GlobalEqVector = GetPropType< TypeTag, Properties::GlobalEqVector >
 
using ModelParameters = BlackoilModelParameters< Scalar >
 
using WellModel = GetPropType< TypeTag, Properties::WellModel >
 
using ComponentName = ::Opm::ComponentName< FluidSystem, Indices >
 

Public Member Functions

virtual ~NonlinearSystem ()=default
 
bool isParallel () const
 
const Simulatorsimulator () const
 
Simulatorsimulator ()
 
bool terminalOutputEnabled () const
 
int numPhases () const
 
const SimulatorReportSinglefailureReport () const
 
const std::vector< StepReport > & stepReports () const
 
const ComponentNamecompNames () const
 
const ModelParametersparam () const
 
WellModelwellModel ()
 
const WellModelwellModel () const
 
void beginReportStep ()
 
void endReportStep ()
 
SimulatorReportSingle assembleReservoir (const SimulatorTimerInterface &timer)
 
void updateTUNING (const Tuning &tuning)
 
void updateTUNINGDP (const TuningDp &tuning_dp)
 
void updateSolution (const GlobalEqVector &dx)
 
template<class LogFailure >
void addReservoirConvergenceMetrics (ConvergenceReport &report, const int componentIdx, const std::string_view componentName, const std::span< const Scalar > residuals, const std::span< const ConvergenceReport::ReservoirFailure::Type > types, const std::span< const Scalar > tolerances, const Scalar maxResidualAllowed, LogFailure &&logFailure) const
 

Protected Member Functions

 NonlinearSystem (Simulator &simulator, const ModelParameters &param, WellModel &wellModel, const bool terminal_output)
 
virtual void initialLinearization (SimulatorReportSingle &report, int minIter, int maxIter, const SimulatorTimerInterface &timer)
 
virtual bool shouldStoreSolutionUpdate () const
 
virtual void prepareSolutionUpdate ()
 
virtual void storeSolutionUpdate (const GlobalEqVector &)
 
SimulatorReportSingle prepareStep (const SimulatorTimerInterface &timer)
 
template<class WellModelType >
SimulatorReportSingle assembleReservoir (WellModelType &wellModel)
 
template<class ModelParametersType >
void applyTUNING (ModelParametersType &param, const Tuning &tuning)
 
template<class ModelParametersType >
void applyTUNINGDP (ModelParametersType &param, const TuningDp &tuning_dp)
 
template<class ValueType >
std::tuple< ValueType, ValueType > convergenceReduction (Parallel::Communication comm, const ValueType primaryVolumeLocal, const ValueType secondaryVolumeLocal, std::vector< ValueType > &sumValues, std::vector< ValueType > &maxValues, std::vector< ValueType > &averagedValues)
 
void popLastStepReport ()
 

Protected Attributes

Simulatorsimulator_
 
const Gridgrid_
 
bool terminal_output_
 
ModelParameters param_
 
WellModelwell_model_
 
SimulatorReportSingle failureReport_
 
std::vector< StepReportconvergence_reports_
 
ComponentName compNames_ {}
 
std::vector< std::vector< Scalar > > residual_norms_history_
 
Scalar current_relaxation_
 
GlobalEqVector dx_old_
 

Member Typedef Documentation

◆ ComponentName

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::ComponentName = ::Opm::ComponentName<FluidSystem, Indices>

◆ FluidSystem

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>

◆ GlobalEqVector

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>

◆ Grid

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::Grid = GetPropType<TypeTag, Properties::Grid>

◆ Indices

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::Indices = GetPropType<TypeTag, Properties::Indices>

◆ ModelParameters

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::ModelParameters = BlackoilModelParameters<Scalar>

◆ Scalar

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::Scalar = GetPropType<TypeTag, Properties::Scalar>

◆ Simulator

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::Simulator = GetPropType<TypeTag, Properties::Simulator>

◆ WellModel

template<class TypeTag >
using Opm::NonlinearSystem< TypeTag >::WellModel = GetPropType<TypeTag, Properties::WellModel>

Constructor & Destructor Documentation

◆ ~NonlinearSystem()

template<class TypeTag >
virtual Opm::NonlinearSystem< TypeTag >::~NonlinearSystem ( )
virtualdefault

◆ NonlinearSystem()

template<class TypeTag >
Opm::NonlinearSystem< TypeTag >::NonlinearSystem ( Simulator simulator,
const ModelParameters param,
WellModel wellModel,
const bool  terminal_output 
)
explicitprotected

Member Function Documentation

◆ addReservoirConvergenceMetrics()

template<class TypeTag >
template<class LogFailure >
void Opm::NonlinearSystem< TypeTag >::addReservoirConvergenceMetrics ( ConvergenceReport report,
const int  componentIdx,
const std::string_view  componentName,
const std::span< const Scalar residuals,
const std::span< const ConvergenceReport::ReservoirFailure::Type types,
const std::span< const Scalar tolerances,
const Scalar  maxResidualAllowed,
LogFailure &&  logFailure 
) const

◆ applyTUNING()

template<class TypeTag >
template<class ModelParametersType >
void Opm::NonlinearSystem< TypeTag >::applyTUNING ( ModelParametersType &  param,
const Tuning &  tuning 
)
protected

◆ applyTUNINGDP()

template<class TypeTag >
template<class ModelParametersType >
void Opm::NonlinearSystem< TypeTag >::applyTUNINGDP ( ModelParametersType &  param,
const TuningDp &  tuning_dp 
)
protected

◆ assembleReservoir() [1/2]

template<class TypeTag >
SimulatorReportSingle Opm::NonlinearSystem< TypeTag >::assembleReservoir ( const SimulatorTimerInterface timer)

◆ assembleReservoir() [2/2]

template<class TypeTag >
template<class WellModelType >
SimulatorReportSingle Opm::NonlinearSystem< TypeTag >::assembleReservoir ( WellModelType &  wellModel)
protected

◆ beginReportStep()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::beginReportStep ( )
inline

◆ compNames()

template<class TypeTag >
const ComponentName & Opm::NonlinearSystem< TypeTag >::compNames ( ) const
inline

◆ convergenceReduction()

template<class TypeTag >
template<class ValueType >
std::tuple< ValueType, ValueType > Opm::NonlinearSystem< TypeTag >::convergenceReduction ( Parallel::Communication  comm,
const ValueType  primaryVolumeLocal,
const ValueType  secondaryVolumeLocal,
std::vector< ValueType > &  sumValues,
std::vector< ValueType > &  maxValues,
std::vector< ValueType > &  averagedValues 
)
protected

◆ endReportStep()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::endReportStep ( )
inline

◆ failureReport()

template<class TypeTag >
const SimulatorReportSingle & Opm::NonlinearSystem< TypeTag >::failureReport ( ) const
inline

◆ initialLinearization()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::initialLinearization ( SimulatorReportSingle report,
int  minIter,
int  maxIter,
const SimulatorTimerInterface timer 
)
protectedvirtual

◆ isParallel()

template<class TypeTag >
bool Opm::NonlinearSystem< TypeTag >::isParallel ( ) const
inline

◆ numPhases()

template<class TypeTag >
int Opm::NonlinearSystem< TypeTag >::numPhases ( ) const
inline

◆ param()

template<class TypeTag >
const ModelParameters & Opm::NonlinearSystem< TypeTag >::param ( ) const
inline

◆ popLastStepReport()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::popLastStepReport ( )
inlineprotected

◆ prepareSolutionUpdate()

template<class TypeTag >
virtual void Opm::NonlinearSystem< TypeTag >::prepareSolutionUpdate ( )
inlineprotectedvirtual

◆ prepareStep()

◆ shouldStoreSolutionUpdate()

template<class TypeTag >
virtual bool Opm::NonlinearSystem< TypeTag >::shouldStoreSolutionUpdate ( ) const
inlineprotectedvirtual

◆ simulator() [1/2]

template<class TypeTag >
Simulator & Opm::NonlinearSystem< TypeTag >::simulator ( )
inline

◆ simulator() [2/2]

template<class TypeTag >
const Simulator & Opm::NonlinearSystem< TypeTag >::simulator ( ) const
inline

◆ stepReports()

template<class TypeTag >
const std::vector< StepReport > & Opm::NonlinearSystem< TypeTag >::stepReports ( ) const
inline

◆ storeSolutionUpdate()

template<class TypeTag >
virtual void Opm::NonlinearSystem< TypeTag >::storeSolutionUpdate ( const GlobalEqVector )
inlineprotectedvirtual

◆ terminalOutputEnabled()

template<class TypeTag >
bool Opm::NonlinearSystem< TypeTag >::terminalOutputEnabled ( ) const
inline

◆ updateSolution()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::updateSolution ( const GlobalEqVector dx)

◆ updateTUNING()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::updateTUNING ( const Tuning &  tuning)

◆ updateTUNINGDP()

template<class TypeTag >
void Opm::NonlinearSystem< TypeTag >::updateTUNINGDP ( const TuningDp &  tuning_dp)

◆ wellModel() [1/2]

template<class TypeTag >
WellModel & Opm::NonlinearSystem< TypeTag >::wellModel ( )
inline

◆ wellModel() [2/2]

template<class TypeTag >
const WellModel & Opm::NonlinearSystem< TypeTag >::wellModel ( ) const
inline

Member Data Documentation

◆ compNames_

template<class TypeTag >
ComponentName Opm::NonlinearSystem< TypeTag >::compNames_ {}
protected

◆ convergence_reports_

◆ current_relaxation_

template<class TypeTag >
Scalar Opm::NonlinearSystem< TypeTag >::current_relaxation_
protected

◆ dx_old_

template<class TypeTag >
GlobalEqVector Opm::NonlinearSystem< TypeTag >::dx_old_
protected

◆ failureReport_

template<class TypeTag >
SimulatorReportSingle Opm::NonlinearSystem< TypeTag >::failureReport_
protected

◆ grid_

◆ param_

◆ residual_norms_history_

template<class TypeTag >
std::vector<std::vector<Scalar> > Opm::NonlinearSystem< TypeTag >::residual_norms_history_
protected

◆ simulator_

◆ terminal_output_

template<class TypeTag >
bool Opm::NonlinearSystem< TypeTag >::terminal_output_
protected

◆ well_model_

template<class TypeTag >
WellModel& Opm::NonlinearSystem< TypeTag >::well_model_
protected

The documentation for this class was generated from the following files: