My Project
Loading...
Searching...
No Matches
Opm Namespace Reference

This file contains a set of helper functions used by VFPProd / VFPInj. More...

Namespaces

namespace  DamarisOutput
 Below are the Damaris Keywords supported by Damaris to be filled in the built-in XML file.
 
namespace  EQUIL
 Types and routines that collectively implement a basic ECLIPSE-style equilibration-based initialisation scheme.
 
namespace  ExceptionType
 This class implements a deferred logger: 1) messages can be pushed back to a vector 2) a call to logMessages adds the messages to OpmLog backends.
 

Classes

class  ActionHandler
 Class handling Action support in simulator. More...
 
class  AdaptiveSimulatorTimer
 Simulation timer for adaptive time stepping. More...
 
class  AdaptiveTimeStepping
 
class  ALQState
 
class  AluGridVanguard
 Helper class for grid instantiation of ECL file-format using problems. More...
 
struct  AMGHelper
 
struct  AMGSmootherArgsHelper
 
struct  AMGSmootherArgsHelper< Opm::ParallelOverlappingILU0< M, V, V, C > >
 
class  AquiferAnalytical
 
class  AquiferCarterTracy
 
class  AquiferConstantFlux
 
class  AquiferFetkovich
 
class  AquiferInterface
 
class  AquiferNumerical
 
class  BaseAquiferModel
 The base class which specifies the API of aquifer models. More...
 
class  BdaBridge
 BdaBridge acts as interface between opm-simulators with the BdaSolvers. More...
 
class  BlackoilAquiferModel
 Class for handling the blackoil aquifer model. More...
 
class  BlackoilModel
 A model implementation for three-phase black oil. More...
 
class  BlackoilModelNldd
 A NLDD implementation for three-phase black oil. More...
 
struct  BlackoilModelParameters
 Solver parameters for the BlackoilModel. More...
 
class  BlackoilPhases
 
class  BlackoilWellModel
 Class for handling the blackoil well model. More...
 
class  BlackoilWellModelConstraints
 Class for handling constraints for the blackoil well model. More...
 
class  BlackoilWellModelGeneric
 Class for handling the blackoil well model. More...
 
class  BlackoilWellModelGuideRates
 Class for handling the guide rates in the blackoil well model. More...
 
class  BlackoilWellModelRestart
 Class for restarting the blackoil well model. More...
 
class  CheckDistributedWellConnections
 Class checking that all connections are on active cells. More...
 
class  CollectDataOnIORank
 
class  CommunicateAboveBelow
 Class to facilitate getting values associated with the above/below perforation. More...
 
class  ComponentName
 
struct  ConnFiltrateData
 
class  ConvergenceOutputConfiguration
 Parse comma separated option strings into a runtime configuration object for whether to output additional convergence information and, if so, what information to output. More...
 
class  ConvergenceOutputThread
 Encapsulating object for thread processing producer's convergence output requests. More...
 
class  ConvergenceReport
 Represents the convergence status of the whole simulator, to make it possible to query and store the reasons for convergence failures. More...
 
class  ConvergenceReportQueue
 Communication channel between thread creating output requests and consumer thread writing those requests to a file. More...
 
struct  CopyGatherScatter
 
class  CpGridVanguard
 Helper class for grid instantiation of ECL file-format using problems. More...
 
class  DamarisWriter
 Collects necessary output values and pass them to Damaris server processes. More...
 
class  DeferredLogger
 
class  DistributeIndexMapping
 
class  DummyGradientCalculator
 This is a "dummy" gradient calculator which does not do anything. More...
 
class  EcfvDiscretization
 
class  EclGenericWriter
 
class  EclWriter
 Collects necessary output values and pass it to opm-output. More...
 
class  ElementIndexHandle
 Communication handle to scatter the global index. More...
 
class  ElementIndexScatterHandle
 Communication handle to scatter the global index. More...
 
class  EquilInitializer
 Computes the initial condition based on the EQUIL keyword from ECL. More...
 
class  FIBlackOilModel
 
class  FlowAluGridVanguard
 
class  FlowBaseVanguard
 Helper class for grid instantiation of ECL file-format using problems. More...
 
class  FlowGenericProblem
 This problem simulates an input file given in the data format used by the commercial ECLiPSE simulator. More...
 
class  FlowGenericVanguard
 
