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

Inverting small matrices. More...

Classes

struct  Anisotropic
 Traits for upscaling with anisotropic relperm (tensorial) input. More...
 
class  BasicBoundaryConditions
 
class  BCBase
 A class for building boundary conditions in a uniform way. More...
 
struct  BoundaryFaceInfo
 
class  CornerPointChopper
 
struct  CpGridCellMapper
 A mapper for Dune::CpGrid cells only. More...
 
class  DummyVec
 
class  EulerUpstream
 Class for doing simple transport by explicit Euler upstream method for general grid. More...
 
class  EulerUpstreamImplicit
 Class for doing simple transport by implicit Euler upstream method for general grid. More...
 
class  EulerUpstreamResidual
 Class for doing simple transport by explicit Euler upstream method for general grid. More...
 
struct  Explicit
 Traits for explicit transport. More...
 
class  FlowBC
 A class for representing a flow boundary condition. More...
 
struct  GICellMapper
 Mapper for general grids. More...
 
class  GridInterfaceEuler
 
class  ImmutableSharedData
 FullMatrix StoragePolicy which provides immutable object sharing semantics. More...
 
class  ImplicitAssembly
 
struct  ImplicitCap
 Traits for implicit transport. More...
 
class  ImplicitCapillarity
 Class for doing simple transport by explicit Euler upstream method for general grid. More...
 
class  ImplicitTransport
 
class  IncompFlowSolverHybrid
 Solve mixed formulation of incompressible flow modelled by Darcy's law. More...
 
struct  Isotropic
 Traits policies for isotropic (scalar) relperm. More...
 
class  LinearSolverBICGSTAB
 
struct  MatchSaturatedVolumeFunctor
 
class  MaxNormDune
 
class  MaxNormStl
 
class  MimeticIPAnisoRelpermEvaluator
 
class  MimeticIPEvaluator
 
class  OwnData
 FullMatrix StoragePolicy which provides object owning semantics. More...
 
class  PeriodicConditionHandler
 
class  RelPermUpscaleHelper
 Helper class for relperm upscaling applications. More...
 
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
 
struct  SimulatorTraits
 Combines the component traits into a single, parametrized type. More...
 
class  SinglePhaseUpscaler
 A class for doing single phase (permeability) upscaling. More...
 
class  SinglePointUpwindTwoPhase
 
class  SteadyStateUpscaler
 A class for doing steady state upscaling. More...
 
class  SteadyStateUpscalerImplicit
 A class for doing steady state upscaling. More...
 
class  SteadyStateUpscalerManager
 
class  SteadyStateUpscalerManagerImplicit
 
class  SurfvolBC
 A class for representing a surface volume boundary condition. More...
 
struct  TensorMobility
 A wrapper for a tensor. More...
 
class  TransportSource
 
class  TwophaseFluidWrapper
 
class  UpscalerBase
 A base class for upscaling. More...
 
class  Wells
 A class designed to encapsulate a set of rate- or pressure-controlled wells. More...
 

Typedefs

typedef FullMatrix< double, OwnData, COrdering > OwnCMatrix
 Convenience typedefs for C-ordered.
 
typedef FullMatrix< double, SharedData, COrdering > SharedCMatrix
 
typedef const FullMatrix< double, ImmutableSharedData, COrdering > ImmutableCMatrix
 
typedef FullMatrix< double, OwnData, FortranOrdering > OwnFortranMatrix
 Convenience typedefs for Fortran-ordered.
 
typedef FullMatrix< double, SharedData, FortranOrdering > SharedFortranMatrix
 
typedef const FullMatrix< double, ImmutableSharedData, FortranOrdering > ImmutableFortranMatrix
 
typedef SimulatorTraits< Isotropic, ExplicitUpscalingTraitsBasic
 
typedef SimulatorTraits< Anisotropic, ExplicitUpscalingTraitsAnisoRelperm
 

Enumerations

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

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.
 
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.
 
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.
 
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.
 
template<class Matrix >
void eye (Matrix &A)
 Make an identity.
 
template<class Matrix >
Matrix::value_type trace (const Matrix &A)
 Compute matrix trace (i.e., sum(diag(A))).
 
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.
 
template<class Matrix1 , class Matrix2 , class MutableMatrix >
void prod (const Matrix1 &A, const Matrix2 &B, MutableMatrix &C)
 Compute C = AB.
 
template<typename T , template< typename > class StoragePolicy>
int orthogonalizeColumns (FullMatrix< T, StoragePolicy, FortranOrdering > &A)
 Construct orthonormal basis for matrix range (i.e., column space).
 
template<typename T , template< typename > class StoragePolicy, class OrderingPolicy >
int invert (FullMatrix< T, StoragePolicy, OrderingPolicy > &A)
 Matrix inversion, $A \leftarrow A^{-1} $.
 
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.
 
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).
 
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).
 
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).
 
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).
 
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).
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
template<class GridInterface , class BCs >
void setupBoundaryConditions (const Opm::ParameterGroup &param, const GridInterface &g, BCs &bcs)
 Setup boundary conditions for a simulation.
 
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::ParameterGroup &param, const GridInterface &g, BCs &bcs)
 
template<>
bool useJ< ReservoirPropertyCapillary< 3 > > ()
 
template<class RP >
bool useJ ()
 Helper for determining whether we should.
 
