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

Inverting small matrices. More...

## Classes

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

## 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, .
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 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>
M | inverse2x2 (const M &m)
template<typename M>
M | matprod (const M &m1, const M &m2)
template<typename M>
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.
double | getVoigtValue (const SinglePhaseUpscaler::permtensor_t &K, int voigt_idx)
| Get value from tensor.
void | setVoigtValue (SinglePhaseUpscaler::permtensor_t &K, int voigt_idx, double val)
| Set value in tensor.
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

  ReservoirProperties | the type of reservoir property object

Parameters

  cap_pressure | [out] the capillary pressure in each cell
  rp | the reservoir property object
  sat | the 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

  BCs | the boundary condition class
  GridInterface | grid 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

  BCs | the boundary condition class
  GridInterface | grid 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

  GridInterface | a grid interface.
  FlowSol | a flow solution type.

Parameters

  [out] | cell_velocity | the estimated velocities.
  [in] | ginterf | an interface to the grid.
  [in] | flow_solution | the 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

  GridInterface | a grid interface.
  FlowSol | a flow solution type.

Parameters

  [out] | cell_velocity | the estimated velocities.
  [in] | ginterf | an interface to the grid.
  [in] | flow_solution | the object containing the fluxes.
  [in] | partition | partition numbers of the fluxes.
  [in] | my_partition | partition 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.

Parameters

  [out] | cell_velocity | the estimated velocities.
  [in] | grid | an interface to the grid.
  [in] | face_flux | the object containing the fluxes.

## eye()

template<class Matrix>

void Opm::eye | ( | Matrix & | A | ) |

Make an identity.

FullMatrix

.

Template Parameters

  Matrix | Matrix type.

Parameters

  A | Specific 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

## getVoigtValue()

double Opm::getVoigtValue | ( | const SinglePhaseUpscaler::permtensor_t & | K,
|  | int | voigt_idx )

Get value from tensor.

Parameters

  [in] | K | The tensor to extract the value from
  [in] | voigt_idx | The voigt index for value to extract (0..8)

Returns
  The requested value

## invert()

template<typename T, template< typename > class StoragePolicy, class OrderingPolicy>

int Opm::invert | ( | FullMatrix< T, StoragePolicy, OrderingPolicy > & | A | ) |

Matrix inversion, .

Template Parameters

  T | Matrix element type.
  StoragePolicy | Matrix storage policy.
  OrderingPolicy | Matrix ordering policy.

Parameters

  A | Matrix. Contains the inverse upon return from invert() Opm::invert 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] | bfaces | the boundary face info list.
  [in] | face | the face for which we seek a periodic partner
  [in] | lower | lower end of search interval [lower, upper)
  [in] | upper | upper 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, . Overload for C-ordered matrix .

Template Parameters

  T | Matrix element type. Assumed to be an arithmetic type and, typically, T @endocde is an alias for @code double .
  SP1 | Storage policy of matrix .
  SP2 | Storage policy of matrix .
  SP3 | Storage policy of matrix .

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | B | Matrix .
  [in] | a2 | Scalar coefficient .
  | C | Matrix .

## 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, .

Template Parameters

  T | Matrix element type. Assumed to be an arithmetic type and, typically, T @endocde is an alias for @code double .
  SP1 | Storage policy of matrix .
  SP2 | Storage policy of matrix .
  SP3 | Storage policy of matrix .

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | B | Matrix .
  [in] | a2 | Scalar coefficient .
  | C | Matrix .

## 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, .

Template Parameters

  T | Matrix element type. Assumed to be an arithmetic type and, typically, T @endocde is an alias for @code double .
  SP1 | Storage policy of matrix .
  SP2 | Storage policy of matrix .
  SP3 | Storage policy of matrix .

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | B | Matrix .
  [in] | a2 | Scalar coefficient .
  | C | Matrix .

## 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, .

Template Parameters

  T | Matrix element type. Assumed to be an arithmetic type and, typically, T @endocde is an alias for @code double .
  SP1 | Storage policy of matrix .
  SP2 | Storage policy of matrix .
  SP3 | Storage policy of matrix .

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | B | Matrix .
  [in] | a2 | Scalar coefficient .
  | C | Matrix .

## 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

  charT | Output stream character type.
  traits | Output stream character traits.
  T | Matrix element type.
  SP | Matrix storage policy.
  OP | Matrix ordering policy.

Parameters

  | os | Output stream.
  [in] | A | Matrix.

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

  T | Matrix element type.
  StoragePolicy | Matrix storage policy.

Parameters

  A | Matrix. Will be overwritten by an orthogonal matrix, 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

  Matrix | Matrix type.
  rows. | Number of matrix rows.

Parameters

  [in] | A | Matrix.
  [in] | x | Vector

Returns
  .

## 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

  Matrix1 | a matrix type.
  Matrix2 | a matrix type.
  MutableMatrix | a matrix type with write access.

Parameters

  [in] | A | left matrix of product.
  [in] | B | right matrix of product.
  [out] | C | resulting 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

## setVoigtValue()

void Opm::setVoigtValue | ( | SinglePhaseUpscaler::permtensor_t & | K,
|  | int | voigt_idx,
|  | double | val )

Set value in tensor.

Parameters

  [out] | K | The tensor to set value in
  [in] | voigt_idx | The voigt index for value to set (0..8)
  [in] | val | Value to set in tensor

## 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 update of symmetric matrix.

Specifically, .

Template Parameters

  T | Matrix element type. Assumed to be an arithmetic type. Typically T is an alias for double .
  StoragePolicy. | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | a2 | Scalar coefficient .
  | C | Matrix .

## trace()

template<class Matrix>

Matrix::value_type Opm::trace | ( | const Matrix & | A | ) |

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

Template Parameters

  Matrix | Matrix type.

Parameters

  [in] | A | Matrix 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, . Overload for C-ordered FullMatrix type.

Template Parameters

  T | Matrix (and vector) element type. Assumed to be an arithmetic type and, typically, T is an alias for double .
  SP | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | x | Vector .
  [in] | a2 | Scalar coefficient .
  | y | Vector .

## 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, .

Template Parameters

  T | Matrix (and vector) element type. Assumed to be an arithmetic type and, typically, T is an alias for double .
  SP | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | x | Vector .
  [in] | a2 | Scalar coefficient .
  | y | Vector .

## 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, .

Template Parameters

  T | Matrix (and vector) element type. Assumed to be an arithmetic type and, typically, T is an alias for double .
  SP | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | x | Vector .
  [in] | a2 | Scalar coefficient .
  | y | Vector .

## 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, .

Template Parameters

  T | Matrix (and vector) element type. Assumed to be an arithmetic type and, typically, T is an alias for double .
  SP | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | x | Vector .
  [in] | a2 | Scalar coefficient .
  | y | Vector .

## 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, .

Template Parameters

  T | Matrix (and vector) element type. Assumed to be an arithmetic type and, typically, T is an alias for double .
  SP | Matrix storage policy.

Parameters

  [in] | a1 | Scalar coefficient .
  [in] | A | Matrix .
  [in] | x | Vector .
  [in] | a2 | Scalar coefficient .
  | y | Vector .

## zero()

template<class Matrix>

void Opm::zero | ( | Matrix & | A | ) |

Zero-fill a.

FullMatrix

.

Template Parameters

  Matrix | Matrix type.

Parameters

  A | Specific matrix which will be zero-filled upon return.