struct  FlowLinearSolverParameters
 This class carries all parameters for the NewtonIterationBlackoilInterleaved class. More...
 
class  FlowMain
 
class  FlowProblem
 This problem simulates an input file given in the data format used by the commercial ECLiPSE simulator. More...
 
struct  FlowsData
 Simple container for FLOWS data. More...
 
class  FlowThresholdPressure
 This class calculates the threshold pressure for grid faces according to the Eclipse Reference Manual. More...
 
class  GasLiftCommon
 
class  GasLiftGroupInfo
 
class  GasLiftSingleWell
 
class  GasLiftSingleWellGeneric
 
class  GasLiftStage2
 
class  GasLiftWellState
 
class  GenericCpGridVanguard
 
class  GenericOutputBlackoilModule
 
class  GenericThresholdPressure
 
class  GenericTracerModel
 
class  GlobalCellIndex
 
class  GlobalPerfContainerFactory
 A factory for creating a global data representation for distributed wells. More...
 
class  GlobalWellInfo
 
class  GroupEconomicLimitsChecker
 
class  GroupState
 
class  HardcodedTimeStepControl
 HardcodedTimeStepControl Input generated from summary file using the ert application: More...
 
class  HDF5File
 Class handling simple output to HDF5. More...
 
class  HDF5Serializer
 Class for (de-)serializing using HDF5. More...
 
class  InterRegFlowMap
 Inter-region flow accumulation maps for all region definition arrays. More...
 
class  InterRegFlowMapSingleFIP
 Form CSR adjacency matrix representation of inter-region flow rate graph provided as a list of connections between regions on local MPI rank. More...
 
struct  IsNumericalAquiferCell
 
struct  IsNumericalAquiferCell< Dune::CpGrid >
 
class  ISTLSolver
 This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np . More...
 
class  ISTLSolverBda
 This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np . More...
 
class  LinearOperatorExtra
 Linear operator wrapper for well model. More...
 
class  LogOutputHelper
 
class  LookUpCartesianData
 
struct  LookUpCellCentroid
 
class  LookUpData
 
class  Main
 
class  MatrixBlock
 
struct  MICPSolutionContainer
 Struct holding MICP extension data. More...
 
class  MixingRateControls
 Class handling mixing rate controls for a FlowProblem. More...
 
class  MultisegmentWell
 
class  MultisegmentWellAssemble
 Class handling assemble of the equation system for MultisegmentWell. More...
 
class  MultisegmentWellContribution
 This class serves to duplicate the functionality of the MultisegmentWell A MultisegmentWell uses C, D and B and performs y -= (C^T * (D^-1 * (B*x))) B and C are matrices, with M rows and N columns, where N is the size of the matrix. More...
 
class  MultisegmentWellEquationAccess
 Class administering assembler access to equation system. More...
 
class  MultisegmentWellEquations
 
class  MultisegmentWellEval
 
class  MultisegmentWellGeneric
 
class  MultisegmentWellPrimaryVariables
 
class  MultisegmentWellSegments
 
class  NewTranBaseProblem
 Provides the defaults for the parameters required by the transmissibility based volume flux calculation. More...
 
class  NewTranExtensiveQuantities
 Provides the ECL flux module. More...
 
struct  NewTranFluxModule
 Specifies a flux module which uses ECL transmissibilities. More...
 
class  NewTranIntensiveQuantities
 Provides the intensive quantities for the ECL flux module. More...
 
class  NonlinearSolver
 A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models. More...
 
class  OutputBlackOilModule
 Output module for the results black oil model writing in ECL binary format. More...
 
class  PackUnPackAquiferData
 
class  PackUnPackBlockData
 
class  PackUnPackCellData
 
class  PackUnpackFlows
 
class  PackUnPackGroupAndNetworkValues
 
class  PackUnpackInterRegFlows
 
class  PackUnPackWBPData
 
class  PackUnPackWellData
 
class  PackUnPackWellTestState
 
class  ParallelEclipseState
 Parallel frontend to the EclipseState. More...
 
class  ParallelFieldPropsManager
 Parallel frontend to the field properties. More...
 
class  ParallelNLDDPartitioningZoltan
 Partition connectivity graph into non-overlapping domains using the Zoltan graph partitioning software package. More...
 
class  ParallelOverlappingILU0
 A two-step version of an overlapping Schwarz preconditioner using one step ILU0 as. More...
 
