CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::CustomAdjointVectorInterface< T_Type > Struct Template Referenceabstract

General interface for an arbitrary adjoint evaluation. More...

#include <customAdjointVectorHelper.hpp>

Inheritance diagram for codi::CustomAdjointVectorInterface< T_Type >:

Public Types

using Identifier = typename Type::Identifier
 See LhsExpressionInterface.
 
using Position = typename Tape::Position
 See PositionalEvaluationTapeInterface.
 
using Real = typename Type::Real
 See LhsExpressionInterface.
 
using Tape = typename Type::Tape
 See LhsExpressionInterface.
 
using Type = T_Type
 See CustomAdjointVectorInterface.
 

Public Member Functions

 CustomAdjointVectorInterface ()
 Constructor.
 
virtual ~CustomAdjointVectorInterface ()
 Destructor.
 
Interface definition
virtual void clearAdjoints ()=0
 Set all adjoints to zero.
 
virtual void deleteAdjointVector ()=0
 Delete the adjoint vector.
 
virtual void evaluate (Position const &start, Position const &end)=0
 Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.
 
virtual void evaluateForward (Position const &start, Position const &end)=0
 Perform a forward evaluation of a part of the tape. It has to hold start <= end.
 
virtual VectorAccessInterface< Real, Identifier > * getVectorInterface ()=0
 Get a new general interface to the adjoint vector.
 
Common methods
void evaluate ()
 Perform a full reverse evaluation of the tape.
 
void evaluateForward ()
 Perform a forward evaluation of a part of the tape. It has to hold start <= end.
 
void setTape (Tape &tape)
 Set the tape for the evaluations.
 

Protected Attributes

Tapetape
 Current tape for evaluations. Default: the Type's current tape.
 

Detailed Description

template<typename T_Type>
struct codi::CustomAdjointVectorInterface< T_Type >

General interface for an arbitrary adjoint evaluation.

In contrast to CustomAdjointVectorHelper this interface provides a generalization to the former class. This interface can be used if at compile time the required number of vector entries is not known.

See CustomAdjointVectorHelper for details.

Access to the adjoint vector is gained through the VectorAccessInterface.

Template Parameters
T_TypeThe underlying CoDiPack type.

Member Function Documentation

◆ clearAdjoints()

template<typename T_Type >
virtual void codi::CustomAdjointVectorInterface< T_Type >::clearAdjoints ( )
pure virtual

Set all adjoints to zero.

Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.

◆ deleteAdjointVector()

template<typename T_Type >
virtual void codi::CustomAdjointVectorInterface< T_Type >::deleteAdjointVector ( )
pure virtual

Delete the adjoint vector.

Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.

◆ evaluate() [1/2]

template<typename T_Type >
void codi::CustomAdjointVectorInterface< T_Type >::evaluate ( )
inline

Perform a full reverse evaluation of the tape.

Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.

◆ evaluate() [2/2]

template<typename T_Type >
virtual void codi::CustomAdjointVectorInterface< T_Type >::evaluate ( Position const &  start,
Position const &  end 
)
pure virtual

Perform a reverse evaluation for a part of the tape. It hast to hold start >= end.

Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.

Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >, and codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.

◆ evaluateForward() [1/2]

template<typename T_Type >
void codi::CustomAdjointVectorInterface< T_Type >::evaluateForward ( )
inline

Perform a forward evaluation of a part of the tape. It has to hold start <= end.

Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.

◆ evaluateForward() [2/2]

template<typename T_Type >
virtual void codi::CustomAdjointVectorInterface< T_Type >::evaluateForward ( Position const &  start,
Position const &  end 
)
pure virtual

Perform a forward evaluation of a part of the tape. It has to hold start <= end.

Automatic adjoints management involves bounds checking, resizing, and locking, see AdjointsManagement for details.

Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >, and codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.

◆ getVectorInterface()

template<typename T_Type >
virtual VectorAccessInterface< Real, Identifier > * codi::CustomAdjointVectorInterface< T_Type >::getVectorInterface ( )
pure virtual

Get a new general interface to the adjoint vector.

Implemented in codi::CustomAdjointVectorHelper< T_Type, T_Gradient >.


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