Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions | Variables
Sacado_Fad_Ops.hpp File Reference
#include "Sacado_Fad_Expression.hpp"
#include "Sacado_Fad_Ops_Fwd.hpp"
#include "Sacado_cmath.hpp"
#include <ostream>
Include dependency graph for Sacado_Fad_Ops.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Sacado::Fad::PowerOp< ExprT1, ExprT2, is_simd >
 
struct  Sacado::Fad::ExprSpec< PowerOp< ExprT1, ExprT2 > >
 
struct  Sacado::Fad::ExprSpec< PowerOp< ExprT1, ConstExpr< T2 > > >
 
struct  Sacado::Fad::ExprSpec< PowerOp< ConstExpr< T1 >, ExprT2 > >
 
class  Sacado::Fad::Expr< PowerOp< ExprT1, ExprT2, true >, ExprSpecDefault >
 
class  Sacado::Fad::Expr< PowerOp< ExprT1, ConstExpr< T2 >, true >, ExprSpecDefault >
 
class  Sacado::Fad::Expr< PowerOp< ConstExpr< T1 >, ExprT2, true >, ExprSpecDefault >
 
class  Sacado::Fad::Expr< PowerOp< ExprT1, ExprT2, false >, ExprSpecDefault >
 
class  Sacado::Fad::Expr< PowerOp< ExprT1, ConstExpr< T2 >, false >, ExprSpecDefault >
 
class  Sacado::Fad::Expr< PowerOp< ConstExpr< T1 >, ExprT2, false >, ExprSpecDefault >
 

Namespaces

 Sacado
 
 Sacado::Fad
 Namespace for forward-mode AD classes.
 

Macros

#define FAD_UNARYOP_MACRO(OPNAME, OP, USING, VALUE, DX, FASTACCESSDX)
 
#define FAD_BINARYOP_MACRO(OPNAME, OP, USING, VALUE, DX, FASTACCESSDX, VAL_CONST_DX_1, VAL_CONST_DX_2, CONST_DX_1, CONST_DX_2, CONST_FASTACCESSDX_1, CONST_FASTACCESSDX_2)
 
#define FAD_RELOP_MACRO(OP)
 
#define FAD_BOOL_MACRO(OP)
 

