Opm::DifferentiateOutputTable Namespace Reference

Classes

struct  Descriptor
 

Functions

void calcSlopes (const std::size_t numDependent, const Descriptor &desc, LinearisedOutputTable &table)
 

Detailed Description

Apply piecewise linear differentiation (i.e., compute slopes) on a set of dependent variables in a linearised output table.

Function Documentation

◆ calcSlopes()

void Opm::DifferentiateOutputTable::calcSlopes ( const std::size_t  numDependent,
const Descriptor desc,
LinearisedOutputTable table 
)

Apply piecewise linear differentiation (i.e., compute slopes) on a set of dependent variables in a linearised output table.

Assumes that the independent variable is stored in the first column (column ID zero).

Parameters
[in]numDependentNumber of dependent variables. Usually one or two. Dependent variables are assumed to be stored in columns one through numDependent.
[in]descColumnar data differentantiation table request. Must refer to a particular sub-table of the linearised output table.
[in,out]tableLinearised output table. On input, column zero contains the independent variable in each of
numActRows.size()
sub-tables and columns one through numDependent contain the dependent variables. On output, columns
numDependent + 1
through
2 *
numDependent
contain the slopes of the dependent variables.

In partcular, column

numDependent + j

for

j = 1..numDependent

contains the derivatives of column j with respect to column zero. We define the slopes as

s(i,j) = (c(i + 1, j) - c(i,j)) / (c(i + 1, 0) - c(i,0))

for all

i = 0 .. numActRows[k] - 2

(in table k).