Implements all methods from AggregatedTypeVectorAccessWrapper, that can be implemented with combinations of other methods. More...
#include <aggregatedTypeVectorAccessWrapper.hpp>
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 VectorAccessInterface * | clone () 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< Real > | buffer |
Temporary storage for getAdjointVec access. | |
InnerInterface & | innerInterface |
Reference to the accessor of the underlying tape. | |
std::vector< Real > | lhs |
Temporary storage for indirect adjoint or tangent updates. | |
Implements all methods from AggregatedTypeVectorAccessWrapper, that can be implemented with combinations of other methods.
T_Real | Primal value type of the combined type. |
T_Identifier | Identifier type type of the combined type. |
T_InnerInterface | The VectorAccessInterface of the underlying tape. |
using codi::AggregatedTypeVectorAccessWrapperBase< T_Real, T_Identifier, T_InnerInterface >::InnerInterface |
|
inlinevirtual |
Get the adjoint entry.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Get the adjoint entry.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Vector size in the current tape evaluation.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
True if the tape/vector interface has primal values.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
True if the adjoint set with setLhsAdjoint is zero.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Identify the lhs variable . Create an internal copy of and set to zero.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Perform . Internal memory is reset afterwards.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Update the adjoint entry.
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Perform
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.
|
inlinevirtual |
Perform .
Implements codi::VectorAccessInterface< T_Real, T_Identifier >.