class  ParallelOverlappingILU0Args
 
class  ParallelPAvgCalculator
 Facility for deriving well-level pressure values from selected block-averaging procedures. More...
 
class  ParallelPAvgDynamicSourceData
 Dynamic source data for block-average pressure calculations. More...
 
class  ParallelRestrictedOverlappingSchwarz
 Block parallel preconditioner. More...
 
class  ParallelWBPCalculation
 Parallel facility for managing the on-rank collection and global distribution of WBPn source values as well as local calculation and distributed reduction of the inferred WBPn report values. More...
 
class  ParallelWellInfo
 Class encapsulating some information about parallel wells. More...
 
class  PerfData
 
struct  PerforationData
 Static data associated with a well perforation. More...
 
struct  PerforationRates
 
struct  PhaseUsage
 
class  PIDAndIterationCountTimeStepControl
 PID controller based adaptive time step control as above that also takes an target iteration into account. More...
 
class  PIDTimeStepControl
 PID controller based adaptive time step control as suggested in: Turek and Kuzmin. More...
 
class  PolyhedralGridVanguard
 Helper class for grid instantiation of ECL file-format using problems. More...
 
struct  PolymerSolutionContainer
 Struct holding polymer extension data. More...
 
class  PreconditionerFactory
 This is an object factory for creating preconditioners. More...
 
class  PressureBhpTransferPolicy
 
class  PressureTransferPolicy
 
class  PropertyTree
 
class  RegionPhasePoreVolAverage
 Facility for calculating volume-weighted average function values over user-defined regions in parallel. More...
 
class  RelativeChangeInterface
 RelativeChangeInterface. More...
 
class  RelpermDiagnostics
 This class is intend to be a relperm diagnostics, to detect wrong input of relperm table and endpoints. More...
 
class  RSTConv
 Class computing RPTRST CONV output. More...
 
class  SegmentState
 
struct  SerializableSim
 Abstract interface for simulator serialization ops. More...
 
class  SimpleIterationCountTimeStepControl
 A simple iteration count based adaptive time step control. More...
 
class  SimulatorFullyImplicitBlackoil
 a simulator for the blackoil model More...
 
struct  SimulatorReport
 
struct  SimulatorReportSingle
 A struct for returning timing data from a simulator to its caller. More...
 
class  SimulatorSerializer
 Class handling simulator serialization. More...
 
class  SimulatorTimer
 
class  SimulatorTimerInterface
 Interface class for SimulatorTimer objects, to be improved. More...
 
class  SingleWellState
 
struct  StandardPreconditioners
 
struct  StandardPreconditioners< Operator, Dune::Amg::SequentialInformation >
 
class  StandardWell
 
class  StandardWellAssemble
 Class handling assemble of the equation system for StandardWell. More...
 
class  StandardWellConnections
 
class  StandardWellEquationAccess
 Class administering assembler access to equation system. More...
 
class  StandardWellEquations
 
class  StandardWellEval
 
class  StandardWellPrimaryVariables
 Class holding primary variables for StandardWell. More...
 
struct  StepReport
 
struct  SubDomain
 Representing a part of a grid, in a way suitable for performing local solves. More...
 
class  SupportsFaceTag
 
class  SupportsFaceTag< Dune::CpGrid >
 
class  TimeStepControlInterface
 TimeStepControlInterface. More...
 
class  TracerModel
 A class which handles tracers as specified in by ECL. More...
 
class  Transmissibility
 
class  VectorVectorDataHandle
 A data handle sending multiple data store in vectors attached to cells. More...
 
class  VFPInjProperties
 
class  VFPProdProperties
 Class which linearly interpolates BHP as a function of rate, tubing head pressure, water fraction, gas fraction, and artificial lift for production VFP tables, and similarly the BHP as a function of the rate and tubing head pressure. More...
 
class  VFPProperties
 A thin wrapper class that holds one VFPProdProperties and one VFPInjProperties object. More...
 
class  VtkTracerModule
 VTK output module for the tracer model's parameters. More...
 
class  WellAssemble
 
class  WellBhpThpCalculator
 Class for computing BHP limits. More...
 
class  WellConnectionAuxiliaryModule
 
class  WellConnectionAuxiliaryModuleGeneric
 
class  WellConstraints
 Class for computing well group constraints. More...
 
class  WellContainer
 
