Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Public Member Functions | Public Attributes | List of all members
serac::dual< gradient_type > Struct Template Reference

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

#include <dual.hpp>

Public Member Functions

constexpr SERAC_HOST_DEVICE auto & operator= (double b)
 Copy assignment operator. More...
 

Public Attributes

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

Detailed Description

template<typename gradient_type>
struct serac::dual< 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 29 of file dual.hpp.

Member Function Documentation

◆ operator=()

template<typename gradient_type >
constexpr SERAC_HOST_DEVICE auto& serac::dual< gradient_type >::operator= ( double  b)
inlineconstexpr

Copy assignment operator.

Parameters
brhs to assign to the dual number value
Returns
Resulting dual

Definition at line 39 of file dual.hpp.


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