G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsCoDiPack.h
Go to the documentation of this file.
1
14#pragma once
15
16// Enable implicit conversion and disable compiler warnings
17#define CODI_ImplicitConversion true
18#define CODI_ImplicitConversionWarning false
19#include <codi.hpp>
20
22
23#ifdef GISMO_BUILD_LIB
24#ifdef gsCoDiPack_EXPORTS
25#undef EXTERN_CLASS_TEMPLATE
26#define EXTERN_CLASS_TEMPLATE CLASS_TEMPLATE_INST
27#endif
28
29namespace codi {
30template<class T>
31using codi_real = std::conditional<ExpressionTraits::IsExpression<T>::value, GISMO_COEFF_TYPE, T>;
32
33// General forward AD type: RealForwardGen<real_t>
34EXTERN_CLASS_TEMPLATE
35ActiveType<ForwardEvaluation<real_t, real_t> >;
36
37// General vector forward AD type: RealForwardVec<real_t, 4>
38EXTERN_CLASS_TEMPLATE
39ActiveType<ForwardEvaluation<real_t, Direction<real_t, 4> > >;
40
41// General reverse AD type: RealReverseGen<real_t>
42// Jacobian taping approach with linear index handling.
43EXTERN_CLASS_TEMPLATE
44ActiveType<JacobianLinearTape<JacobianTapeTypes<real_t, real_t,
45 LinearIndexManager<index_t>,
46 DefaultChunkedData> > >;
47
48// General vector reverse AD type: RealReverseVec<real_t, 4>
49// Jacobian taping approach with linear index handling.
50EXTERN_CLASS_TEMPLATE
51ActiveType<JacobianLinearTape<JacobianTapeTypes<real_t, Direction<real_t, 4>,
52 LinearIndexManager<index_t>,
53 DefaultChunkedData> > >;
54
55// General unchecked reverse AD type: RealReverseUncheckedGen<real_t>
56// Requires preallocation of data. See DataManagementTapeInterface.
57// Jacobian taping approach with linear index handling.
58EXTERN_CLASS_TEMPLATE
59ActiveType<JacobianLinearTape<JacobianTapeTypes<real_t, real_t,
60 LinearIndexManager<index_t>,
61 DefaultBlockData> > >;
62
63// General reverse AD type: RealReverseIndexGen<real_t>
64// Jacobian taping approach with reuse index handling.
65EXTERN_CLASS_TEMPLATE
66ActiveType<JacobianReuseTape<JacobianTapeTypes<real_t, real_t,
67 MultiUseIndexManager<index_t>,
68 DefaultChunkedData> > >;
69
70// General reverse AD type: RealReversePrimalGen<real_t>
71// Primal value taping approach with linear index handling.
72EXTERN_CLASS_TEMPLATE
73ActiveType<PrimalValueLinearTape<
74 PrimalValueTapeTypes<real_t, real_t,
75 LinearIndexManager<index_t>,
76 InnerStatementEvaluator, DefaultChunkedData> > >;
77
78// General reverse AD type: RealReversePrimalIndexGen<real_t>
79// Primal value taping approach with reuse index handling.
80EXTERN_CLASS_TEMPLATE
81ActiveType<PrimalValueReuseTape<
82 PrimalValueTapeTypes<real_t, real_t,
83 MultiUseIndexManager<index_t>,
84 InnerStatementEvaluator, DefaultChunkedData> > >;
85
86} // namespace codi
87#endif
#define GISMO_COEFF_TYPE
Definition gsConfig.h:26
Utilities related to template programming.