Functions

 FAD_UNARYOP_MACRO (operator+, UnaryPlusOp,;, expr.val(), expr.dx(i), expr.fastAccessDx(i)) FAD_UNARYOP_MACRO(operator-
 
expr val ()
 
expr expr dx (i)
 
expr expr expr fastAccessDx (i)) FAD_UNARYOP_MACRO(exp
 
 exp (expr.val())
 
 log (expr.val())
 
 log10 (expr.val())
 
 sqrt (expr.val())
 
 cos (expr.val())
 
 sin (expr.val())
 
 acos (expr.val())
 
 asin (expr.val())
 
 atan (expr.val())
 
 cosh (expr.val())
 
 sinh (expr.val())
 
 tanh (expr.val())
 
 acosh (expr.val())
 
 asinh (expr.val())
 
 atanh (expr.val())
 
 abs (expr.val())
 
 if_then_else (expr.val() >=0, expr.dx(i), value_type(-expr.dx(i)))
 
 if_then_else (expr.val() >=0, expr.fastAccessDx(i), value_type(-expr.fastAccessDx(i)))) FAD_UNARYOP_MACRO(fabs
 
 fabs (expr.val())
 
 atan2 (expr1.val(), expr2.val())
 
expr2 expr2 atan2 (c.val(), expr2.val())
 
expr2 expr2 atan2 (expr1.val(), c.val())
 
 if_then_else (expr1.val() >=expr2.val(), expr1.val(), expr2.val())
 
 if_then_else (expr1.val() >=expr2.val(), expr1.dx(i), expr2.dx(i))
 
 if_then_else (c.val() >=expr2.val(), value_type(c.val()), expr2.val())
 
 if_then_else (expr1.val() >=c.val(), expr1.val(), value_type(c.val()))
 
 if_then_else (c.val() >=expr2.val(), value_type(0.0), expr2.dx(i))
 
 if_then_else (expr1.val() >=c.val(), expr1.dx(i), value_type(0.0))
 
 if_then_else (expr1.val()<=expr2.val(), expr1.val(), expr2.val())
 
 if_then_else (expr1.val()<=expr2.val(), expr1.dx(i), expr2.dx(i))
 
 if_then_else (c.val()<=expr2.val(), value_type(c.val()), expr2.val())
 
 if_then_else (expr1.val()<=c.val(), expr1.val(), value_type(c.val()))
 
 if_then_else (c.val()<=expr2.val(), value_type(0), expr2.dx(i))
 
 if_then_else (expr1.val()<=c.val(), expr1.dx(i), value_type(0))
 
template<typename T1 , typename T2 >
KOKKOS_INLINE_FUNCTION
mpl::enable_if_c< ExprLevel
< Expr< T1 > >::value==ExprLevel
< Expr< T2 > >::value, Expr
< PowerOp< Expr< T1 >, Expr
< T2 > > > >::type 
Sacado::Fad::pow (const Expr< T1 > &expr1, const Expr< T2 > &expr2)
 
template<typename T >
KOKKOS_INLINE_FUNCTION Expr
< PowerOp< Expr< T >, Expr< T > > > 
Sacado::Fad::pow (const Expr< T > &expr1, const Expr< T > &expr2)
 
template<typename T >
KOKKOS_INLINE_FUNCTION Expr
< PowerOp< ConstExpr< typename
Expr< T >::value_type >, Expr
< T > > > 
Sacado::Fad::pow (const typename Expr< T >::value_type &c, const Expr< T > &expr)
 
template<typename T >
KOKKOS_INLINE_FUNCTION Expr
< PowerOp< Expr< T >
, ConstExpr< typename Expr< T >
::value_type > > > 
Sacado::Fad::pow (const Expr< T > &expr, const typename Expr< T >::value_type &c)
 
template<typename T >
KOKKOS_INLINE_FUNCTION Sacado::Fad::pow (const typename Expr< T >::scalar_type &c, const Expr< T > &expr)
 
template<typename T >
KOKKOS_INLINE_FUNCTION Sacado::Fad::pow (const Expr< T > &expr, const typename Expr< T >::scalar_type &c)
 
template<typename ExprT >
KOKKOS_INLINE_FUNCTION bool Sacado::Fad::operator! (const Expr< ExprT > &expr)
 
template<typename ExprT >
KOKKOS_INLINE_FUNCTION bool Sacado::Fad::toBool (const Expr< ExprT > &x)
 
template<typename ExprT >
std::ostream & Sacado::Fad::operator<< (std::ostream &os, const Expr< ExprT > &x)
 

Variables

 UnaryMinusOp
 
expr expr expr ExpOp
 
 LogOp
 
expr expr Log10Op
 
expr expr SqrtOp
 
expr expr CosOp
 
expr expr SinOp
 
expr expr TanOp
 
expr expr ACosOp
 
expr expr ASinOp
 
expr expr ATanOp
 
expr expr CoshOp
 
expr expr SinhOp
 
expr expr TanhOp
 
expr expr ACoshOp
 
expr expr ASinhOp
 
expr expr ATanhOp
 
expr expr AbsOp
 
 FAbsOp
 
 AdditionOp
 
expr1 expr1 expr1 c expr1
expr2 expr1 expr2 expr1 
SubtractionOp
 
expr1 expr1 expr1 c expr1
expr2 expr1 expr2 expr1 expr1
expr1 expr1 c expr1 expr2
expr1 expr2 expr1 
DivisionOp
 
expr1 expr1 expr1 c expr1
expr2 expr1 expr2 expr1 expr1
expr1 expr1 c expr1 expr2
expr1 expr2 expr1 expr1 expr1
expr1 c expr1 expr2 expr1
expr2 expr1 
Atan2Op
 
expr2 expr2 c c c c MaxOp
 
 MinOp
 

Macro Definition Documentation

#define FAD_UNARYOP_MACRO (   OPNAME,
  OP,
  USING,
  VALUE,
  DX,
  FASTACCESSDX 
)

