Opm::Parameters Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  AcceleratorMode
 
struct  ActionParsingStrictness
 
struct  AllowDistributedWells
 
struct  AlternativeWellRateInit
 
struct  AmgCoarsenTarget
 
struct  BdaDeviceId
 
struct  CellsX
 grid resolution More...
 
struct  CellsY
 
struct  CellsZ
 
struct  ContinueOnConvergenceError
 Continue with a non-converged solution instead of giving up if we encounter a time step size smaller than the minimum time step size. More...
 
struct  CprReuseInterval
 
struct  CprReuseSetup
 
struct  DamarisDaskFile
 
struct  DamarisDedicatedCores
 
struct  DamarisDedicatedNodes
 
struct  DamarisLimitVariables
 
struct  DamarisLogLevel
 
struct  DamarisOutputHdfCollective
 
struct  DamarisPythonParaviewScript
 
struct  DamarisPythonScript
 
struct  DamarisSaveMeshToHdf
 
struct  DamarisSaveToHdf
 
struct  DamarisSharedMemoryName
 
struct  DamarisSharedMemorySizeBytes
 
struct  DamarisSimName
 
struct  DbhpMaxRel
 
struct  DebugEmitCellPartition
 
struct  DomainSizeX
 domain size More...
 
struct  DomainSizeY
 
struct  DomainSizeZ
 
struct  DpMaxRel
 
struct  DsMax
 
struct  DwellFractionMax
 
struct  EclDeckFileName
 
struct  EclOutputDoublePrecision
 
struct  EclOutputInterval
 
struct  EdgeWeightsMethod
 
struct  EnableAdaptiveTimeStepping
 
struct  EnableAsyncEclOutput
 
struct  EnableAsyncVtkOutput
 Determines if the VTK output is written to disk asynchronously. More...
 
struct  EnableDamarisOutput
 
struct  EnableDriftCompensation
 
struct  EnableDryRun
 
struct  EnableEclOutput
 
struct  EnableEsmry
 
struct  EnableGravity
 Returns whether gravity is considered in the problem. More...
 
struct  EnableGridAdaptation
 Switch to enable or disable grid adaptation. More...
 
struct  EnableIntensiveQuantityCache
 Specify whether all intensive quantities for the grid should be cached in the discretization. More...
 
struct  EnableOpmRstFile
 
struct  EnableStorageCache
 Specify whether the storage terms for previous solutions should be cached. More...
 
struct  EnableTerminalOutput
 
struct  EnableThermodynamicHints
 Specify whether to use the already calculated solutions as starting values of the intensive quantities. More...
 
struct  EnableTuning
 
struct  EnableVtkOutput
 Global switch to enable or disable the writing of VTK output files. More...
 
struct  EnableWellOperabilityCheck
 
struct  EnableWellOperabilityCheckIter
 
struct  EnableWriteAllSolutions
 
struct  EndTime
 The default value for the simulation's end time. More...
 
struct  EpisodeLength
 
struct  ExplicitRockCompaction
 
struct  ExternalPartition
 
struct  FlashTolerance
 
struct  FlashTwoPhaseMethod
 Two-phase flash method. More...
 
struct  FlashVerbosity
 The verbosity level of the flash solver. More...
 
struct  FluidSystemNumPressure
 
struct  FluidSystemNumTemperature
 
struct  FluidSystemPressureHigh
 
struct  FluidSystemPressureLow
 
struct  FluidSystemTemperatureHigh
 
struct  FluidSystemTemperatureLow
 
struct  ForceDisableFluidInPlaceOutput
 
struct  ForceDisableResvFluidInPlaceOutput
 
struct  FullTimeStepInitially
 
struct  GMResRestart
 number of iterations between solver restarts for the GMRES solver More...
 
struct  GridFile
 Name of the grid file. More...
 
struct  GridGlobalRefinements
 
struct  IgnoreKeywords
 
struct  IluFillinLevel
 
struct  IluRedblack
 
struct  IluRelaxation
 
struct  IluReorderSpheres
 
struct  ImbalanceTol
 
struct  Initialpressure
 
struct  InitialTimeStepInDays
 
struct  InitialTimeStepSize
 The default value for the simulation's initial time step size. More...
 
struct  InitialWaterSaturation
 
struct  InputSkipMode
 
struct  LensLowerLeftX
 
struct  LensLowerLeftY
 
struct  LensLowerLeftZ
 
struct  LensUpperRightX
 
