CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::ExpressionInterface< T_Real, T_Impl > Struct Template Reference

Base class for all CoDiPack expressions. More...

#include <expressionInterface.hpp>

Inheritance diagram for codi::ExpressionInterface< T_Real, T_Impl >:

Public Types

using ActiveResult = void
 Type into which the expression can be converted. Usually also the type from which it is constructed.
 
using Impl = T_Impl
 See ExpressionInterface.
 
using Real = T_Real
 See ExpressionInterface.
 
- Public Types inherited from codi::NodeInterface< T_Impl >
using Impl = T_Impl
 See NodeInterface.
 

Public Member Functions

Impl const & cast () const
 Cast to the implementation.
 
 ExpressionInterface ()=default
 Constructor.
 
 ExpressionInterface (ExpressionInterface const &)=default
 Constructor.
 
- Public Member Functions inherited from codi::NodeInterface< T_Impl >
Impl const & cast () const
 Cast to the implementation.
 
template<typename Logic , typename... Args>
void forEachLink (TraversalLogic< Logic > &logic, Args &&... args) const
 

Interface definition

using StoreAs = ExpressionInterface
 Defines how this expression is stored in an expression tree.
 
Real const getValue () const
 Compute the primal value that is usually evaluated by the statement/expression.
 
template<size_t argNumber>
Real getJacobian () const
 

Additional Inherited Members

- Static Public Member Functions inherited from codi::NodeInterface< T_Impl >
template<typename Logic , typename... Args>
static Logic::ResultType constexpr forEachLinkConstExpr (Args &&... args)
 
- Static Public Attributes inherited from codi::NodeInterface< T_Impl >
static bool constexpr EndPoint = false
 If this expression is handled as a leaf in the tree.
 

Detailed Description

template<typename T_Real, typename T_Impl>
struct codi::ExpressionInterface< T_Real, T_Impl >

Base class for all CoDiPack expressions.

See Expression design documentation for details about the expression system in CoDiPack.

This interface resembles an rvalue in C++.

Template Parameters
T_RealOriginal primal value of the statement/expression.
T_ImplClass implementing this interface.

Member Function Documentation

◆ getJacobian()

template<typename T_Real , typename T_Impl >
template<size_t argNumber>
Real codi::ExpressionInterface< T_Real, T_Impl >::getJacobian ( ) const
inline

Get the Jacobian with respect to the given argument.

This is just the local Jacobian and not the one for the whole expression tree.


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