MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::future::dual< value_type, gradient_type > Struct Template Reference

Dual number struct (value plus gradient) More...

#include <dual.hpp>

Public Member Functions

MFEM_HOST_DEVICE auto operator= (real_t a) -> dual< value_type, gradient_type > &
 assignment of a real_t to a value of a dual. Promotes a real_t to a dual with a zero gradient value.
 

Public Attributes

value_type value
 the actual numerical value
 
gradient_type gradient
 the partial derivatives of value w.r.t. some other quantity
 

Detailed Description

template<typename value_type, typename gradient_type>
struct mfem::future::dual< value_type, gradient_type >

Dual number struct (value plus gradient)

Template Parameters
gradient_typeThe type of the gradient (should support addition, scalar multiplication/division, and unary negation operators)

Definition at line 35 of file dual.hpp.

Member Function Documentation

◆ operator=()

template<typename value_type , typename gradient_type >
MFEM_HOST_DEVICE auto mfem::future::dual< value_type, gradient_type >::operator= ( real_t a) -> dual<value_type, gradient_type>&
inline

assignment of a real_t to a value of a dual. Promotes a real_t to a dual with a zero gradient value.

Definition at line 45 of file dual.hpp.

Member Data Documentation

◆ gradient

template<typename value_type , typename gradient_type >
gradient_type mfem::future::dual< value_type, gradient_type >::gradient

the partial derivatives of value w.r.t. some other quantity

Definition at line 40 of file dual.hpp.

◆ value

template<typename value_type , typename gradient_type >
value_type mfem::future::dual< value_type, gradient_type >::value

the actual numerical value

Definition at line 38 of file dual.hpp.


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