Definition at line 60 of file Sacado_Fad_Ops.hpp.

#define FAD_BINARYOP_MACRO (   OPNAME,
  OP,
  USING,
  VALUE,
  DX,
  FASTACCESSDX,
  VAL_CONST_DX_1,
  VAL_CONST_DX_2,
  CONST_DX_1,
  CONST_DX_2,
  CONST_FASTACCESSDX_1,
  CONST_FASTACCESSDX_2 
)
#define FAD_RELOP_MACRO (   OP)
Value:
namespace Sacado { \
namespace Fad { \
template <typename ExprT1, typename ExprT2> \
KOKKOS_INLINE_FUNCTION \
bool \
operator OP (const Expr<ExprT1>& expr1, \
const Expr<ExprT2>& expr2) \
{ \
return expr1.val() OP expr2.val(); \
} \
\
template <typename ExprT2> \
KOKKOS_INLINE_FUNCTION \
bool \
operator OP (const typename Expr<ExprT2>::value_type& a, \
const Expr<ExprT2>& expr2) \
{ \
return a OP expr2.val(); \
} \
\
template <typename ExprT1> \
KOKKOS_INLINE_FUNCTION \
bool \
operator OP (const Expr<ExprT1>& expr1, \
const typename Expr<ExprT1>::value_type& b) \
{ \
return expr1.val() OP b; \
} \
} \
}

Definition at line 1929 of file Sacado_Fad_Ops.hpp.

#define FAD_BOOL_MACRO (   OP)
Value:
namespace Sacado { \
namespace Fad { \
template <typename ExprT1, typename ExprT2> \
KOKKOS_INLINE_FUNCTION \
bool \
operator OP (const Expr<ExprT1>& expr1, \
const Expr<ExprT2>& expr2) \
{ \
return toBool(expr1) OP toBool(expr2); \
} \
\
template <typename ExprT2> \
bool \
operator OP (const typename Expr<ExprT2>::value_type& a, \
const Expr<ExprT2>& expr2) \
{ \
return a OP toBool(expr2); \
} \
\
template <typename ExprT1> \
KOKKOS_INLINE_FUNCTION \
bool \
operator OP (const Expr<ExprT1>& expr1, \
const typename Expr<ExprT1>::value_type& b) \
{ \
return toBool(expr1) OP b; \
} \
} \
}
KOKKOS_INLINE_FUNCTION bool toBool(const Expr< T > &xx)
#define KOKKOS_INLINE_FUNCTION

Definition at line 2009 of file Sacado_Fad_Ops.hpp.

Function Documentation