struct  LensUpperRightY
 
struct  LensUpperRightZ
 
struct  LinearSolver
 
struct  LinearSolverAbsTolerance
 Maximum accepted error of the norm of the residual. More...
 
struct  LinearSolverIgnoreConvergenceFailure
 
struct  LinearSolverMaxError
 
struct  LinearSolverMaxIter
 
struct  LinearSolverMaxIterations
 Maximum number of iterations eyecuted by the linear solver. More...
 
struct  LinearSolverOverlapSize
 The size of the algebraic overlap of the linear solver. More...
 
struct  LinearSolverPrintJsonDefinition
 
struct  LinearSolverReduction
 
struct  LinearSolverRestart
 
struct  LinearSolverTolerance
 Maximum accepted error of the solution of the linear solver. More...
 
struct  LinearSolverVerbosity
 Specifies the verbosity of the linear solver. More...
 
struct  LoadFile
 
struct  LoadStep
 
struct  LocalDomainsOrderingMeasure
 
struct  LocalDomainsPartitioningImbalance
 
struct  LocalDomainsPartitioningMethod
 
struct  LocalSolveApproach
 
struct  LocalToleranceScalingCnv
 
struct  LocalToleranceScalingMb
 
struct  LocalWellSolveControlSwitching
 
struct  MatrixAddWellContributions
 
struct  MaxDepth
 
struct  MaximumNumberOfWellSwitches
 
struct  MaximumWaterSaturation
 
struct  MaxInnerIterMsWells
 
struct  MaxInnerIterWells
 
struct  MaxLocalSolveIterations
 
struct  MaxNewtonIterationsWithInnerWellIterations
 
struct  MaxPressureChangeMsWells
 
struct  MaxResidualAllowed
 
struct  MaxSinglePrecisionDays
 
struct  MaxTemperatureChange
 
struct  MaxTimeStepDivisions
 The maximum allowed number of timestep divisions for the Newton solver. More...
 
struct  MaxTimeStepSize
 Specify the maximum size of a time integration [s]. More...
 
struct  MaxWelleqIter
 
struct  MetisParams
 
struct  MiluVariant
 
struct  MinStrictCnvIter
 
struct  MinStrictMbIter
 
struct  MinTimeStepBasedOnNewtonIterations
 
struct  MinTimeStepBeforeShuttingProblematicWellsInDays
 
struct  MinTimeStepSize
 Specify the minimal size of a time integration [s]. More...
 
struct  NetworkMaxIterations
 
struct  NetworkMaxStrictIterations
 
struct  NewtonMaxError
 
struct  NewtonMaxIterations
 Number of maximum iterations for the Newton method. More...
 
struct  NewtonMaxRelax
 
struct  NewtonMinIterations
 
struct  NewtonRelaxationType
 
struct  NewtonTargetIterations
 The number of iterations at which the Newton method should aim at. More...
 
struct  NewtonTolerance
 The value for the error below which convergence is declared. More...
 
struct  NewtonVerbose
 Specifies whether the Newton method should print messages or not. More...
 
struct  NewtonWriteConvergence
 
struct  NlddLocalLinearSolver
 
struct  NlddLocalLinearSolverMaxIter
 
struct  NlddLocalLinearSolverReduction
 
struct  NlddNumInitialNewtonIter
 
struct  NonlinearSolver
 
struct  NumericDifferenceMethod
 Specify which kind of method should be used to numerically calculate the partial derivatives of the residual. More...
 
struct  NumLocalDomains
 
struct  NumPressurePointsEquil
 
struct  OpenclIluParallel
 
struct  OpenclPlatformId
 
struct  OutputDir
 The directory to which simulation output ought to be written to. More...
 
struct  OutputExtraConvergenceInfo
 
struct  OutputMode
 
struct  OwnerCellsFirst
 
struct  Parameter
 A struct holding the key-value pair for a parameter. More...
 
struct  ParameterFile
 Set a value for the ParameterFile property. More...
 
struct  ParsingStrictness
 
struct  PartitionMethod
 
struct  Permeability
 
struct  PermeabilityLens
 
struct  PreconditionerOrder
 The order of the sequential preconditioner. More...
 
struct  PreconditionerRelaxation
 The relaxation factor of the preconditioner. More...
 
struct  PredeterminedTimeStepsFile
 By default, do not force any time steps. More...
 
struct  PressureMax
 
struct  PressureMin
 
struct  PressureScale
 
