Loading...
Searching...
No Matches
MathToolbox.hpp File Reference

A traits class which provides basic mathematical functions for arbitrary scalar floating point values. More...

`#include <cmath>`
`#include <algorithm>`
`#include <type_traits>`
`#include <stdexcept>`
`#include <opm/common/utility/gpuDecorators.hpp>`

Go to the source code of this file.

## Classes

struct | Opm::MathToolbox< ScalarT >
struct | Opm::ReturnEval_< Eval1, Eval2 >

## Namespaces

namespace | Opm
| This class implements a small container which holds the transmissibility mulitpliers for all the faces in the grid.

## Functions

template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::blank (const Evaluation &x)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::constant (const Scalar &value)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::constant (unsigned numDeriv, const Scalar &value)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::constant (const Evaluation &x, const Scalar &value)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::variable (unsigned numDeriv, const Scalar &value, unsigned idx)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::variable (const Evaluation &x, const Scalar &value, unsigned idx)
template<class Evaluation, class Scalar>
OPM_HOST_DEVICE Evaluation | Opm::variable (const Scalar &value, unsigned idx)
template<class ResultEval, class Evaluation>
OPM_HOST_DEVICE auto | Opm::decay (const Evaluation &value) -> decltype(MathToolbox< Evaluation >::template decay< ResultEval >(value))
template<class Evaluation>
OPM_HOST_DEVICE auto | Opm::getValue (const Evaluation &val) -> decltype(MathToolbox< Evaluation >::value(val))
template<class Evaluation>
OPM_HOST_DEVICE auto | Opm::scalarValue (const Evaluation &val) -> decltype(MathToolbox< Evaluation >::scalarValue(val))
template<class Evaluation1, class Evaluation2>
ReturnEval_< Evaluation1, Evaluation2 >::type OPM_HOST_DEVICE | Opm::max (const Evaluation1 &arg1, const Evaluation2 &arg2)
template<class Evaluation1, class Evaluation2>
ReturnEval_< Evaluation1, Evaluation2 >::type OPM_HOST_DEVICE | Opm::min (const Evaluation1 &arg1, const Evaluation2 &arg2)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::abs (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::tan (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::atan (const Evaluation &value)
template<class Evaluation1, class Evaluation2>
ReturnEval_< Evaluation1, Evaluation2 >::type OPM_HOST_DEVICE | Opm::atan2 (const Evaluation1 &value1, const Evaluation2 &value2)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::sin (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::asin (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::sinh (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::asinh (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::cos (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::acos (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::cosh (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::acosh (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::sqrt (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::exp (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::log (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE Evaluation | Opm::log10 (const Evaluation &value)
template<class Evaluation1, class Evaluation2>
ReturnEval_< Evaluation1, Evaluation2 >::type OPM_HOST_DEVICE | Opm::pow (const Evaluation1 &base, const Evaluation2 &exp)
template<class Evaluation>
OPM_HOST_DEVICE bool | Opm::isfinite (const Evaluation &value)
template<class Evaluation>
OPM_HOST_DEVICE bool | Opm::isnan (const Evaluation &value)

## Detailed Description

A traits class which provides basic mathematical functions for arbitrary scalar floating point values.

The reason why this is done in such a complicated way is to enable other approaches, in particular automatic differentiation based ones.