class  WellContributions
 This class serves to eliminate the need to include the WellContributions into the matrix (with –matrix-add-well-contributions=true) for the cusparseSolver or openclSolver. More...
 
class  WellContributionsCuda
 
class  WellContributionsOCL
 
class  WellContributionsRocsparse
 
class  WellConvergence
 
class  WellFilterCake
 Class for well calculations related to filter cakes. More...
 
class  WellGroupConstraints
 Class for computing well group constraints. More...
 
class  WellGroupControls
 Class for computing well group controls. More...
 
class  WellInterface
 
class  WellInterfaceFluidSystem
 
class  WellInterfaceGeneric
 
class  WellInterfaceIndices
 
class  WellModelAsLinearOperator
 
class  WellModelGhostLastMatrixAdapter
 Adapter to combine a matrix and another linear operator into a combined linear operator. More...
 
class  WellModelMatrixAdapter
 Adapter to combine a matrix and another linear operator into a combined linear operator. More...
 
class  WellProdIndexCalculator
 Collect per-connection static information to enable calculating connection-level or well-level productivity index values when incorporating dynamic phase mobilities. More...
 
class  WellState
 The state of a set of wells, tailored for use by the fully implicit blackoil simulator. More...
 
class  WellTest
 Class for performing well tests. More...
 
struct  WGState
 
struct  ZoltanPartitioningControl
 Control parameters for on-rank subdomain partitioning using Zoltan library. More...
 

Typedefs

using IndexMapType = std::vector< int >
 
using IndexMapStorageType = std::vector< IndexMapType >
 
using P2PCommunicatorType = Dune::Point2PointCommunicator< Dune::SimpleMessageBuffer >
 
using MessageBufferType = typename P2PCommunicatorType::MessageBufferType
 
template<std::size_t Size>
using BFV = Dune::BlockVector< Dune::FieldVector< double, Size > >
 
typedef Dune::InverseOperatorResult InverseOperatorResult
 
using CommSeq = Dune::Amg::SequentialInformation
 
template<int Dim>
using OpFSeq = Dune::MatrixAdapter< Dune::BCRSMatrix< Dune::FieldMatrix< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > > >
 
template<int Dim>
using OpBSeq = Dune::MatrixAdapter< Dune::BCRSMatrix< Opm::MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > > >
 
template<int Dim, bool overlap>
using OpW = WellModelMatrixAdapter< Dune::BCRSMatrix< MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, overlap >
 
template<int Dim, bool overlap>
using OpWG = WellModelGhostLastMatrixAdapter< Dune::BCRSMatrix< MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, overlap >
 
using dIter = typename std::vector< double >::iterator
 
using cdIter = typename std::vector< double >::const_iterator
 
using FluidSys = BlackOilFluidSystem< double, BlackOilDefaultIndexTraits >
 
using RegionId = int
 

Enumerations

enum class  NonlinearRelaxType { Dampen , SOR }
 
enum class  DomainSolveApproach { Jacobi , GaussSeidel }
 Solver approach for NLDD.
 
enum class  DomainOrderingMeasure { AveragePressure , MaxPressure , Residual }
 Measure to use for domain ordering.
 
enum class  ColoringType { SYMMETRIC , LOWER , UPPER }
 Specify coloring type. More...
 
enum class  MILU_VARIANT {
  ILU = 0 , MILU_1 = 1 , MILU_2 = 2 , MILU_3 = 3 ,
  MILU_4 = 4
}
 
enum class  TimeStepControlType { SimpleIterationCount , PID , PIDAndIterationCount , HardCodedTimeStep }
 
enum class  FileOutputMode { OUTPUT_NONE = 0 , OUTPUT_LOG_ONLY = 1 , OUTPUT_ALL = 3 }
 

Functions

PhaseUsage phaseUsage (const Phases &phases)
 Determine the active phases.
 
PhaseUsage phaseUsageFromDeck (const EclipseState &eclipseState)
 Looks at presence of WATER, OIL and GAS keywords in state object to determine active phases.
 
PhaseUsage phaseUsageFromDeck (const Deck &deck)
 Looks at presence of WATER, OIL and GAS keywords in deck to determine active phases.
 
void printPRTHeader (const int nprocs, const int nthreads, const std::string &parameters, std::string_view moduleVersion, std::string_view compileTimestamp)
 