struct  PrintParameters
 Print all parameters on startup? More...
 
struct  PriVarOscilationThreshold
 
struct  ProjectSaturations
 
struct  PvsVerbosity
 The verbosity of the model (0 -> do not print anything, 2 -> spam stdout a lot) More...
 
struct  RegularizationFactorWells
 
struct  RelaxedLinearSolverReduction
 
struct  RelaxedMaxPvFraction
 
struct  RelaxedPressureTolMsw
 
struct  RelaxedWellFlowTol
 
struct  RestartTime
 The default value for the simulation's restart time. More...
 
struct  RestartWritingInterval
 
struct  SaveFile
 
struct  SaveStep
 
struct  ScaleLinearSystem
 
struct  SchedRestart
 
struct  SeparateSparseSourceTerms
 
struct  SerialPartitioning
 
struct  ShutUnsolvableWells
 
struct  SimulationName
 
struct  SolverContinueOnConvergenceFailure
 
struct  SolverGrowthFactor
 
struct  SolverMaxGrowth
 
struct  SolverMaxRestarts
 
struct  SolverMaxTimeStepInDays
 
struct  SolverMinTimeStep
 
struct  SolverRestartFactor
 
struct  SolverVerbosity
 
struct  SolveWelleqInitially
 
struct  StrictInnerIterWells
 
struct  StrictOuterIterWells
 
struct  Temperature
 
struct  TemperatureMax
 
struct  TemperatureMin
 
struct  ThreadsPerProcess
 Number of threads per process. More...
 
struct  TimeStepAfterEventInDays
 
struct  TimeStepControl
 
struct  TimeStepControlDecayDampingFactor
 
struct  TimeStepControlDecayRate
 
struct  TimeStepControlFileName
 
struct  TimeStepControlGrowthDampingFactor
 
struct  TimeStepControlGrowthRate
 
struct  TimeStepControlTargetIterations
 
struct  TimeStepControlTargetNewtonIterations
 
struct  TimeStepControlTolerance
 
struct  TimeStepVerbosity
 
struct  ToleranceCnv
 
struct  ToleranceCnvEnergy
 
struct  ToleranceCnvEnergyRelaxed
 
struct  ToleranceCnvRelaxed
 
struct  ToleranceEnergyBalance
 
struct  ToleranceEnergyBalanceRelaxed
 
struct  ToleranceMb
 
struct  ToleranceMbRelaxed
 
struct  TolerancePressureMsWells
 
struct  ToleranceWellControl
 
struct  ToleranceWells
 
struct  UpdateEquationsScaling
 
struct  UseAverageDensityMsWells
 
struct  UseGmres
 
struct  UseImplicitIpr
 
struct  UseMultisegmentWell
 
struct  UseUpdateStabilization
 
struct  VtkWriteAverageMolarMasses
 
struct  VtkWriteBiofilmConcentration
 
struct  VtkWriteCalciteConcentration
 
struct  VtkWriteDensities
 
struct  VtkWriteDiffusionCoefficients
 
struct  VtkWriteDofIndex
 
struct  VtkWriteEffectiveDiffusionCoefficients
 
struct  VtkWriteEnthalpies
 
struct  VtkWriteEquilibriumConstants
 
struct  VtkWriteExtrusionFactor
 
struct  VtkWriteFilterVelocities
 
struct  VtkWriteFluidEnthalpies
 
struct  VtkWriteFluidInternalEnergies
 
struct  VtkWriteFractureFilterVelocities
 
struct  VtkWriteFractureIntrinsicPermeabilities
 
struct  VtkWriteFractureMobilities
 
struct  VtkWriteFracturePorosity
 
struct  VtkWriteFractureRelativePermeabilities
 
struct  VtkWriteFractureSaturations
 
struct  VtkWriteFractureVolumeFraction
 
struct  VtkWriteFugacities
 
struct  VtkWriteFugacityCoeffs
 
struct  VtkWriteGasDissolutionFactor
 
struct  VtkWriteGasFormationVolumeFactor
 
struct  VtkWriteGasSaturationPressure
 
struct  VtkWriteInternalEnergies
 
struct  VtkWriteIntrinsicPermeabilities
 
struct  VtkWriteLiquidMoleFractions
 
struct  VtkWriteMassFractions
 
struct  VtkWriteMicrobialConcentration
 
struct  VtkWriteMobilities
 
struct  VtkWriteMolarities
 
struct  VtkWriteMoleFractions
 
