Opm Namespace Reference

Namespaces

 Benchmark3
 
 BLAS_LAPACK
 
 cfl_calculator
 
 EulerUpstreamResidualDetails
 
 GIE
 
 ImplicitCapillarityDetails
 
 ImplicitTransportDefault
 

Classes

struct  AllCellsLayout
 General cell layout. More...
 
struct  AllFluidData
 
struct  AllFluidStates
 Multiple fluid states for a black oil model. More...
 
struct  Anisotropic
 Traits for upscaling with anisotropic relperm (tensorial) input. More...
 
class  BasicBoundaryConditions
 
class  BasicInitialization
 Initialize basic cases. More...
 
class  BCBase
 A class for building boundary conditions in a uniform way. More...
 
class  BlackoilCo2PVT
 
class  BlackoilDefs
 
class  BlackoilFluid
 
class  BlackoilInitialization
 Base class for initialization codes. More...
 
class  BlackoilPVT
 
class  BlackoilSimulator
 
class  BlackoilWells
 
struct  BoundaryFaceInfo
 
struct  CpGridCellMapper
 A mapper for Dune::CpGrid cells only. More...
 
class  DummyVec
 
class  EulerUpstream
 
class  EulerUpstreamImplicit
 
class  EulerUpstreamResidual
 
struct  Explicit
 Traits for explicit transport. More...
 
class  ExplicitCompositionalTransport
 
struct  FaceFluidData
 
class  FlowBC
 A class for representing a flow boundary condition. More...
 
class  FluidMatrixInteractionBlackoil
 Capillary pressures and relative permeabilities for a black oil system. More...
 
class  FluidMatrixInteractionBlackoilParams
 
struct  FluidStateBlackoil
 Fluid state for a black oil model. More...
 
struct  GICellMapper
 Mapper for general grids. More...
 
struct  GICellMapper< Dune::CpGrid >
 
class  GridInterfaceEuler
 
class  ImmutableSharedData
 FullMatrix StoragePolicy which provides immutable object sharing semantics. More...
 
struct  ImplicitCap
 Traits for implicit transport. More...
 
class  ImplicitCapillarity
 
class  IncompFlowSolverHybrid
 Solve mixed formulation of incompressible flow modelled by Darcy's law

