Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::diff_var< ValType, 1, O > Struct Template Reference

Detailed description

template<typename ValType, uint32 O>
struct cugar::diff_var< ValType, 1, O >

Specialization of diff_var to scalar (i.e. 1-component) differentials This class allows to represent variables that carry an associated first-order differential (or gradient) with respect to a predefined set of variables.

Template Parameters
ValTypethe value type of the expression
DiffTypethe type of differential / gradient of the expression

#include <diff.h>

Public Types

typedef ValType value_type
 
typedef diff_var< ValType, 1, O-1 > diff_component_type
 
typedef diff_component_type diff_type
 

Public Methods

CUGAR_HOST_DEVICE diff_var ()
 
CUGAR_HOST_DEVICE diff_var (const diff_var< ValType, 1, O > &_other)
 
CUGAR_HOST_DEVICE diff_var (const value_type _u, const diff_type _du)
 
CUGAR_HOST_DEVICE diff_var (const value_type _u, const value_type _du)
 
CUGAR_HOST_DEVICE diff_var (value_type _u)
 
CUGAR_HOST_DEVICE operator value_type () const
 
CUGAR_HOST_DEVICE diff_varoperator= (const value_type &_u)
 
CUGAR_HOST_DEVICE diff_type diff () const
 
CUGAR_HOST_DEVICE const diff_var< ValType, 1, O > & operator[] (const uint32 i) const
 
CUGAR_HOST_DEVICE diff_var< ValType, 1, O > & operator[] (const uint32 i)
 

Public Members

value_type u
 
diff_type du
 

Constructor & Destructor Documentation

◆ diff_var() [1/5]

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::diff_var ( )
inline

default constructor

◆ diff_var() [2/5]

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::diff_var ( const diff_var< ValType, 1, O > &  _other)
inline

copy constructor

◆ diff_var() [3/5]

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::diff_var ( const value_type  _u,
const diff_type  _du 
)
inline

constructor

Parameters
_uscalar value
_dudifferential

◆ diff_var() [4/5]

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::diff_var ( const value_type  _u,
const value_type  _du 
)
inline

constructor

Parameters
_uscalar value
_dudifferential

◆ diff_var() [5/5]

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::diff_var ( value_type  _u)
inlineexplicit

constructor from scalar

Parameters
_uscalar value

Member Function Documentation

◆ diff()

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE diff_type cugar::diff_var< ValType, 1, O >::diff ( ) const
inline

return the first-order differential

◆ operator value_type()

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE cugar::diff_var< ValType, 1, O >::operator value_type ( ) const
inline

conversion to scalar

◆ operator=()

template<typename ValType , uint32 O>
CUGAR_HOST_DEVICE diff_var& cugar::diff_var< ValType, 1, O >::operator= ( const value_type &  _u)
inline

assignment to scalar


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