struct  VtkWriteOilFormationVolumeFactor
 
struct  VtkWriteOilSaturationPressure
 
struct  VtkWriteOilVaporizationFactor
 
struct  VtkWriteOxygenConcentration
 
struct  VtkWritePhasePresence
 
struct  VtkWritePolymerAdsorption
 
struct  VtkWritePolymerConcentration
 
struct  VtkWritePolymerDeadPoreVolume
 
struct  VtkWritePolymerRockDensity
 
struct  VtkWritePolymerViscosityCorrection
 
struct  VtkWritePorosity
 
struct  VtkWritePotentialGradients
 
struct  VtkWritePressures
 
struct  VtkWritePrimaryVars
 
struct  VtkWritePrimaryVarsMeaning
 
struct  VtkWriteProcessRank
 
struct  VtkWriteRelativePermeabilities
 
struct  VtkWriteRockInternalEnergy
 
struct  VtkWriteSaturatedGasOilVaporizationFactor
 
struct  VtkWriteSaturatedOilGasDissolutionFactor
 
struct  VtkWriteSaturationRatios
 
struct  VtkWriteSaturations
 
struct  VtkWriteSolidInternalEnergy
 
struct  VtkWriteSolventDensity
 
struct  VtkWriteSolventMobility
 
struct  VtkWriteSolventRsw
 
struct  VtkWriteSolventSaturation
 
struct  VtkWriteSolventViscosity
 
struct  VtkWriteTemperature
 
struct  VtkWriteThermalConductivity
 
struct  VtkWriteTortuosities
 
struct  VtkWriteTotalMassFractions
 
struct  VtkWriteTotalMoleFractions
 
struct  VtkWriteTotalThermalConductivity
 
struct  VtkWriteTracerConcentration
 
struct  VtkWriteUreaConcentration
 
struct  VtkWriteViscosities
 
struct  VtkWriteWaterFormationVolumeFactor
 
struct  VtkWriteWaterViscosityCorrection
 
struct  WaterOnlyThreshold
 
struct  WellWidth
 
struct  ZoltanImbalanceTol
 
struct  ZoltanParams
 

Typedefs

using PositionalArgumentCallback = std::function< int(std::function< void(const std::string &, const std::string &)>, std::set< std::string > &, std::string &, int, const char **, int, int)>
 Callback function for command line parsing. More...
 

Functions

void printUsage (const std::string &helpPreamble, std::ostream &os, const std::string &errorMsg="", const bool showAll=false)
 Print a usage message for all run-time parameters. More...
 
std::string parseCommandLineOptions (int argc, const char **argv, const PositionalArgumentCallback &posArgCallback, const std::string &helpPreamble="")
 Parse the parameters provided on the command line. More...
 
bool parseParameterFile (const std::string &fileName, bool overwrite=true)
 Read the parameters from an INI-style file. More...
 
void printValues (std::ostream &os)
 Print values of the run-time parameters. More...
 
bool printUnused (std::ostream &os)
 Print the list of unused run-time parameters. More...
 
template<class Param >
auto Get (bool errorIfNotRegistered=true)
 Retrieve a runtime parameter. More...
 
template<class Param >
void SetDefault (decltype(Param::value) new_value)
 Set a runtime parameter. More...
 
void getLists (std::vector< Parameter > &usedParams, std::vector< Parameter > &unusedParams)
 Retrieves the lists of parameters specified at runtime and their values. More...
 
void reset ()
 Reset parameter system. More...
 
template<class Param >
bool IsSet (bool errorIfNotRegistered=true)
 Returns true if a parameter has been specified at runtime, false otherwise. More...
 
template<class Param >
void Register (const char *usageString)
 Register a run-time parameter. More...
 
template<class Param >
void Hide ()
 Indicate that a given parameter should not be mentioned in the help message. More...
 
bool IsRegistrationOpen ()
 Query whether parameter registration is open or not. More...
 
void endRegistration ()
 Indicate that all parameters are registered for a given type tag. More...
 

Typedef Documentation

◆ PositionalArgumentCallback

using Opm::Parameters::PositionalArgumentCallback = typedef std::function<int(std::function<void(const std::string&, const std::string&)>, std::set<std::string>&, std::string&, int, const char**, int, int)>

Callback function for command line parsing.

Function Documentation

◆ endRegistration()

void Opm::Parameters::endRegistration ( )

Indicate that all parameters are registered for a given type tag.