template<>
bool useJ< ReservoirPropertyCapillary< 3 > > ()
 
template<template< int > class ResProp>
void setupGridAndProps (const Opm::ParameterGroup &param, Dune::CpGrid &grid, ResProp< 3 > &res_prop)
 
template<template< int > class ResProp>
void setupGridAndPropsEclipse (const Opm::Deck &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<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.
 
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.
 
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.
 
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.
 
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)
 
void initCPGrid (Dune::CpGrid &grid, const ParameterGroup &param)
 
void addNonStandardUpscalingKeywords (Parser &parser)
 This function registers non-standard keywords used by opm-upscaling in a parser object.
 
template<class Istream >
void readControl (Istream &is, std::vector< double > &saturations, Opm::SparseTable< double > &all_pdrops)
 Reads saturation and pressure drop data from an input stream.
 
template<class Ostream >
void writeControl (Ostream &os, const std::vector< double > &saturations, const Opm::SparseTable< double > &all_pdrops)
 Writes saturation and pressure drop data to an output stream.
 
template<class Ostream , class Tensor >
void writeRelPerm (Ostream &os, const Tensor &K, double sat, double pdrop)
 
template<class Ostream , class Tensor >
void writeRelPerm (Ostream &os, const Tensor &K, double sat, double pdrop, bool success)
 
void writeECLData (int nx, int ny, int nz, int nactive, data::Solution data, const int current_step, const double current_time, time_t current_posix_time, const std::string &output_dir, const std::string &base_name)
 

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

◆ OwnCMatrix

typedef FullMatrix<double, OwnData, COrdering> Opm::OwnCMatrix

Convenience typedefs for C-ordered.

FullMatrix

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

◆ OwnFortranMatrix

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

Convenience typedefs for Fortran-ordered.

FullMatrix

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

Function Documentation

◆ addNonStandardUpscalingKeywords()

void Opm::addNonStandardUpscalingKeywords ( Parser &  parser)

This function registers non-standard keywords used by opm-upscaling in a parser object.

The name of this function is intentionally long and awkward. This is to discourage its use unless it is really necessary!

◆ computeCapPressure()

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

◆ createLinear()

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

◆ createPeriodic()

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

◆ estimateCellVelocity() [1/2]

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.

◆ estimateCellVelocity() [2/2]

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.

◆ estimateCellVelocitySimpleInterface()

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.

◆ eye()

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.

◆ getCellPressure() [1/2]

template<class GridInterface , class FlowSol >
void Opm::getCellPressure ( std::vector< double > &  cell_pressure,
const GridInterface &  ginterf,
const FlowSol &  flow_solution 
)
Todo:
Doc me!
Template Parameters

param

◆ getCellPressure() [2/2]

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 
)
Todo:
Doc me!
Template Parameters

param

◆ invert()

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
int invert(FullMatrix< T, StoragePolicy, OrderingPolicy > &A)
Matrix inversion, .
Definition Matrix.hpp:780
.
Returns
The union of the LAPACK xGETRF and xGETRI 'INFO' subroutine return flags.

◆ match()

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

◆ matMulAdd_NN() [1/2]

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 $.

◆ matMulAdd_NN() [2/2]

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 $.

◆ 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 $.

◆ matMulAdd_TN()

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 $.

◆ operator<<()

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).

◆ orthogonalizeColumns()

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.

◆ prod() [1/2]

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 
)

Matrix applied to a vector.

Template Parameters
MatrixMatrix type.
rows.Number of matrix rows.
Parameters
[in]AMatrix.
[in]xVector
Returns
$ Ax $.

◆ prod() [2/2]

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.

◆ setupBoundaryConditions()

template<class GridInterface , class BCs >
void Opm::setupBoundaryConditions ( const Opm::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.

◆ setupGridAndProps()

template<template< int > class ResProp>
void Opm::setupGridAndProps ( const Opm::ParameterGroup &  param,
Dune::CpGrid &  grid,
ResProp< 3 > &  res_prop 
)
inline
Todo:
Doc me!
Parameters

◆ setupGridAndPropsEclipse()

template<template< int > class ResProp>
void Opm::setupGridAndPropsEclipse ( const Opm::Deck &  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
Todo:
Doc me!
Parameters

◆ setupUpscalingConditions()

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
Todo:
Doc me!
Parameters

◆ symmetricUpdate() [1/2]

template<typename T , template< typename > class StoragePolicy>
void Opm::symmetricUpdate ( const FullMatrix< T, StoragePolicy, FortranOrdering > &  A,
FullMatrix< T, StoragePolicy, FortranOrdering > &  B 
)
Todo:
Doc me!
Template Parameters

param

◆ symmetricUpdate() [2/2]

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 $.

◆ trace()

template<class Matrix >
Matrix::value_type Opm::trace ( const Matrix &  A)

Compute matrix trace (i.e., sum(diag(A))).

Template Parameters
MatrixMatrix type.
Parameters
[in]AMatrix for which to compute the trace.
Returns
Trace of matrix.

◆ vecMulAdd_N() [1/3]

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 $.

◆ vecMulAdd_N() [2/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 $.

◆ vecMulAdd_N() [3/3]

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 $.

◆ vecMulAdd_T() [1/2]

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 $.

◆ vecMulAdd_T() [2/2]

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 $.

◆ zero()

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

Zero-fill a.

FullMatrix

.

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