void printFlowBanner (int nprocs, int nthreads, std::string_view moduleVersionName)
 
void printFlowTrailer (int nprocs, int nthreads, const double total_setup_time, const double deck_read_time, const SimulatorReport &report, const SimulatorReportSingle &localsolves_report)
 
int eclPositionalParameter (Dune::ParameterTree &tree, std::set< std::string > &seenParams, std::string &errorMsg, const char **argv, int paramIdx)
 
template<>
void FlowGenericVanguard::serializeOp< Serializer< Serialization::MemPacker > > (Serializer< Serialization::MemPacker > &serializer)
 
template<class TypeTag >
int flowMain (int argc, char **argv, bool outputCout, bool outputFiles)
 
template<class GridView , class Element >
std::pair< std::vector< int >, int > partitionCells (const std::string &method, const int num_local_domains, const GridView &grid_view, const std::vector< Well > &wells, const ZoltanPartitioningControl< Element > &zoltan_ctrl)
 Partition rank's interior cells.
 
std::pair< std::vector< int >, int > partitionCellsFromFile (const std::string &filename, const int num_cells)
 Read a partitioning from file, assumed to contain one number per cell, its partition number.
 
std::pair< std::vector< int >, int > partitionCellsSimple (const int num_cells, const int num_domains)
 Trivially simple partitioner assigning partitions en bloc, consecutively by cell index.
 
DomainOrderingMeasure domainOrderingMeasureFromString (const std::string_view measure)
 
template<class BridgeMatrix >
int replaceZeroDiagonal (BridgeMatrix &mat, std::vector< typename BridgeMatrix::size_type > &diag_indices)
 
template<class BridgeMatrix >
void checkMemoryContiguous (const BridgeMatrix &mat)
 
 INSTANTIATE_BDA_FUNCTIONS (1)
 
 INSTANTIATE_BDA_FUNCTIONS (2)
 
 INSTANTIATE_BDA_FUNCTIONS (3)
 
 INSTANTIATE_BDA_FUNCTIONS (4)
 
 INSTANTIATE_BDA_FUNCTIONS (5)
 
 INSTANTIATE_BDA_FUNCTIONS (6)
 
template<class Graph >
std::tuple< std::vector< int >, int, std::vector< std::size_t > > colorVerticesWelshPowell (const Graph &graph)
 Color the vertices of graph.
 
template<class Graph >
std::vector< std::size_t > reorderVerticesPreserving (const std::vector< int > &colors, int noColors, const std::vector< std::size_t > &verticesPerColor, const Graph &graph)
 ! Reorder colored graph preserving order of vertices with the same color.
 
template<class Graph >
std::vector< std::size_t > reorderVerticesSpheres (const std::vector< int > &colors, int noColors, const std::vector< std::size_t > &verticesPerColor, const Graph &graph, typename Graph::VertexDescriptor root)
 ! Reorder Vetrices in spheres
 
template<class M >
Opm::SparseTable< std::size_t > getMatrixRowColoring (const M &matrix, ColoringType coloringType)
 This coloring algorithm interprets the sparsity structure of a matrix as a graph.
 
MILU_VARIANT convertString2Milu (const std::string &milu)
 
template<class T1 >
auto accumulateMaskedValues (const T1 &container, const std::vector< double > *maskContainer) -> decltype(container[0] *(*maskContainer)[0])
 Accumulates entries masked with 1.
 
template<typename C >
auto setUseFixedOrder (C criterion, bool booleanValue) -> decltype(criterion.setUseFixedOrder(booleanValue))
 
template<typename C >
void setUseFixedOrder (C,...)
 
template<class Communication >
void extendCommunicatorWithWells (const Communication &comm, std::shared_ptr< Communication > &commRW, const int nw)
 
template std::string PropertyTree::get< std::string > (const std::string &key) const
 
template std::string PropertyTree::get< std::string > (const std::string &key, const std::string &defValue) const
 
template void PropertyTree::put< std::string > (const std::string &key, const std::string &value)
 
PropertyTree setupPropertyTree (FlowLinearSolverParameters p, bool linearSolverMaxIterSet, bool linearSolverReductionSet)
 Set up a property tree intended for FlexibleSolver by either reading the tree from a JSON file or creating a tree giving the default solver and preconditioner.
 
std::string getSolverString (const FlowLinearSolverParameters &p)
 
