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

Implements all methods from AggregatedTypeVectorAccessWrapper, that can be implemented with combinations of other methods. More...

#include <aggregatedTypeVectorAccessWrapper.hpp>

Inheritance diagram for codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >:

Public Types

using Identifier = T_Identifier
 See RealTraits::DataExtraction::Identifier.
 
using InnerInterface
 See AggregatedTypeVectorAccessWrapperBase.
 
using Real = T_Real
 See RealTraits::DataExtraction::Real.
 
- Public Types inherited from codi::VectorAccessInterface< T_Real, T_Identifier >
using Identifier = T_Identifier
 See VectorAccessInterface.
 
using Real = T_Real
 See VectorAccessInterface.
 

Public Member Functions

 AggregatedTypeVectorAccessWrapperBase (InnerInterface *innerInterface)
 Constructor.
 
Misc
size_t getVectorSize () const
 Vector size in the current tape evaluation.
 
bool isLhsZero ()
 True if the adjoint set with setLhsAdjoint is zero.
 
Indirect adjoint access
void setLhsAdjoint (Identifier const &index)
 
void updateAdjointWithLhs (Identifier const &index, Real const &jacobian)
 
Indirect tangent access
void setLhsTangent (Identifier const &index)
 
void updateTangentWithLhs (Identifier const &index, Real const &jacobian)
 
Direct adjoint access
void getAdjointVec (Identifier const &index, Real *const vec)
 Get the adjoint entry.
 
Real const * getAdjointVec (Identifier const &index)
 Get the adjoint entry.
 
void updateAdjointVec (Identifier const &index, Real const *const vec)
 Update the adjoint entry.
 
Primal access
bool hasPrimals ()
 True if the tape/vector interface has primal values.
 
- Public Member Functions inherited from codi::VectorAccessInterface< T_Real, T_Identifier >
virtual ~VectorAccessInterface ()
 Destructor.
 
virtual VectorAccessInterfaceclone () const =0
 
virtual void resetAdjoint (Identifier const &index, size_t dim)=0
 Set the adjoint component to zero.
 
virtual void resetAdjointVec (Identifier const &index)=0
 Set the adjoint entry to zero.
 
virtual Real getAdjoint (Identifier const &index, size_t dim)=0
 Get the adjoint component.
 
virtual void updateAdjoint (Identifier const &index, size_t dim, Real const &adjoint)=0
 Update the adjoint component.
 
virtual void setPrimal (Identifier const &index, Real const &primal)=0
 Set the primal value.
 
virtual Real getPrimal (Identifier const &index)=0
 Get the primal value.
 

Protected Attributes

std::vector< Realbuffer
 Temporary storage for getAdjointVec access.
 
InnerInterfaceinnerInterface
 Reference to the accessor of the underlying tape.
 
std::vector< Reallhs
 Temporary storage for indirect adjoint or tangent updates.
 

Detailed Description

template<typename T_Real, typename T_Identifier, typename T_InnerInterface>
struct codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >

Implements all methods from AggregatedTypeVectorAccessWrapper, that can be implemented with combinations of other methods.

Template Parameters
T_RealPrimal value type of the combined type.
T_IdentifierIdentifier type type of the combined type.
T_InnerInterfaceThe VectorAccessInterface of the underlying tape.

Member Typedef Documentation

◆ InnerInterface

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
using codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::InnerInterface
Initial value:
T_InnerInterface

See AggregatedTypeVectorAccessWrapperBase.

Member Function Documentation

◆ getAdjointVec() [1/2]

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
Real const * codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::getAdjointVec ( Identifier const & index)
inlinevirtual

Get the adjoint entry.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ getAdjointVec() [2/2]

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::getAdjointVec ( Identifier const & index,
Real *const vec )
inlinevirtual

Get the adjoint entry.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ getVectorSize()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
size_t codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::getVectorSize ( ) const
inlinevirtual

Vector size in the current tape evaluation.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ hasPrimals()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
bool codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::hasPrimals ( )
inlinevirtual

True if the tape/vector interface has primal values.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ isLhsZero()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
bool codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::isLhsZero ( )
inlinevirtual

True if the adjoint set with setLhsAdjoint is zero.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ setLhsAdjoint()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::setLhsAdjoint ( Identifier const & index)
inlinevirtual

Identify the lhs variable $ w $. Create an internal copy of $ \bar w $ and set $ \bar w $ to zero.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ setLhsTangent()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::setLhsTangent ( Identifier const & index)
inlinevirtual

Perform $ \dot w = \text{internalMem} $. Internal memory is reset afterwards.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ updateAdjointVec()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::updateAdjointVec ( Identifier const & index,
Real const *const vec )
inlinevirtual

Update the adjoint entry.

Implements codi::VectorAccessInterface< T_Real, T_Identifier >.

◆ updateAdjointWithLhs()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::updateAdjointWithLhs ( Identifier const & index,
Real const & jacobian )
inlinevirtual

◆ updateTangentWithLhs()

template<typename T_Real , typename T_Identifier , typename T_InnerInterface >
void codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::updateTangentWithLhs ( Identifier const & index,
Real const & jacobian )
inlinevirtual

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