34#include "../code_config.hpp"
88#if defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE)
96template <
typename Expr>
98 return data.cast().getValue();
159template <class T, su2enable_if<std::is_trivial<T>::value> = 0>
164template <class T, su2enable_if<!std::is_trivial<T>::value> = 0>
166 return val.getValue();
176template <
class... Ts>
181#define SPRINTF SU2_TYPE::sprintf
simd::Array< unsigned long, Double::Size > Int
Definition CNumericsSIMD.hpp:37
Main routines for the algorithmic differentiation (AD) structure.
double passivedouble
Definition code_config.hpp:129
#define FORCEINLINE
Definition code_config.hpp:44
passivedouble su2double
Definition code_config.hpp:181
Namespace for defining the datatype wrapper routines, this acts as a base class for type interfaces f...
void sprintf(char *str, const char *format, Ts &&... args)
Wrapper to sprintf to be able to print active types and AD expressions.
Definition datatype_structure.hpp:177
void SetSecondary(su2double &data, const passivedouble &val)
Set the secondary value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:115
short Short(const su2double &data)
Casts the primitive value to short (uses GetValue, already implemented for each type).
Definition datatype_structure.hpp:155
passivedouble GetDerivative(const su2double &data)
Get the derivative value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:117
passivedouble GetSecondary(const su2double &data)
Get the secondary value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:119
auto PassiveValue(const T &val)
Definition datatype_structure.hpp:139
void SetDerivative(su2double &data, const passivedouble &val)
Set the derivative value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:121
void SetValue(su2double &data, const passivedouble &val)
Set the (primitive) value of the datatype (needs to be implemented for each new type).
Definition datatype_structure.hpp:111
const T & _printGetValue(const T &val)
Definition datatype_structure.hpp:160
passivedouble GetValue(const su2double &data)
Get the (primitive) value of the datatype (needs to be specialized for active types).
Definition datatype_structure.hpp:113
static passivedouble Value(const su2double &val)
Definition datatype_structure.hpp:136
Get the passive value of any variable. For most types return directly, specialize for su2double to ca...
Definition datatype_structure.hpp:131
static T Value(const T &val)
Definition datatype_structure.hpp:132