PropertyTree setupCPRW (const std::string &, const FlowLinearSolverParameters &p)
 
PropertyTree setupCPR (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupAMG (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupILU (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupDILU (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupUMFPack (const std::string &conf, const FlowLinearSolverParameters &p)
 
std::string to_string (const ConvergenceReport::ReservoirFailure::Type t)
 
std::string to_string (const ConvergenceReport::Severity s)
 
std::string to_string (const ConvergenceReport::WellFailure::Type t)
 
std::string to_string (const ConvergenceReport::WellFailure &wf)
 
template<class TypeTag >
void registerEclTimeSteppingParameters ()
 
ConvergenceReport gatherConvergenceReport (const ConvergenceReport &local_report, Parallel::Communication communicator)
 Create a global convergence report combining local (per-process) reports.
 
Opm::DeferredLogger gatherDeferredLogger (const Opm::DeferredLogger &local_deferredlogger, Parallel::Communication communicator)
 Create a global log combining local logs.
 
std::string moduleVersionName ()
 Return the version name of the module, for example "2015.10" (for a release branch) or "2016.04-pre" (for a master branch).
 
std::string moduleVersionHash ()
 Return a (short) git hash for the current version of the module if this is a Release build (as defined by CMake), or "debug" for Debug builds.
 
std::string moduleVersion ()
 Return a string containing both the name and hash, if N is the name and H is the hash it will be "N (H)".
 
std::string compileTimestamp ()
 Return a string "dd-mm-yyyy at HH::MM::SS hrs" which is the time the binary was compiled.
 
RestartValue loadParallelRestart (const EclipseIO *eclIO, Action::State &actionState, SummaryState &summaryState, const std::vector< Opm::RestartKey > &solutionKeys, const std::vector< Opm::RestartKey > &extraKeys, Parallel::Communication comm)
 
RestartValue loadParallelRestart (const EclipseIO *eclIO, Action::State &actionState, SummaryState &summaryState, const std::vector< RestartKey > &solutionKeys, const std::vector< RestartKey > &extraKeys, Parallel::Communication comm)
 
void eclStateBroadcast (Parallel::Communication comm, EclipseState &eclState, Schedule &schedule, SummaryConfig &summaryConfig, UDQState &udqState, Action::State &actionState, WellTestState &wtestState)
 Broadcasts an eclipse state from root node in parallel runs.
 
template<class T >
void eclBroadcast (Parallel::Communication comm, T &data)
 
template void eclBroadcast (Parallel::Communication, TransMult &)
 
template void eclBroadcast (Parallel::Communication, Schedule &)
 
template void eclBroadcast (Parallel::Communication, SummaryConfig &)
 
void ensureOutputDirExists (const std::string &cmdline_output_dir)
 
void prepareResultOutputDirectory (const std::string &baseName, const std::filesystem::path &outputDir)
 
std::unique_ptr< ParseContext > setupParseContext (const bool exitOnAllErrors)
 
FileOutputMode setupLogging (Parallel::Communication &comm, const std::string &deck_filename, const std::string &cmdline_output_dir, const std::string &cmdline_output, bool output_cout_, const std::string &stdout_log_id, const bool allRanksDbgLog)
 
void readDeck (Parallel::Communication comm, const std::string &deckFilename, std::shared_ptr< EclipseState > &eclipseState, std::shared_ptr< Schedule > &schedule, std::unique_ptr< UDQState > &udqState, std::unique_ptr< Action::State > &actionState, std::unique_ptr< WellTestState > &wtestState, std::shared_ptr< SummaryConfig > &summaryConfig, std::shared_ptr< Python > python, const std::string &parsingStrictness, bool initFromRestart, bool checkDeck, const std::optional< int > &outputInterval)
 Reads the deck and creates all necessary objects if needed.
 
void verifyValidCellGeometry (Parallel::Communication comm, const EclipseState &eclipseState)
 
std::map< std::string, std::string > setupZoltanParams (const std::string &conf)
 
bool has_control (int controls, Group::InjectionCMode cmode)
 
std::string simTimeToString (const std::time_t start_time, const double sim_time)
 
bool operator< (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator== (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator!= (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator< (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator< (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
bool operator== (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator== (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
bool operator!= (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator!= (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
std::vector< double > connectionProdIndStandard (const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
 Compute connection-level productivity index values for all connections in a well.
 
double wellProdIndStandard (const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
 Compute well-level productivity index value.
 

Variables

std::optional< std::function< std::vector< int >(const Dune::CpGrid &)> > externalLoadBalancer
 optional functor returning external load balancing information
 

Detailed Description

This file contains a set of helper functions used by VFPProd / VFPInj.

Enumeration Type Documentation

◆ ColoringType

enum class Opm::ColoringType
strong

Specify coloring type.

The coloring types have been implemented initially to parallelize DILU preconditioner and parallel sparse triangular solves. Symmetric coloring will create a dependency from row i to j if both element A_ij and A_ji exists. Lower coloring creates a dependency from row i to j (where i < j) if A_ij is nonzero. Upper coloring creates a dependecy from row i to j (where i > j) if A_ij is nonzero.

◆ FileOutputMode

enum class Opm::FileOutputMode
strong
Enumerator
OUTPUT_NONE 

No file output.

OUTPUT_LOG_ONLY 

Output only to log files, no ECLIPSE output.

OUTPUT_ALL 

Output to all files.

◆ MILU_VARIANT

enum class Opm::MILU_VARIANT
strong
Enumerator
ILU 

Do not perform modified ILU.

MILU_1 

$U_{ii} = U_{ii} +$ sum(dropped entries)

MILU_2 

$U_{ii} = U_{ii} + sign(U_{ii}) * $ sum(dropped entries)

MILU_3 

$U_{ii} = U_{ii} sign(U_{ii}) * $ sum(|dropped entries|)

MILU_4 

$U_{ii} = U_{ii} + (U_{ii}>0?1:0) * $ sum(dropped entries)

Function Documentation

◆ accumulateMaskedValues()

template<class T1 >
auto Opm::accumulateMaskedValues ( const T1 &  container,
const std::vector< double > *  maskContainer 
) -> decltype(container[0] *(*maskContainer)[0])

Accumulates entries masked with 1.

Parameters
containerThe container whose values to accumulate.
maskContainernull pointer or a pointer to a container with entries 0 and 1. Only values at indices with a 1 stored will be accumulated. If null then all values will be accumulated
Returns
the summ of all entries that should be represented.

◆ colorVerticesWelshPowell()

template<class Graph >
std::tuple< std::vector< int >, int, std::vector< std::size_t > > Opm::colorVerticesWelshPowell ( const Graph &  graph)

Color the vertices of graph.

It uses the algorithm of Welsh and Powell for this.

Parameters
graphThe graph to color. Must adhere to the graph interface of dune-istl.
Returns
A pair of a vector with the colors of the vertices and the number of colors assigned

◆ connectionProdIndStandard()

std::vector< double > Opm::connectionProdIndStandard ( const WellProdIndexCalculator wellPICalc,
const std::vector< double > &  connMobility 
)

Compute connection-level productivity index values for all connections in a well.

Parameters
[in]wellPICalcProductivity index calculator.
[in]connMobilityPhase mobility for each connection. Typically derived from dynamic flow state conditions in cells intersected by well's connections. Must have one value for each
wellPICalc.numConnections()
well connection.
Returns
Connection-level steady-state productivity index values for all connections.

◆ eclStateBroadcast()

void Opm::eclStateBroadcast ( Parallel::Communication  comm,
EclipseState &  eclState,
Schedule &  schedule,
SummaryConfig &  summaryConfig,
UDQState &  udqState,
Action::State &  actionState,
WellTestState &  wtestState 
)

Broadcasts an eclipse state from root node in parallel runs.

!

Parameters
eclStateEclipseState to broadcast !
scheduleSchedule to broadcast !
summaryConfigSummaryConfig to broadcast

◆ getMatrixRowColoring()

template<class M >
Opm::SparseTable< std::size_t > Opm::getMatrixRowColoring ( const M &  matrix,
ColoringType  coloringType 
)

This coloring algorithm interprets the sparsity structure of a matrix as a graph.

Each row is given a color or level where all the rows in the same level only have dependencies from lower levels. The level computation is done with dynamic programming, and to improve caching the rows in the same level stay in matrix order.

Given a matrix and dependecy type, returns a SparseTable grouping the rows by which can be executed in parallel without breaking dependencies

Parameters
matrixA dune sparse matrix
coloringTypeThe coloringtype determines what constitutes a dependency, see ColoringType definition above
Returns
SparseTable with rows of the matrix grouped into least number of groups while dependencies only come from groups with lower index

◆ moduleVersion()

std::string Opm::moduleVersion ( )

Return a string containing both the name and hash, if N is the name and H is the hash it will be "N (H)".

For example "2016.04-pre (f15be17)" or "2016.04-pre (debug)".

◆ partitionCells()

template<class GridView , class Element >
std::pair< std::vector< int >, int > Opm::partitionCells ( const std::string &  method,
const int  num_local_domains,
const GridView &  grid_view,
const std::vector< Well > &  wells,
const ZoltanPartitioningControl< Element > &  zoltan_ctrl 
)

Partition rank's interior cells.

Parameters
[in]methodPartitioning method. Supported values are "zoltan", "simple", or a filename with the extension ".partition". The "zoltan" method invokes the Zoltan graph partitioning package and requires both MPI and an active Zoltan library. The "simple" method uses a one-dimensional load-balanced approach, and the filename method will read a precomputed partition vector from the named file.
[in]num_local_domainsNumber of subdomains. Not used when explicit partitioning is input from a file.
[in]commMPI Communication object for exchanging globally unique cell IDs and for communication within the Zoltan library. Not used unless
method == "zoltan"
.
[in]grid_viewView of rank's cells, both interior and overlap cells. Not used unless
method == "zoltan"
.
[in]wellsCollection of simulation model wells. Not used unless
method == "zoltan"
.
[in]zoltan_ctrlControl parameters for local Zoltan-based partitioning. Not used unless
method == "zoltan"
.
Returns
Partition vector–subdomain ID for each cell in grid_view traversal order for its interior cells–and the number of subdomains on current rank.

◆ partitionCellsFromFile()

std::pair< std::vector< int >, int > Opm::partitionCellsFromFile ( const std::string &  filename,
const int  num_cells 
)

Read a partitioning from file, assumed to contain one number per cell, its partition number.

Returns
pair containing a partition vector (partition number for each cell), and the number of partitions.

◆ partitionCellsSimple()

std::pair< std::vector< int >, int > Opm::partitionCellsSimple ( const int  num_cells,
const int  num_domains 
)

Trivially simple partitioner assigning partitions en bloc, consecutively by cell index.

Returns
pair containing a partition vector (partition number for each cell), and the number of partitions.

◆ readDeck()

void Opm::readDeck ( Parallel::Communication  comm,
const std::string &  deckFilename,
std::shared_ptr< EclipseState > &  eclipseState,
std::shared_ptr< Schedule > &  schedule,
std::unique_ptr< UDQState > &  udqState,
std::unique_ptr< Action::State > &  actionState,
std::unique_ptr< WellTestState > &  wtestState,
std::shared_ptr< SummaryConfig > &  summaryConfig,
std::shared_ptr< Python >  python,
const std::string &  parsingStrictness,
bool  initFromRestart,
bool  checkDeck,
const std::optional< int > &  outputInterval 
)

Reads the deck and creates all necessary objects if needed.

If pointers already contains objects then they are used otherwise they are created and can be used outside later.

◆ setupPropertyTree()

PropertyTree Opm::setupPropertyTree ( FlowLinearSolverParameters  p,
bool  linearSolverMaxIterSet,
bool  linearSolverReductionSet 
)

Set up a property tree intended for FlexibleSolver by either reading the tree from a JSON file or creating a tree giving the default solver and preconditioner.

If the latter, the parameters –linear-solver-reduction, –linear-solver-maxiter and –linear-solver-verbosity are used, but if reading from file the data in the JSON file will override any other options.

◆ wellProdIndStandard()

double Opm::wellProdIndStandard ( const WellProdIndexCalculator wellPICalc,
const std::vector< double > &  connMobility 
)

Compute well-level productivity index value.

Parameters
[in]wellPICalcProductivity index calculator.
[in]connMobilityPhase mobility for each connection. Typically derived from dynamic flow state conditions in cells intersected by well's connections. Must have one value for each
wellPICalc.numConnections()
well connection.
Returns
Well-level steady-state productivity index value.

Variable Documentation

◆ externalLoadBalancer

std::optional< std::function< std::vector< int >(const Dune::CpGrid &)> > Opm::externalLoadBalancer

optional functor returning external load balancing information

If it is set then this will be used during loadbalance.