If registerParam is called after the invocation of endParamRegistration, a std::logic_error exception will be thrown.

◆ Get()

template<class Param >
auto Opm::Parameters::Get ( bool  errorIfNotRegistered = true)

Retrieve a runtime parameter.

The default value is specified in the parameter struct.

Example:

// Retrieves value UpwindWeight, default
// is taken from the property UpwindWeight
::Opm::Parameters::get<::Opm::Parameters::UpwindWeight>();

References Opm::Parameters::detail::Get_().

Referenced by Opm::GroundWaterProblem< TypeTag >::finishInit(), Opm::FvBaseProblem< TypeTag >::nextTimeStepSize(), and Opm::NcpNewtonMethod< TypeTag >::preSolve_().

◆ getLists()

void Opm::Parameters::getLists ( std::vector< Parameter > &  usedParams,
std::vector< Parameter > &  unusedParams 
)

Retrieves the lists of parameters specified at runtime and their values.

The two arguments besides the TypeTag are assumed to be STL containers which store std::pair<std::string, std::string>.

◆ Hide()

template<class Param >
void Opm::Parameters::Hide ( )

Indicate that a given parameter should not be mentioned in the help message.

This allows to deal with unused parameters

References Opm::Parameters::detail::Hide_().

◆ IsRegistrationOpen()

bool Opm::Parameters::IsRegistrationOpen ( )

Query whether parameter registration is open or not.

Returns
True if registration is open, false otherwise

◆ IsSet()

template<class Param >
bool Opm::Parameters::IsSet ( bool  errorIfNotRegistered = true)

Returns true if a parameter has been specified at runtime, false otherwise.

If the parameter in question has not been registered, this throws an exception.

References Opm::Parameters::detail::IsSet_().

◆ parseCommandLineOptions()

std::string Opm::Parameters::parseCommandLineOptions ( int  argc,
const char **  argv,
const PositionalArgumentCallback posArgCallback,
const std::string &  helpPreamble = "" 
)

Parse the parameters provided on the command line.

This function does some basic syntax checks.

Parameters
argcThe number of parameters passed by the operating system to the main() function
argvThe array of strings passed by the operating system to the main() function
helpPreambleIf non-empty, the –help and -h parameters will be recognized and the content of the string will be printed before the list of command line parameters
Returns
Empty string if everything worked out. Otherwise the thing that could not be read.

◆ parseParameterFile()

bool Opm::Parameters::parseParameterFile ( const std::string &  fileName,
bool  overwrite = true 
)

Read the parameters from an INI-style file.

This function does some basic syntax checks.

◆ printUnused()

bool Opm::Parameters::printUnused ( std::ostream &  os)

Print the list of unused run-time parameters.

Parameters
osThe std::ostream on which the message should be printed
Returns
true if something was printed

◆ printUsage()

void Opm::Parameters::printUsage ( const std::string &  helpPreamble,
std::ostream &  os,
const std::string &  errorMsg = "",
const bool  showAll = false 
)

Print a usage message for all run-time parameters.

Parameters
helpPreambleThe string that is printed after the error message and before the list of parameters.
errorMsgThe error message to be printed, if any
osThe std::ostream which should be used.

◆ printValues()

void Opm::Parameters::printValues ( std::ostream &  os)

Print values of the run-time parameters.

Parameters
osThe std::ostream on which the message should be printed

Referenced by Opm::SimulatorFullyImplicitBlackoil< TypeTag >::getHeader(), and Opm::Main::initialize_().

◆ Register()

template<class Param >
void Opm::Parameters::Register ( const char *  usageString)

Register a run-time parameter.

In OPM, parameters can only be used after they have been registered.

Example:

// Registers a run-time parameter "UpwindWeight"
and the description "Relative weight of the upwind node."
Register<UpwindWeight>("Relative weight of the upwind node.");

References Opm::Parameters::detail::Register_().

◆ reset()

void Opm::Parameters::reset ( )

Reset parameter system.

Referenced by Opm::FingerProblem< TypeTag >::finishInit(), and Opm::Main::runDynamic().

◆ SetDefault()

template<class Param >
void Opm::Parameters::SetDefault ( decltype(Param::value)  new_value)

Set a runtime parameter.

Override the default value specified.

Example:

// Set the value UpwindWeight
::Opm::Parameters::Set<::Opm::Parameters::UpwindWeight>(3.0);

References Opm::Parameters::detail::SetDefault_().