Reference documentation for deal.II version 9.1.0-pre
List of all members
Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T > Struct Template Reference

#include <deal.II/differentiation/ad/ad_drivers.h>

Static Public Member Functions

Configuration
static void initialize_global_environment (const unsigned int n_independent_variables)
 
Drivers for scalar functions
static ScalarType value (const std::vector< ADNumberType > &dependent_variables)
 
static void gradient (const std::vector< ADNumberType > &independent_variables, const std::vector< ADNumberType > &dependent_variables, Vector< ScalarType > &gradient)
 
static void hessian (const std::vector< ADNumberType > &independent_variables, const std::vector< ADNumberType > &dependent_variables, FullMatrix< ScalarType > &hessian)
 
Drivers for vector functions
static void values (const std::vector< ADNumberType > &dependent_variables, Vector< ScalarType > &values)
 
static void jacobian (const std::vector< ADNumberType > &independent_variables, const std::vector< ADNumberType > &dependent_variables, FullMatrix< ScalarType > &jacobian)
 

Detailed Description

template<typename ADNumberType, typename ScalarType, typename T = void>
struct Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >

A prototype driver class for tapeless auto-differentiable numbers.

It is intended that this class be specialized for the valid combinations of auto-differentiable numbers and output scalar number types.

Template Parameters
ADNumberTypeA type corresponding to a supported auto-differentiable number.
ScalarTypeA real or complex floating point number type that is the scalar value type used for input to, and output from, operations performed with auto-differentiable numbers.
TAn arbitrary type resulting from the application of the SFINAE idiom to selectively specialize this class.
Author
Jean-Paul Pelteret, 2017

Definition at line 352 of file ad_drivers.h.

Member Function Documentation

template<typename ADNumberType , typename ScalarType , typename T = void>
static void Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::initialize_global_environment ( const unsigned int  n_independent_variables)
static

In the event that the tapeless mode requires a priori knowledge of how many directional derivatives might need to be computed, this function informs the auto-differention library of what this number is.

Parameters
[in]n_independent_variablesThe number of independent variables that will be used for the entire duration of the simulation.
Warning
For ADOL-C tapeless numbers, the value given to n_independent_variables should be the maximum number of independent variables that will be used for the entire duration of the simulation. This is important in the context of, for example, hp-FEM and for multiple constitutive models with a different number of fields from which a linearization must be computed.
template<typename ADNumberType , typename ScalarType , typename T = void>
static ScalarType Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::value ( const std::vector< ADNumberType > &  dependent_variables)
static

Computes the value of the scalar field.

Parameters
[in]dependent_variablesThe dependent variables whose values are to be extracted.
Returns
The scalar value of the function.
template<typename ADNumberType , typename ScalarType , typename T = void>
static void Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::gradient ( const std::vector< ADNumberType > &  independent_variables,
const std::vector< ADNumberType > &  dependent_variables,
Vector< ScalarType > &  gradient 
)
static

Computes the gradient of the scalar field with respect to all independent variables.

Parameters
[in]independent_variablesThe independent variables whose sensitivities were tracked.
[in]dependent_variablesThe (single) dependent variable whose gradients are to be extracted.
[out]gradientThe scalar values of the dependent function's gradients. It is expected that this vector be of the correct size (with length n_independent_variables).
template<typename ADNumberType , typename ScalarType , typename T = void>
static void Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::hessian ( const std::vector< ADNumberType > &  independent_variables,
const std::vector< ADNumberType > &  dependent_variables,
FullMatrix< ScalarType > &  hessian 
)
static

Computes the Hessian of the scalar field with respect to all independent variables.

Parameters
[in]independent_variablesThe independent variables whose sensitivities were tracked.
[in]dependent_variablesThe (single) dependent variable whose Hessians are to be extracted.
[out]hessianThe scalar values of the dependent function's Hessian. It is expected that this matrix be of the correct size (with dimensions n_independent_variables \(\times\)n_independent_variables).
template<typename ADNumberType , typename ScalarType , typename T = void>
static void Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::values ( const std::vector< ADNumberType > &  dependent_variables,
Vector< ScalarType > &  values 
)
static

Computes the values of the vector field.

Parameters
[in]dependent_variablesThe dependent variables whose Hessians are to be extracted.
[out]valuesThe scalar values of the dependent functions. It is expected that this vector be of the correct size (with length n_dependent_variables).
template<typename ADNumberType , typename ScalarType , typename T = void>
static void Differentiation::AD::TapelessDrivers< ADNumberType, ScalarType, T >::jacobian ( const std::vector< ADNumberType > &  independent_variables,
const std::vector< ADNumberType > &  dependent_variables,
FullMatrix< ScalarType > &  jacobian 
)
static

Computes the Jacobian of the vector field.

The Jacobian of a vector field is in essense the gradient of each dependent variable with respect to all independent variables. This operation is therefore analogous to the gradient() operation performed on a collection of scalar valued fields.

Parameters
[in]independent_variablesThe independent variables whose sensitivities were tracked.
[in]dependent_variablesThe dependent variables whose Jacobian are to be extracted.
[out]jacobianThe scalar values of the dependent functions' Jacobian. It is expected that this matrix be of the correct size (with dimensions n_dependent_variables \(\times\)n_independent_variables).

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