\[@f{aligned}{ v &= -K\lamda(\nabla p + \rho\vec{g}), \\ \nabla\cdot v &= q. \end

] The solver is based on a hybrid discretization scheme which yields a system of linear equations of the form

\[@f{bmatrix}{ B & C & D \\ C^{T} & 0 & 0 \\ D^{T} & 0 & 0 }\, @f{bmatrix}{v \\ -p \\ \pi\end

=

\begin{bmatrix}f \\ g \\ h\end{bmatrix}

] where $v$ represents the interface fluxes for each interface for each cell, $p$ are the cell pressures and $\pi$ are the interface pressures. More...

 
struct  Isotropic
 Traits policies for isotropic (scalar) relperm. More...
 
class  LinearSolverBICGSTAB
 
class  LinearSolverISTLAMG
 
struct  MatchSaturatedVolumeFunctor
 
class  MaxNormDune
 
class  MaxNormStl
 
class  MimeticIPAnisoRelpermEvaluator
 
class  MimeticIPEvaluator
 
class  MiscibilityDead
 
class  MiscibilityLiveGas
 
class  MiscibilityLiveOil
 
class  MiscibilityProps
 
class  MiscibilityWater
 
class  OwnData
 FullMatrix StoragePolicy which provides object owning semantics. More...
 
class  PeriodicConditionHandler
 
class  ReservoirPropertyCapillary
 A property class for incompressible two-phase flow. More...
 
class  ReservoirPropertyCapillaryAnisotropicRelperm
 A property class for incompressible two-phase flow. More...
 
class  ReservoirPropertyCommon
 A property class for incompressible two-phase flow. More...
 
class  ReservoirPropertyFixedMobility
 
class  ReservoirPropertyTracerFluid
 
class  ReservoirState
 
class  Rock
 A property class for porous media rock. More...
 
class  RockAnisotropicRelperm
 
class  RockJfunc
 
class  SatBC
 A class for representing a saturation boundary condition. More...
 
struct  ScalarMobility
 A wrapper for a scalar. More...
 
class  SharedData
 FullMatrix StoragePolicy which provides object sharing semantics. More...
 
class  SimulatorBase
 
class  SimulatorTester
 
class  SimulatorTesterFlexibleBC
 
struct  SimulatorTraits
 Combines the component traits into a single, parametrized type. More...
 
class  SPE9Initialization
 Initialize SPE9 type case. More...
 
class  SurfvolBC
 A class for representing a surface volume boundary condition. More...
 
struct  TensorMobility
 A wrapper for a tensor. More...
 
class  TpfaCompressible
 
class  TransportSource
 
class  TwophaseFluidWrapper
 
class  Wells
 

Typedefs

typedef BlackoilCo2PVT BlackoilPVT
 
typedef FullMatrix< double,
OwnData, COrdering > 
OwnCMatrix
 Convenience typedefs for C-ordered. More...
 
typedef FullMatrix< double,
SharedData, COrdering > 
SharedCMatrix
 
typedef const FullMatrix
< double, ImmutableSharedData,
COrdering > 
ImmutableCMatrix
 
typedef FullMatrix< double,
OwnData, FortranOrdering > 
OwnFortranMatrix
 Convenience typedefs for Fortran-ordered. More...
 
typedef FullMatrix< double,
SharedData, FortranOrdering > 
SharedFortranMatrix
 
typedef const FullMatrix
< double, ImmutableSharedData,
FortranOrdering > 
ImmutableFortranMatrix
 

Enumerations

enum  PermeabilityKind {
  ScalarPerm, DiagonalPerm, TensorPerm, None,
  Invalid
}
 Enum for the kind of permeability field originally retrieved. More...
 

Functions

template<typename charT , class traits , typename T >
std::basic_ostream< charT,
traits > & 
operator<< (std::basic_ostream< charT, traits > &os, const BCBase< T > &bc)
 Stream insertion for BCBase. More...
 
template<typename charT , class traits >
std::basic_ostream< charT,
traits > & 
operator<< (std::basic_ostream< charT, traits > &os, const PeriodicConditionHandler &pch)
 
template<typename charT , class traits , bool F, bool S>
std::basic_ostream< charT,
traits > & 
operator<< (std::basic_ostream< charT, traits > &os, const BasicBoundaryConditions< F, S > &bcs)
 
bool match (std::vector< BoundaryFaceInfo > &bfaces, int face, int lower, int upper)
 Find a match (periodic partner) for the given face. More...
 
template<class GridView >
void findPeriodicPartners (std::vector< BoundaryFaceInfo > &bfinfo, std::array< double, 6 > &side_areas, const GridView &g, const std::array< bool, 2 *GridView::dimension > &is_periodic, double spatial_tolerance=1e-6)
 Common implementation for the various createPeriodic functions. More...
 
template<class Arr >
void append_transport_source (int c, double p, double v, const Arr &s, TransportSource &src)
 
void compute_porevolume (const UnstructuredGrid *g, const Rock &rock, std::vector< double > &porevol)
 
template<class Matrix >
void zero (Matrix &A)
 Zero-fill a. More...
 
template<class Matrix >
void eye (Matrix &A)
 Make an identity. More...
 
template<class Matrix >
Matrix::value_type trace (const Matrix &A)
 Compute matrix trace (i.e., sum(diag(A))). More...
 
template<class Matrix , int rows>
Dune::FieldVector< typename
Matrix::value_type, rows > 
prod (const Matrix &A, const Dune::FieldVector< typename Matrix::value_type, rows > &x)
 Matrix applied to a vector. More...
 
template<class Matrix1 , class Matrix2 , class MutableMatrix >
void prod (const Matrix1 &A, const Matrix2 &B, MutableMatrix &C)
 Compute C = AB. C must not overlap with A or B. More...
 
template<typename T , template< typename > class StoragePolicy>
int orthogonalizeColumns (FullMatrix< T, StoragePolicy, FortranOrdering > &A)
 Construct orthonormal basis for matrix range (i.e., column space). Based on a QR factorization of the matrix. More...
 
template<typename T , template< typename > class StoragePolicy, class OrderingPolicy >
int invert (FullMatrix< T, StoragePolicy, OrderingPolicy > &A)
 Matrix inversion, $A \leftarrow A^{-1} $. More...
 
template<typename T , template< typename > class StoragePolicy>
void symmetricUpdate (const T &a1, const FullMatrix< T, StoragePolicy, FortranOrdering > &A, const T &a2, FullMatrix< T, StoragePolicy, FortranOrdering > &C)
 Symmetric, rank $ k $ update of symmetric matrix. Specifically, $ C \leftarrow a_1 AA^{\mathsf{T}} + a_2 C $. More...
 
template<typename T , template< typename > class StoragePolicy>
void symmetricUpdate (const FullMatrix< T, StoragePolicy, FortranOrdering > &A, FullMatrix< T, StoragePolicy, FortranOrdering > &B)
 
template<typename T , template< typename > class SP>
void vecMulAdd_N (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const std::vector< T > &x, const T &a2, std::vector< T > &y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void vecMulAdd_N (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void vecMulAdd_T (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const std::vector< T > &x, const T &a2, std::vector< T > &y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void vecMulAdd_T (const T &a1, const FullMatrix< T, SP, FortranOrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y $. More...
 
template<typename T , template< typename > class SP>
void vecMulAdd_N (const T &a1, const FullMatrix< T, SP, COrdering > &A, const T *x, const T &a2, T *y)
 GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. Overload for C-ordered FullMatrix type. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void matMulAdd_NN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void matMulAdd_NT (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB^{\mathsf{T}} + a_2C $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void matMulAdd_TN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, FortranOrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1A^{\mathsf{T}}B + a_2C $. More...
 
template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void matMulAdd_NN (const T &a1, const FullMatrix< T, SP1, FortranOrdering > &A, const FullMatrix< T, SP2, COrdering > &B, const T &a2, FullMatrix< T, SP3, FortranOrdering > &C)
 GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $. Overload for C-ordered matrix $ B $. More...
 
template<class charT , class traits , typename T , template< typename > class SP, class OP >
std::basic_ostream< charT,
traits > & 
operator<< (std::basic_ostream< charT, traits > &os, const FullMatrix< T, SP, OP > &A)
 Stream output operator for. More...
 
template<typename M >
inverse2x2 (const M &m)
 
template<typename M >
matprod (const M &m1, const M &m2)
 
template<typename M >
inverse3x3 (const M &m)
 
template<class BCs >
void storeFlowCond (BCs &bcs, const std::vector< BoundaryFaceInfo > &bfinfo, const std::array< FlowBC, 6 > &fconditions, const std::array< double, 6 > &side_areas)
 
template<class BCs >
void storeSatCond (BCs &bcs, const std::vector< BoundaryFaceInfo > &bfinfo, const std::array< SatBC, 6 > &sconditions)
 
template<class BC >
std::array< bool, 6 > extractPeriodic (const std::array< BC, 6 > &bcs)
 
template<class BCs , class GridInterface >
void createPeriodic (BCs &fbcs, const GridInterface &g, const std::array< FlowBC, 2 *GridInterface::Dimension > &fconditions, const std::array< SatBC, 2 *GridInterface::Dimension > &sconditions, double spatial_tolerance=1e-6)
 Makes a boundary condition object representing periodic boundary conditions in any cartesian directions. The grid interface needs to export boundary ids that are unique for each boundary face for this to be possible. More...
 
template<class BCs , class GridInterface >
void createPeriodic (BCs &fbcs, const GridInterface &g, const std::array< FlowBC, 2 *GridInterface::Dimension > &fconditions, double spatial_tolerance=1e-6)
 
template<class BCs , class GridInterface >
void createPeriodic (BCs &fbcs, const GridInterface &g, const std::array< SatBC, 2 *GridInterface::Dimension > &sconditions, double spatial_tolerance=1e-6)
 
template<class BCs , class GridInterface >
void createPeriodicImpl (BCs &fbcs, std::vector< BoundaryFaceInfo > &bfinfo, std::array< double, 6 > &side_areas, const GridInterface &g, const std::array< bool, 2 *GridInterface::Dimension > &is_periodic, double spatial_tolerance=1e-6)
 Common implementation for the various createPeriodic functions. More...
 
template<class BCs , class GridInterface >
void createLinear (BCs &fbcs, const GridInterface &g, const double pdrop, const int pddir, const double bdy_sat, const bool twodim_hack=false, const double spatial_tolerance=1e-6)
 Makes a boundary condition object representing linear boundary conditions in any cartesian direction. The grid interface needs to export boundary ids that are unique for each boundary face for this to be possible. More...
 
template<class GridInterface , class BCs >
void setupBoundaryConditions (const Opm::parameter::ParameterGroup &param, const GridInterface &g, BCs &bcs)
 Setup boundary conditions for a simulation. It is assumed that the boundary ids are 1-6, similar to cartesian case/Yaspgrid, unless periodic, in which case we assume unique boundary ids. More...
 
template<class GridInterface , class BCs >
void setupUpscalingConditions (const GridInterface &g, int bct, int pddir, double pdrop, double bdy_sat, bool twodim_hack, BCs &bcs)
 
template<class GridInterface , class BCs >
void setupRegionBasedConditions (const Opm::parameter::ParameterGroup &param, const GridInterface &g, BCs &bcs)
 
template<class RP >
bool useJ ()
 Helper for determining whether we should. More...
 
template<>
bool useJ< ReservoirPropertyCapillary< 3 > > ()
 
template<template< int > class ResProp>
void setupGridAndProps (const Opm::parameter::ParameterGroup &param, Dune::CpGrid &grid, ResProp< 3 > &res_prop)
 
template<template< int > class ResProp>
void setupGridAndPropsEclipse (Opm::DeckConstPtr deck, bool periodic_extension, bool turn_normals, bool clip_z, bool unique_bids, double perm_threshold, const std::string &rock_list, bool use_jfunction_scaling, double sigma, double theta, Dune::CpGrid &grid, ResProp< 3 > &res_prop)
 
template<template< int > class ResProp>
void setupGridAndProps (const Opm::parameter::ParameterGroup &param, Dune::SGrid< 3, 3 > &grid, ResProp< 3 > &res_prop)
 
template<class GridInterface , class FlowSol >
void estimateCellVelocity (std::vector< typename GridInterface::Vector > &cell_velocity, const GridInterface &ginterf, const FlowSol &flow_solution)
 Estimates a scalar cell velocity from outgoing fluxes. More...
 
template<class GridInterface >
void estimateCellVelocitySimpleInterface (std::vector< typename GridInterface::Vector > &cell_velocity, const GridInterface &grid, const std::vector< double > &face_flux)
 Estimates a scalar cell velocity from face fluxes. More...
 
template<class GridInterface , class FlowSol >
void estimateCellVelocity (std::vector< typename GridInterface::Vector > &cell_velocity, const GridInterface &ginterf, const FlowSol &flow_solution, const std::vector< int > &partition, const int my_partition)
 Estimates a scalar cell velocity from outgoing fluxes. More...
 
template<class ReservoirProperty >
void computePhaseVelocities (std::vector< Dune::FieldVector< double, 3 > > &phase_velocity_water, std::vector< Dune::FieldVector< double, 3 > > &phase_velocity_oil, const ReservoirProperty &res_prop, const std::vector< double > &saturation, const std::vector< Dune::FieldVector< double, 3 > > &cell_velocity)
 
template<class GridInterface , class FlowSol >
void getCellPressure (std::vector< double > &cell_pressure, const GridInterface &ginterf, const FlowSol &flow_solution)
 
template<class GridInterface , class FlowSol >
void getCellPressure (std::vector< double > &cell_pressure, const GridInterface &ginterf, const FlowSol &flow_solution, const std::vector< int > &partition, const int my_partition)
 
template<class ReservoirProperties >
void computeCapPressure (std::vector< double > &cap_pressure, const ReservoirProperties &rp, const std::vector< double > &sat)
 Computes the capillary pressure in each cell from the cell saturations. More...
 
template<class GridInterface , class ReservoirProperties , class FlowSol >
void writeVtkOutput (const GridInterface &ginterf, const ReservoirProperties &rp, const FlowSol &flowsol, const std::vector< double > &saturation, const std::string &filename)
 
void writeField (const std::vector< double > &field, const std::string &filename)
 
template<class GridInterface , class ReservoirProperties >
std::pair< double, double > poreSatVolumes (const GridInterface &grid, const ReservoirProperties &rp, const std::vector< double > &sat)
 

Detailed Description

Class for immiscible dead oil and dry gas. Detailed description.

Class for miscible wet gas. Detailed description.

Class for miscible live oil. Detailed description.

Base class for properties of fluids and rocks. Detailed description.

Inverting small matrices. Inverting 2x2 and 3x3 matrices. Not meant to extend to large systems, but to satisfy a need to invert small matrices.

Typedef Documentation

typedef const FullMatrix<double, ImmutableSharedData, COrdering> Opm::ImmutableCMatrix
typedef const FullMatrix<double, ImmutableSharedData, FortranOrdering> Opm::ImmutableFortranMatrix
typedef FullMatrix<double, OwnData, COrdering> Opm::OwnCMatrix

Convenience typedefs for C-ordered.

FullMatrix

types with 'Owning', 'Shared' and 'Immutable Shared' matrix element storage semantics.

typedef FullMatrix<double, OwnData, FortranOrdering> Opm::OwnFortranMatrix

Convenience typedefs for Fortran-ordered.

FullMatrix

types with 'Owning', 'Shared' and 'Immutable Shared' matrix element storage semantics.

typedef FullMatrix<double, SharedData, COrdering> Opm::SharedCMatrix
typedef FullMatrix<double, SharedData, FortranOrdering> Opm::SharedFortranMatrix

Enumeration Type Documentation

Enum for the kind of permeability field originally retrieved.

Enumerator
ScalarPerm 
DiagonalPerm 
TensorPerm 
None 
Invalid 

Function Documentation

template<class Arr >
void Opm::append_transport_source ( int  c,
double  p,
double  v,
const Arr &  s,
TransportSource &  src 
)
void Opm::compute_porevolume ( const UnstructuredGrid *  g,
const Rock &  rock,
std::vector< double > &  porevol 
)
template<class ReservoirProperties >
void Opm::computeCapPressure ( std::vector< double > &  cap_pressure,
const ReservoirProperties &  rp,
const std::vector< double > &  sat 
)

Computes the capillary pressure in each cell from the cell saturations.

Template Parameters
ReservoirPropertiesthe type of reservoir property object
Parameters
cap_pressure[out] the capillary pressure in each cell
rpthe reservoir property object
satthe cell saturations

Referenced by writeVtkOutput().

template<class ReservoirProperty >
void Opm::computePhaseVelocities ( std::vector< Dune::FieldVector< double, 3 > > &  phase_velocity_water,
std::vector< Dune::FieldVector< double, 3 > > &  phase_velocity_oil,
const ReservoirProperty &  res_prop,
const std::vector< double > &  saturation,
const std::vector< Dune::FieldVector< double, 3 > > &  cell_velocity 
)

Referenced by writeVtkOutput().

template<class BCs , class GridInterface >
void Opm::createLinear ( BCs &  fbcs,
const GridInterface &  g,
const double  pdrop,
const int  pddir,
const double  bdy_sat,
const bool  twodim_hack = false,
const double  spatial_tolerance = 1e-6 
)

Makes a boundary condition object representing linear boundary conditions in any cartesian direction. The grid interface needs to export boundary ids that are unique for each boundary face for this to be possible.

Template Parameters
BCsthe boundary condition class
GridInterfacegrid interface class

References Opm::BCBase< double >::Dirichlet, and Opm::BCBase< double >::Neumann.

Referenced by setupUpscalingConditions().

template<class BCs , class GridInterface >
void Opm::createPeriodic ( BCs &  fbcs,
const GridInterface &  g,
const std::array< FlowBC, 2 *GridInterface::Dimension > &  fconditions,
const std::array< SatBC, 2 *GridInterface::Dimension > &  sconditions,
double  spatial_tolerance = 1e-6 
)

Makes a boundary condition object representing periodic boundary conditions in any cartesian directions. The grid interface needs to export boundary ids that are unique for each boundary face for this to be possible.

Template Parameters
BCsthe boundary condition class
GridInterfacegrid interface class

References createPeriodicImpl(), extractPeriodic(), storeFlowCond(), and storeSatCond().

Referenced by setupUpscalingConditions().

template<class BCs , class GridInterface >
void Opm::createPeriodic ( BCs &  fbcs,
const GridInterface &  g,
const std::array< FlowBC, 2 *GridInterface::Dimension > &  fconditions,
double  spatial_tolerance = 1e-6 
)
template<class BCs , class GridInterface >
void Opm::createPeriodic ( BCs &  fbcs,
const GridInterface &  g,
const std::array< SatBC, 2 *GridInterface::Dimension > &  sconditions,
double  spatial_tolerance = 1e-6 
)
template<class BCs , class GridInterface >
void Opm::createPeriodicImpl ( BCs &  fbcs,
std::vector< BoundaryFaceInfo > &  bfinfo,
std::array< double, 6 > &  side_areas,
const GridInterface &  g,
const std::array< bool, 2 *GridInterface::Dimension > &  is_periodic,
double  spatial_tolerance = 1e-6 
)

Common implementation for the various createPeriodic functions.

References findPeriodicPartners().

Referenced by createPeriodic().

template<class GridInterface , class FlowSol >
void Opm::estimateCellVelocity ( std::vector< typename GridInterface::Vector > &  cell_velocity,
const GridInterface &  ginterf,
const FlowSol &  flow_solution 
)

Estimates a scalar cell velocity from outgoing fluxes.

Template Parameters
GridInterfacea grid interface.
FlowSola flow solution type.
Parameters
[out]cell_velocitythe estimated velocities.
[in]ginterfan interface to the grid.
[in]flow_solutionthe object containing the fluxes.

Referenced by writeVtkOutput().

template<class GridInterface , class FlowSol >
void Opm::estimateCellVelocity ( std::vector< typename GridInterface::Vector > &  cell_velocity,
const GridInterface &  ginterf,
const FlowSol &  flow_solution,
const std::vector< int > &  partition,
const int  my_partition 
)

Estimates a scalar cell velocity from outgoing fluxes.

Template Parameters
GridInterfacea grid interface.
FlowSola flow solution type.
Parameters
[out]cell_velocitythe estimated velocities.
[in]ginterfan interface to the grid.
[in]flow_solutionthe object containing the fluxes.
[in]partitionpartition numbers of the fluxes.
[in]my_partitionpartition to be used.
template<class GridInterface >
void Opm::estimateCellVelocitySimpleInterface ( std::vector< typename GridInterface::Vector > &  cell_velocity,
const GridInterface &  grid,
const std::vector< double > &  face_flux 
)

Estimates a scalar cell velocity from face fluxes.

Template Parameters
GridInterfacea grid interface.
FlowSola flow solution type.
Parameters
[out]cell_velocitythe estimated velocities.
[in]ginterfan interface to the grid.
[in]flow_solutionthe object containing the fluxes.
template<class BC >
std::array<bool, 6> Opm::extractPeriodic ( const std::array< BC, 6 > &  bcs)

Referenced by createPeriodic().

template<class Matrix >
void Opm::eye ( Matrix &  A)

Make an identity.

FullMatrix

.

Template Parameters
MatrixMatrix type.
Parameters
ASpecific matrix which will be zero-filled upon return.

References zero().

Referenced by Opm::ReservoirPropertyTracerFluid::phaseMobility().

template<class GridView >
void Opm::findPeriodicPartners ( std::vector< BoundaryFaceInfo > &  bfinfo,
std::array< double, 6 > &  side_areas,
const GridView &  g,
const std::array< bool, 2 *GridView::dimension > &  is_periodic,
double  spatial_tolerance = 1e-6 
)
template<class GridInterface , class FlowSol >
void Opm::getCellPressure ( std::vector< double > &  cell_pressure,
const GridInterface &  ginterf,
const FlowSol &  flow_solution 
)

Referenced by writeVtkOutput().

template<class GridInterface , class FlowSol >
void Opm::getCellPressure ( std::vector< double > &  cell_pressure,
const GridInterface &  ginterf,
const FlowSol &  flow_solution,
const std::vector< int > &  partition,
const int  my_partition 
)
template<typename M >
M Opm::inverse2x2 ( const M &  m)
template<typename M >
M Opm::inverse3x3 ( const M &  m)
template<typename T , template< typename > class StoragePolicy, class OrderingPolicy >
int Opm::invert ( FullMatrix< T, StoragePolicy, OrderingPolicy > &  A)

Matrix inversion, $A \leftarrow A^{-1} $.

Template Parameters
TMatrix element type.
StoragePolicyMatrix storage policy.
OrderingPolicyMatrix ordering policy.
Parameters
AMatrix. Contains the inverse upon return from.
Returns
The union of the LAPACK xGETRF and xGETRI 'INFO' subroutine return flags.

References Opm::BLAS_LAPACK::GETRF(), and Opm::BLAS_LAPACK::GETRI().

Referenced by Opm::TensorMobility< dim >::setToInverse().

bool Opm::match ( std::vector< BoundaryFaceInfo > &  bfaces,
int  face,
int  lower,
int  upper 
)

Find a match (periodic partner) for the given face.

Parameters
[in,out]bfacesthe boundary face info list.
[in]facethe face for which we seek a periodic partner
[in]lowerlower end of search interval [lower, upper)
[in]upperupper end of search interval [lower, upper)
Returns
true if a match was found, otherwise false

Referenced by findPeriodicPartners().

template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NN ( const T &  a1,
const FullMatrix< T, SP1, FortranOrdering > &  A,
const FullMatrix< T, SP2, FortranOrdering > &  B,
const T &  a2,
FullMatrix< T, SP3, FortranOrdering > &  C 
)

GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $.

Template Parameters
TMatrix element type. Assumed to be an arithmetic type and, typically,
T @endocde is an alias for @code double
.
SP1Storage policy of matrix $ A $.
SP2Storage policy of matrix $ B $.
SP3Storage policy of matrix $ C $.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]BMatrix $ B $.
[in]a2Scalar coefficient $ a_2 $.
CMatrix $ C $.

References Opm::BLAS_LAPACK::GEMM().

Referenced by Opm::MimeticIPEvaluator< GridInterface, RockInterface >::buildStaticContrib(), Opm::MimeticIPEvaluator< GridInterface, RockInterface >::evaluate(), and Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::getInverseMatrix().

template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NN ( const T &  a1,
const FullMatrix< T, SP1, FortranOrdering > &  A,
const FullMatrix< T, SP2, COrdering > &  B,
const T &  a2,
FullMatrix< T, SP3, FortranOrdering > &  C 
)

GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB + a_2C $. Overload for C-ordered matrix $ B $.

Template Parameters
TMatrix element type. Assumed to be an arithmetic type and, typically,
T @endocde is an alias for @code double
.
SP1Storage policy of matrix $ A $.
SP2Storage policy of matrix $ B $.
SP3Storage policy of matrix $ C $.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]BMatrix $ B $.
[in]a2Scalar coefficient $ a_2 $.
CMatrix $ C $.

References matMulAdd_NT().

template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_NT ( const T &  a1,
const FullMatrix< T, SP1, FortranOrdering > &  A,
const FullMatrix< T, SP2, FortranOrdering > &  B,
const T &  a2,
FullMatrix< T, SP3, FortranOrdering > &  C 
)

GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1AB^{\mathsf{T}} + a_2C $.

Template Parameters
TMatrix element type. Assumed to be an arithmetic type and, typically,
T @endocde is an alias for @code double
.
SP1Storage policy of matrix $ A $.
SP2Storage policy of matrix $ B $.
SP3Storage policy of matrix $ C $.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]BMatrix $ B $.
[in]a2Scalar coefficient $ a_2 $.
CMatrix $ C $.

References Opm::BLAS_LAPACK::GEMM().

Referenced by Opm::MimeticIPEvaluator< GridInterface, RockInterface >::buildStaticContrib(), Opm::MimeticIPEvaluator< GridInterface, RockInterface >::evaluate(), Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::getInverseMatrix(), and matMulAdd_NN().

template<typename T , template< typename > class SP1, template< typename > class SP2, template< typename > class SP3>
void Opm::matMulAdd_TN ( const T &  a1,
const FullMatrix< T, SP1, FortranOrdering > &  A,
const FullMatrix< T, SP2, FortranOrdering > &  B,
const T &  a2,
FullMatrix< T, SP3, FortranOrdering > &  C 
)

GEneral Matrix-Matrix product update of other matrix. Specificlly, $ C \leftarrow a_1A^{\mathsf{T}}B + a_2C $.

Template Parameters
TMatrix element type. Assumed to be an arithmetic type and, typically,
T @endocde is an alias for @code double
.
SP1Storage policy of matrix $ A $.
SP2Storage policy of matrix $ B $.
SP3Storage policy of matrix $ C $.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]BMatrix $ B $.
[in]a2Scalar coefficient $ a_2 $.
CMatrix $ C $.

References Opm::BLAS_LAPACK::GEMM().

template<typename M >
M Opm::matprod ( const M &  m1,
const M &  m2 
)
template<typename charT , class traits >
std::basic_ostream<charT,traits>& Opm::operator<< ( std::basic_ostream< charT, traits > &  os,
const PeriodicConditionHandler &  pch 
)
template<typename charT , class traits , typename T >
std::basic_ostream<charT,traits>& Opm::operator<< ( std::basic_ostream< charT, traits > &  os,
const BCBase< T > &  bc 
)

Stream insertion for BCBase.

References Opm::BCBase< T >::write().

template<typename charT , class traits , bool F, bool S>
std::basic_ostream<charT,traits>& Opm::operator<< ( std::basic_ostream< charT, traits > &  os,
const BasicBoundaryConditions< F, S > &  bcs 
)
template<class charT , class traits , typename T , template< typename > class SP, class OP >
std::basic_ostream<charT,traits>& Opm::operator<< ( std::basic_ostream< charT, traits > &  os,
const FullMatrix< T, SP, OP > &  A 
)

Stream output operator for.

FullMatrix

types.

Template Parameters
charTOutput stream character type.
traitsOutput stream character traits.
TMatrix element type.
SPMatrix storage policy.
OPMatrix ordering policy.
Parameters
osOutput stream.
[in]AMatrix.
Returns
Output stream (for output chaining).
template<typename T , template< typename > class StoragePolicy>
int Opm::orthogonalizeColumns ( FullMatrix< T, StoragePolicy, FortranOrdering > &  A)

Construct orthonormal basis for matrix range (i.e., column space). Based on a QR factorization of the matrix.

Template Parameters
TMatrix element type.
StoragePolicyMatrix storage policy.
Parameters
AMatrix. Will be overwritten by an orthogonal matrix, $ Q $ whose columns represent an orthonormal basis for range(A).
Returns
Zero for success, non-zero if an error occurred.

References Opm::BLAS_LAPACK::GEQRF(), and Opm::BLAS_LAPACK::ORGQR().

Referenced by Opm::MimeticIPEvaluator< GridInterface, RockInterface >::buildStaticContrib(), Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::buildStaticContrib(), and Opm::MimeticIPEvaluator< GridInterface, RockInterface >::evaluate().

template<class GridInterface , class ReservoirProperties >
std::pair<double, double> Opm::poreSatVolumes ( const GridInterface &  grid,
const ReservoirProperties &  rp,
const std::vector< double > &  sat 
)
template<class Matrix , int rows>
Dune::FieldVector<typename Matrix::value_type, rows> Opm::prod ( const Matrix &  A,
const Dune::FieldVector< typename Matrix::value_type, rows > &  x 
)
template<class Matrix1 , class Matrix2 , class MutableMatrix >
void Opm::prod ( const Matrix1 &  A,
const Matrix2 &  B,
MutableMatrix &  C 
)

Compute C = AB. C must not overlap with A or B.

Template Parameters
Matrix1a matrix type.
Matrix2a matrix type.
MutableMatrixa matrix type with write access.
Parameters
[in]Aleft matrix of product.
[in]Bright matrix of product.
[out]Cresulting product matrix, it must already have the right size.
template<class GridInterface , class BCs >
void Opm::setupBoundaryConditions ( const Opm::parameter::ParameterGroup &  param,
const GridInterface &  g,
BCs &  bcs 
)
inline

Setup boundary conditions for a simulation. It is assumed that the boundary ids are 1-6, similar to cartesian case/Yaspgrid, unless periodic, in which case we assume unique boundary ids.

References Opm::BCBase< double >::Dirichlet, Opm::BCBase< double >::Neumann, setupRegionBasedConditions(), and setupUpscalingConditions().

Referenced by Opm::SimulatorTesterFlexibleBC< SimTraits >::initBoundaryConditions(), and Opm::SimulatorBase< SimTraits >::initBoundaryConditions().

template<template< int > class ResProp>
void Opm::setupGridAndProps ( const Opm::parameter::ParameterGroup &  param,
Dune::CpGrid &  grid,
ResProp< 3 > &  res_prop 
)
inline
template<template< int > class ResProp>
void Opm::setupGridAndProps ( const Opm::parameter::ParameterGroup &  param,
Dune::SGrid< 3, 3 > &  grid,
ResProp< 3 > &  res_prop 
)
inline
template<template< int > class ResProp>
void Opm::setupGridAndPropsEclipse ( Opm::DeckConstPtr  deck,
bool  periodic_extension,
bool  turn_normals,
bool  clip_z,
bool  unique_bids,
double  perm_threshold,
const std::string &  rock_list,
bool  use_jfunction_scaling,
double  sigma,
double  theta,
Dune::CpGrid &  grid,
ResProp< 3 > &  res_prop 
)
inline
template<class GridInterface , class BCs >
void Opm::setupRegionBasedConditions ( const Opm::parameter::ParameterGroup &  param,
const GridInterface &  g,
BCs &  bcs 
)
inline
template<class GridInterface , class BCs >
void Opm::setupUpscalingConditions ( const GridInterface &  g,
int  bct,
int  pddir,
double  pdrop,
double  bdy_sat,
bool  twodim_hack,
BCs &  bcs 
)
inline
template<class BCs >
void Opm::storeFlowCond ( BCs &  bcs,
const std::vector< BoundaryFaceInfo > &  bfinfo,
const std::array< FlowBC, 6 > &  fconditions,
const std::array< double, 6 > &  side_areas 
)
template<class BCs >
void Opm::storeSatCond ( BCs &  bcs,
const std::vector< BoundaryFaceInfo > &  bfinfo,
const std::array< SatBC, 6 > &  sconditions 
)

Referenced by createPeriodic().

template<typename T , template< typename > class StoragePolicy>
void Opm::symmetricUpdate ( const T &  a1,
const FullMatrix< T, StoragePolicy, FortranOrdering > &  A,
const T &  a2,
FullMatrix< T, StoragePolicy, FortranOrdering > &  C 
)

Symmetric, rank $ k $ update of symmetric matrix. Specifically, $ C \leftarrow a_1 AA^{\mathsf{T}} + a_2 C $.

Template Parameters
TMatrix element type. Assumed to be an arithmetic type. Typically
T
is an alias for
double
.
StoragePolicy.Matrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]a2Scalar coefficient $ a_2 $.
CMatrix $ C $.

References Opm::BLAS_LAPACK::SYRK().

Referenced by Opm::MimeticIPEvaluator< GridInterface, RockInterface >::buildStaticContrib(), Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::buildStaticContrib(), and Opm::MimeticIPEvaluator< GridInterface, RockInterface >::evaluate().

template<typename T , template< typename > class StoragePolicy>
void Opm::symmetricUpdate ( const FullMatrix< T, StoragePolicy, FortranOrdering > &  A,
FullMatrix< T, StoragePolicy, FortranOrdering > &  B 
)
template<class Matrix >
Matrix::value_type Opm::trace ( const Matrix &  A)
template<class RP >
bool Opm::useJ ( )

Helper for determining whether we should.

Referenced by setupGridAndProps().

template<>
bool Opm::useJ< ReservoirPropertyCapillary< 3 > > ( )
template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N ( const T &  a1,
const FullMatrix< T, SP, FortranOrdering > &  A,
const std::vector< T > &  x,
const T &  a2,
std::vector< T > &  y 
)

GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $.

Template Parameters
TMatrix (and vector) element type. Assumed to be an arithmetic type and, typically,
T
is an alias for
double
.
SPMatrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]xVector $ x $.
[in]a2Scalar coefficient $ a_2 $.
yVector $ y $.

References Opm::BLAS_LAPACK::GEMV().

Referenced by Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::buildStaticContrib(), Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::computeDynamicParams(), and Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::gravityFlux().

template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N ( const T &  a1,
const FullMatrix< T, SP, FortranOrdering > &  A,
const T *  x,
const T &  a2,
T *  y 
)

GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $.

Template Parameters
TMatrix (and vector) element type. Assumed to be an arithmetic type and, typically,
T
is an alias for
double
.
SPMatrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]xVector $ x $.
[in]a2Scalar coefficient $ a_2 $.
yVector $ y $.

