-
Notifications
You must be signed in to change notification settings - Fork 918
New Discrete Adjoint Multizone Capabilities (e.g. Adjoint CHT) #774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b44ab34
fce0218
6ce7ef8
4e158db
c357bdc
c1df4d2
458ac29
72f36ff
349b25e
344f936
e077902
7b20aab
dda2de5
2168034
8609b53
f1e6106
a8808a0
9c4dde2
8d03108
c1eceba
edd432b
f0a66cd
ab45a8e
0372841
8a4f8cc
ff65507
9d12d85
f76d3ba
fa13349
9da3efe
07ecc0b
6a7b536
84b7aea
d3c9efe
b131a1d
4a2de0f
d2fa505
6efe243
0f7c926
1734b71
0a27f6c
938d0d1
4e4a081
10b5629
54c10d4
627ade8
0e3c960
4387be8
b0dfe10
71429c1
cf2d767
8bf1379
0a8e2e7
5f1950f
b272eb4
764d795
af52d0f
10850b8
81cc722
b13a0ba
958d66f
340e662
9805d99
d756640
b6109e3
273f8b2
cf763bb
5132501
46009de
d48d94c
541df9d
f83168f
961e27c
1316ec2
5db3823
e632133
99a35fe
c7f2df0
3e78524
25d56d9
527f4ad
d46fc20
e7b5aa7
b8d9c0c
6779109
0adad6b
8508ab3
1b18223
98d19be
59ce7cc
1fc03d1
24c2380
0973aa2
493a559
b7b5cbd
61c1db6
edfe789
8602c3f
c5c6d1c
d36c173
193f8fe
960144f
e38db62
f07dac7
ee1a3fd
092c69d
dcac8fd
f1c722f
2cda96b
a8b7a75
f65c630
09f2f89
4520e7e
4b9a3ca
d580222
8a447d8
f6480c6
ffe265d
4c7ce15
d62edcb
8ae9eb5
0be4efd
496abfb
68dd51a
3ba483d
0b82505
c73c645
fcb8864
3eba591
7afaafe
f4fbfd0
83e074e
f001e5e
216b178
893d617
b6df9cc
7e12f77
c7c10a5
f99505b
0f3b986
7cc712f
c727a6d
1284b64
0a8f4ef
670f95a
aa2da94
3a9c134
7f3eed1
b4a5395
78ad7f7
bd315f5
d3d1067
58c0664
d0d975b
203b234
93848da
bbb66fa
b37f082
352ac66
c1107ca
f0dabbe
8b8cd17
200733b
3b5067a
2a75156
beb2701
c7c818a
5db776a
bf6934a
fee6393
f944f5a
76dd925
a07bef0
30c7f15
b4587e3
4ed37b5
0ed3d8b
9ac45d9
60b55ff
9b02b38
5a8d848
a74efbd
8833f43
7f7c3c4
9adcc03
cda8a25
3ec8fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,17 +65,42 @@ namespace AD{ | |
| bool TapeActive(); | ||
|
|
||
| /*! | ||
| * \brief Registers the variable as an input. I.e. as a leaf of the computational graph. | ||
| * \brief Prints out tape statistics. | ||
| */ | ||
| void PrintStatistics(); | ||
|
|
||
| /*! | ||
| * \brief Registers the variable as an input and saves internal data (indices). I.e. as a leaf of the computational graph. | ||
| * \param[in] data - The variable to be registered as input. | ||
| */ | ||
| void RegisterInput(su2double &data); | ||
|
|
||
| /*! | ||
| * \brief Registers the variable as an input. I.e. as a leaf of the computational graph. | ||
| * \param[in] data - The variable to be registered as input. | ||
| */ | ||
| void RegisterInput_intIndexBased(su2double &data); | ||
|
|
||
| /*! | ||
| * \brief Registers the variable as an output. I.e. as the root of the computational graph. | ||
| * \param[in] data - The variable to be registered as output. | ||
| */ | ||
| void RegisterOutput(su2double &data); | ||
|
|
||
| /*! | ||
| * \brief Sets the adjoint value at index to val | ||
| * \param[in] index - Position in the adjoint vector. | ||
| * \param[in] val - adjoint value to be set. | ||
| */ | ||
| void SetDerivative(int index, const double val); | ||
|
|
||
| /*! | ||
| * \brief Extracts the adjoint value at index | ||
| * \param[in] index - position in the adjoint vector where the derivative will be extracted. | ||
| * \return Derivative value. | ||
| */ | ||
| double GetDerivative(int index); | ||
|
|
||
| /*! | ||
| * \brief Clears the currently stored adjoints but keeps the computational graph. | ||
| */ | ||
|
|
@@ -84,7 +109,14 @@ namespace AD{ | |
| /*! | ||
| * \brief Computes the adjoints, i.e. the derivatives of the output with respect to the input variables. | ||
| */ | ||
| void ComputeAdjoint(); | ||
| void ComputeAdjoint(); | ||
|
|
||
| /*! | ||
| * \brief Computes the adjoints, i.e. the derivatives of the output with respect to the input variables. | ||
| * \param[in] enter - Position where we start evaluating the tape. | ||
| * \param[in] leave - Position where we stop evaluating the tape. | ||
| */ | ||
| void ComputeAdjoint(unsigned short enter, unsigned short leave); | ||
|
Comment on lines
+114
to
+119
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be great to have more documentation on the AD functionality, especially with these new routines added related to tape indices. Can you please add something to the docs on the 'Advanced AD Techniques' page (or in your tutorial)? At the moment, folks have to learn the system mostly by looking through the code |
||
|
|
||
| /*! | ||
| * \brief Reset the tape structure to be ready for a new recording. | ||
|
|
@@ -209,6 +241,17 @@ namespace AD{ | |
| */ | ||
| void EndExtFunc(); | ||
|
|
||
| /*! | ||
| * \brief Evaluates and saves gradient data from a variable. | ||
| * \param[in] data - variable whose gradient information will be extracted. | ||
| * \param[in] index - where obtained gradient information will be stored. | ||
| */ | ||
| void SetAdjIndex(int &index, const su2double &data); | ||
|
|
||
| /*! | ||
| * \brief Pushes back the current tape position to the tape position's vector. | ||
| */ | ||
| void Push_TapePosition(); | ||
| } | ||
|
|
||
| /*--- Macro to begin and end sections with a passive tape ---*/ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returnmissing, although obvious