Opm::DGBasisInterface Class Referenceabstract

Base class for Discontinuous Galerkin bases, intended for time-of-flight computations. More...

#include <DGBasis.hpp>

Inheritance diagram for Opm::DGBasisInterface:
Inheritance graph

Public Member Functions

virtual ~DGBasisInterface ()
 Virtual destructor. More...
 
virtual int numBasisFunc () const =0
 The number of basis functions per cell. More...
 
virtual int dimensions () const =0
 The number of space dimensions. More...
 
virtual int degree () const =0
 The polynomial degree of the basis functions. More...
 
virtual void eval (const int cell, const double *x, double *f_x) const =0
 
virtual void evalGrad (const int cell, const double *x, double *grad_f_x) const =0
 
virtual void addConstant (const double increment, double *coefficients) const =0
 
virtual void multiplyGradient (const double factor, double *coefficients) const =0
 
double evalFunc (const int cell, const double *coefficients, const double *x) const
 
virtual double functionAverage (const double *coefficients) const =0
 

Detailed Description

Base class for Discontinuous Galerkin bases, intended for time-of-flight computations.

Constructor & Destructor Documentation

virtual Opm::DGBasisInterface::~DGBasisInterface ( )
virtual

Virtual destructor.

Member Function Documentation

virtual void Opm::DGBasisInterface::addConstant ( const double  increment,
double *  coefficients 
) const
pure virtual

Modify basis coefficients to add to the function value. A function f = sum_i c_i b_i is assumed, and we change it to (f + increment) by modifying the c_i. This is done without modifying its gradient.

Parameters
[in]incrementAdd this value to the function.
[out]coefficientsCoefficients {c_i} for a single cell.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual int Opm::DGBasisInterface::degree ( ) const
pure virtual

The polynomial degree of the basis functions.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual int Opm::DGBasisInterface::dimensions ( ) const
pure virtual

The number of space dimensions.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual void Opm::DGBasisInterface::eval ( const int  cell,
const double *  x,
double *  f_x 
) const
pure virtual

Evaluate all basis functions associated with cell at x, writing to f_x. The array f_x must have size equal to numBasisFunc().

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

double Opm::DGBasisInterface::evalFunc ( const int  cell,
const double *  coefficients,
const double *  x 
) const

Evaluate function f = sum_i c_i b_i at the point x. Note that this function is not virtual, but implemented in terms of the virtual functions of the class.

Parameters
[in]cellCell index
[in]coefficientsCoefficients {c_i} for a single cell.
[in]xPoint at which to compute f(x).
virtual void Opm::DGBasisInterface::evalGrad ( const int  cell,
const double *  x,
double *  grad_f_x 
) const
pure virtual

Evaluate gradients of all basis functions associated with cell at x, writing to grad_f_x. The array grad_f_x must have size numBasisFunc() * dimensions(). The dimensions() components of the first basis function gradient come before the components of the second etc.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual double Opm::DGBasisInterface::functionAverage ( const double *  coefficients) const
pure virtual

Compute the average of the function f = sum_i c_i b_i.

Parameters
[in]coefficientsCoefficients {c_i} for a single cell.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual void Opm::DGBasisInterface::multiplyGradient ( const double  factor,
double *  coefficients 
) const
pure virtual

Modify basis coefficients to change the function's slope. A function f = sum_i c_i b_i is assumed, and we change it to a function g with the property that grad g = factor * grad f by modifying the c_i. This is done without modifying the average, i.e. the integrals of g and f over the cell are the same.

Parameters
[in]factorMultiply gradient by this factor.
[out]coefficientsCoefficients {c_i} for a single cell.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.

virtual int Opm::DGBasisInterface::numBasisFunc ( ) const
pure virtual

The number of basis functions per cell.

Implemented in Opm::DGBasisMultilin, and Opm::DGBasisBoundedTotalDegree.


The documentation for this class was generated from the following file: