https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CompileTimeDerivatives::CTRef< tag, T > Class Template Reference

Variable value, referencing a variable of type T. More...

#include <CompileTimeDerivatives.h>

Inheritance diagram for CompileTimeDerivatives::CTRef< tag, T >:
[legend]

Public Types

typedef CTCleanType< T > ResultType
 

Public Member Functions

 CTRef (const T &ref)
 
const T & operator() () const
 
std::string print () const
 
template<CTTag dtag>
auto D () const
 

Static Public Member Functions

static constexpr int precedence ()
 precedence should reflect C++ operator precedence exactly (higher is binding tighter) More...
 
static constexpr bool leftAssociative ()
 left/right associative property should reflect C++ operator properties exactly More...
 

Protected Attributes

const T & _ref
 

Detailed Description

template<CTTag tag, typename T>
class CompileTimeDerivatives::CTRef< tag, T >

Variable value, referencing a variable of type T.

This object is tagged with a CTTag to enable taking symbolic derivatives.

Definition at line 340 of file CompileTimeDerivatives.h.

Member Typedef Documentation

◆ ResultType

template<CTTag tag, typename T >
typedef CTCleanType<T> CompileTimeDerivatives::CTRef< tag, T >::ResultType

Definition at line 356 of file CompileTimeDerivatives.h.

Constructor & Destructor Documentation

◆ CTRef()

template<CTTag tag, typename T >
CompileTimeDerivatives::CTRef< tag, T >::CTRef ( const T &  ref)
inline

Definition at line 343 of file CompileTimeDerivatives.h.

Member Function Documentation

◆ D()

template<CTTag tag, typename T >
template<CTTag dtag>
auto CompileTimeDerivatives::CTRef< tag, T >::D ( ) const
inline

Definition at line 348 of file CompileTimeDerivatives.h.

349  {
350  if constexpr (tag == dtag)
351  return CTOne<ResultType>();
352  else
353  return CTNull<ResultType>();
354  }

◆ leftAssociative()

static constexpr bool CompileTimeDerivatives::CTBase::leftAssociative ( )
inlinestaticinherited

left/right associative property should reflect C++ operator properties exactly

Definition at line 31 of file CompileTimeDerivatives.h.

31 { return false; }

◆ operator()()

template<CTTag tag, typename T >
const T& CompileTimeDerivatives::CTRef< tag, T >::operator() ( ) const
inline

Definition at line 344 of file CompileTimeDerivatives.h.

344 { return _ref; }

◆ precedence()

static constexpr int CompileTimeDerivatives::CTBase::precedence ( )
inlinestaticinherited

precedence should reflect C++ operator precedence exactly (higher is binding tighter)

Definition at line 29 of file CompileTimeDerivatives.h.

29 { return 0; }

◆ print()

template<CTTag tag, typename T >
std::string CompileTimeDerivatives::CTRef< tag, T >::print ( ) const
inline

Definition at line 345 of file CompileTimeDerivatives.h.

345 { return "[v" + printTag<tag>() + "]"; }

Member Data Documentation

◆ _ref

template<CTTag tag, typename T >
const T& CompileTimeDerivatives::CTRef< tag, T >::_ref
protected

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