FAD_UNARYOP_MACRO ( operator+  ,
UnaryPlusOp  ,
,
expr.  val(),
expr.  dxi,
expr.  fastAccessDx
)
expr val ( )
expr expr dx ( )
expr expr expr fastAccessDx ( )
exp ( expr.  val())
log ( expr.  val())
log10 ( expr.  val())
sqrt ( expr.  val())
cos ( expr.  val())
sin ( expr.  val())
acos ( expr.  val())
asin ( expr.  val())
atan ( expr.  val())
cosh ( expr.  val())
sinh ( expr.  val())
tanh ( expr.  val())
acosh ( expr.  val())
asinh ( expr.  val())
atanh ( expr.  val())
abs ( expr.  val())
if_then_else ( expr.val() >=  0,
expr.  dxi,
value_type(-expr.dx(i))   
)
if_then_else ( expr.val() >=  0,
expr.  fastAccessDxi,
value_type(-expr.fastAccessDx(i))   
)
fabs ( expr.  val())
atan2 ( expr1.  val(),
expr2.  val() 
)
expr2 expr2 atan2 ( c.  val(),
expr2.  val() 
)
expr2 expr2 atan2 ( expr1.  val(),
c.  val() 
)
if_then_else ( expr1.  val) >=expr2.val(,
expr1.  val(),
expr2.  val() 
)
if_then_else ( expr1.  val) >=expr2.val(,
expr1.  dxi,
expr2.  dx
)
if_then_else ( c.  val) >=expr2.val(,
value_type(c.val())  ,
expr2.  val() 
)
if_then_else ( expr1.  val) >=c.val(,
expr1.  val(),
value_type(c.val())   
)
if_then_else ( c.  val) >=expr2.val(,
value_type(0.0)  ,
expr2.  dx
)
if_then_else ( expr1.  val) >=c.val(,
expr1.  dxi,
value_type(0.0)   
)
if_then_else ( expr1.  val)<=expr2.val(,
expr1.  val(),
expr2.  val() 
)
if_then_else ( expr1.  val)<=expr2.val(,
expr1.  dxi,
expr2.  dx
)
if_then_else ( c.  val)<=expr2.val(,
value_type(c.val())  ,
expr2.  val() 
)
if_then_else ( expr1.  val)<=c.val(,
expr1.  val(),
value_type(c.val())   
)
if_then_else ( c.  val)<=expr2.val(,
value_type(0)  ,
expr2.  dx
)
if_then_else ( expr1.  val)<=c.val(,
expr1.  dxi,
value_type(0)   
)

Definition at line 691 of file Sacado_Fad_Ops.hpp.

Variable Documentation

UnaryMinusOp

Definition at line 141 of file Sacado_Fad_Ops.hpp.

expr expr expr ExpOp

Definition at line 147 of file Sacado_Fad_Ops.hpp.

LogOp

Definition at line 153 of file Sacado_Fad_Ops.hpp.

expr expr Log10Op

Definition at line 159 of file Sacado_Fad_Ops.hpp.

expr expr SqrtOp

Definition at line 165 of file Sacado_Fad_Ops.hpp.

expr expr CosOp

Definition at line 171 of file Sacado_Fad_Ops.hpp.

expr expr SinOp

Definition at line 177 of file Sacado_Fad_Ops.hpp.

expr expr TanOp

Definition at line 183 of file Sacado_Fad_Ops.hpp.

expr expr ACosOp

Definition at line 191 of file Sacado_Fad_Ops.hpp.

expr expr ASinOp

Definition at line 198 of file Sacado_Fad_Ops.hpp.

expr expr ATanOp

Definition at line 205 of file Sacado_Fad_Ops.hpp.

expr expr CoshOp

Definition at line 211 of file Sacado_Fad_Ops.hpp.

expr expr SinhOp

Definition at line 217 of file Sacado_Fad_Ops.hpp.

expr expr TanhOp

Definition at line 223 of file Sacado_Fad_Ops.hpp.

expr expr ACoshOp

Definition at line 230 of file Sacado_Fad_Ops.hpp.

expr expr ASinhOp

Definition at line 238 of file Sacado_Fad_Ops.hpp.

expr expr ATanhOp

Definition at line 245 of file Sacado_Fad_Ops.hpp.

expr expr AbsOp

Definition at line 252 of file Sacado_Fad_Ops.hpp.

FAbsOp

Definition at line 258 of file Sacado_Fad_Ops.hpp.

AdditionOp

Definition at line 591 of file Sacado_Fad_Ops.hpp.

expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 SubtractionOp

Definition at line 603 of file Sacado_Fad_Ops.hpp.

expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 DivisionOp

Definition at line 628 of file Sacado_Fad_Ops.hpp.

expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 c expr1 expr2 expr1 expr2 expr1 Atan2Op

Definition at line 643 of file Sacado_Fad_Ops.hpp.

expr2 expr2 c c c c MaxOp

Definition at line 669 of file Sacado_Fad_Ops.hpp.

MinOp

Definition at line 681 of file Sacado_Fad_Ops.hpp.