References Opm::BLAS_LAPACK::GEMV().

template<typename T , template< typename > class SP>
void Opm::vecMulAdd_N ( const T &  a1,
const FullMatrix< T, SP, COrdering > &  A,
const T *  x,
const T &  a2,
T *  y 
)

GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 Ax + a_2 y $. Overload for C-ordered FullMatrix type.

Template Parameters
TMatrix (and vector) element type. Assumed to be an arithmetic type and, typically,
T
is an alias for
double
.
SPMatrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]xVector $ x $.
[in]a2Scalar coefficient $ a_2 $.
yVector $ y $.

References vecMulAdd_T().

template<typename T , template< typename > class SP>
void Opm::vecMulAdd_T ( const T &  a1,
const FullMatrix< T, SP, FortranOrdering > &  A,
const std::vector< T > &  x,
const T &  a2,
std::vector< T > &  y 
)

GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y $.

Template Parameters
TMatrix (and vector) element type. Assumed to be an arithmetic type and, typically,
T
is an alias for
double
.
SPMatrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]xVector $ x $.
[in]a2Scalar coefficient $ a_2 $.
yVector $ y $.

References Opm::BLAS_LAPACK::GEMV().

Referenced by vecMulAdd_N().

template<typename T , template< typename > class SP>
void Opm::vecMulAdd_T ( const T &  a1,
const FullMatrix< T, SP, FortranOrdering > &  A,
const T *  x,
const T &  a2,
T *  y 
)

GEneral Matrix-Vector product (GAXPY operation). Specifically, $ y \leftarrow a_1 A^{\mathsf{T}}x + a_2 y $.

Template Parameters
TMatrix (and vector) element type. Assumed to be an arithmetic type and, typically,
T
is an alias for
double
.
SPMatrix storage policy.
Parameters
[in]a1Scalar coefficient $ a_1 $.
[in]AMatrix $ A $.
[in]xVector $ x $.
[in]a2Scalar coefficient $ a_2 $.
yVector $ y $.

References Opm::BLAS_LAPACK::GEMV().

void Opm::writeField ( const std::vector< double > &  field,
const std::string &  filename 
)
inline
template<class GridInterface , class ReservoirProperties , class FlowSol >
void Opm::writeVtkOutput ( const GridInterface &  ginterf,
const ReservoirProperties &  rp,
const FlowSol &  flowsol,
const std::vector< double > &  saturation,
const std::string &  filename 
)