38#include "../../expressions/lhsExpressionInterface.hpp"
40#include "../../traits/realTraits.hpp"
41#include "../interfaces/gradientAccessTapeInterface.hpp"
42#include "../interfaces/internalStatementRecordingTapeInterface.hpp"
44#include "tagTapeBase.hpp"
59 template<
typename T_Real,
typename T_Tag>
62 public TagTapeBase<T_Real, T_Tag, TagData<T_Tag>, TagTapeForward<T_Real, T_Tag>> {
102 template<
typename Real>
109 template<
typename Real>
115 template<
typename Lhs,
typename Rhs>
121 validate.
eval(rhs, vi, *
this);
133 lhs.
cast().value() = rhs.
cast().getValue();
137 template<
typename Lhs,
typename Rhs>
144 template<
typename Lhs>
150 lhs.
cast().value() = rhs;
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
typename TraitsImplementation< Type >::PassiveReal PassiveReal
The original computation type, that was used in the application.
Definition realTraits.hpp:117
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
void CODI_UNUSED(Args const &...)
Disable unused warnings for an arbitrary number of arguments.
Definition macros.hpp:46
Empty Position with no nested data.
Definition position.hpp:47
Base class for all CoDiPack expressions.
Definition expressionInterface.hpp:59
Impl const & cast() const
Cast to the implementation.
Definition expressionInterface.hpp:75
Allow for a direct access to the gradient information computed by the tape.
Definition gradientAccessTapeInterface.hpp:67
Internal tape interface that is used by active types to trigger the storing of an expression.
Definition internalStatementRecordingTapeInterface.hpp:65
Base class for all CoDiPack lvalue expression.
Definition lhsExpressionInterface.hpp:63
Impl & cast()
Cast to the implementation.
Definition lhsExpressionInterface.hpp:99
EnumBitset< TagFlags > properties
Current properties of the value.
Definition tagData.hpp:62
Tag tag
Current tag of the value.
Definition tagData.hpp:61
Base implementation for tagging tapes.
Definition tagTapeBase.hpp:73
void resetTag(Tag &tag) const
Reset tag on value.
Definition tagTapeBase.hpp:336
void handleError(ValidationIndicator< Real, Tag > &vi) const
Call tag error callback.
Definition tagTapeBase.hpp:306
void setTag(Tag &tag) const
Set tag on value.
Definition tagTapeBase.hpp:331
void verifyTagAndProperties(Tag const &tag, Real const &value, const EnumBitset< TagFlags > &properties) const
Checks if the tag and the properties are correct.
Definition tagTapeBase.hpp:256
void checkLhsError(Real &lhsValue, Identifier &lhsIdentifier, const Real &rhs) const
Check if a property for the lhs value is triggered.
Definition tagTapeBase.hpp:289
Required definition for event system.
Definition tagTapeForward.hpp:71
int Index
Required definition for event system.
Definition tagTapeForward.hpp:73
Required definition for event system.
Definition tagTapeForward.hpp:69
Tape for tagging variables and find errors in the AD workflow.
Definition tagTapeForward.hpp:62
T_Real Real
See TagTapeForward.
Definition tagTapeForward.hpp:65
Gradient & gradient(Identifier const &identifier)=delete
Do not allow.
Gradient const & getGradient(Identifier const &identifier) const
Verify tag.
Definition tagTapeForward.hpp:166
void destroyIdentifier(Real &value, Identifier &identifier)
Do nothing.
Definition tagTapeForward.hpp:110
TagTapeForward()
Constructor.
Definition tagTapeForward.hpp:93
void setGradient(Identifier const &identifier, Gradient const &gradient)=delete
Do not allow.
Gradient & gradient(Identifier &identifier)
Verify tag.
Definition tagTapeForward.hpp:173
void store(LhsExpressionInterface< Real, Gradient, TagTapeForward, Lhs > &lhs, LhsExpressionInterface< Real, Gradient, TagTapeForward, Rhs > const &rhs)
Verify all tags of the rhs and the lhs properties.
Definition tagTapeForward.hpp:138
T_Tag Tag
See TagTapeForward.
Definition tagTapeForward.hpp:66
TagData< Tag > Gradient
See TapeTypesInterface.
Definition tagTapeForward.hpp:77
void setGradient(Identifier &identifier, Gradient const &gradient)
Verify tag.
Definition tagTapeForward.hpp:159
void initIdentifier(Real &value, Identifier &identifier)
Do nothing.
Definition tagTapeForward.hpp:103
void store(LhsExpressionInterface< Real, Gradient, TagTapeForward, Lhs > &lhs, ExpressionInterface< Real, Rhs > const &rhs)
Verify all tags of the rhs and the lhs properties.
Definition tagTapeForward.hpp:116
Gradient const & gradient(Identifier const &identifier) const
Verify tag.
Definition tagTapeForward.hpp:180
void store(LhsExpressionInterface< Real, Gradient, TagTapeForward, Lhs > &lhs, Real const &rhs)
Verify the lhs properties.
Definition tagTapeForward.hpp:145
static bool constexpr AllowJacobianOptimization
Do not allow Jacobian optimization.
Definition tagTapeForward.hpp:99
Gradient Identifier
Same as the gradient type. Tangent data is stored in the active types.
Definition tagTapeForward.hpp:78
RealTraits::PassiveReal< Real > PassiveReal
Basic computation type.
Definition tagTapeForward.hpp:81
void eval(NodeInterface< Node > const &node, Args &&... args)
Start the evaluation of the logic on the given expression.
Definition traversalLogic.hpp:70
Helper class for statement validation.
Definition tagTapeBase.hpp:49
bool isActive
true if an active rhs is detected. tag != 0
Definition tagTapeBase.hpp:50