SU2
Namespaces | Macros | Functions
ad_structure.hpp File Reference

Main routines for the algorithmic differentiation (AD) structure. More...

#include "../include/datatype_structure.hpp"
#include "ad_structure.inl"

Go to the source code of this file.

Namespaces

 AD
 Contains routines for the reverse mode of AD. In case there is no reverse type configured, they have no effect at all.
 

Functions

void AD::StartRecording ()
 Start the recording of the operations and involved variables. If called, the computational graph of all operations occuring after the call will be stored, starting with the variables registered with RegisterInput.
 
void AD::StopRecording ()
 Stops the recording of the operations and variables.
 
void AD::RegisterInput (su2double &data)
 Registers the variable as an input. I.e. as a leaf of the computational graph. More...
 
void AD::RegisterOutput (su2double &data)
 Registers the variable as an output. I.e. as the root of the computational graph. More...
 
void AD::ClearAdjoints ()
 Clears the currently stored adjoints but keeps the computational graph.
 
void AD::ComputeAdjoint ()
 Computes the adjoints, i.e. the derivatives of the output with respect to the input variables.
 
void AD::Reset ()
 Reset the tape structure to be ready for a new recording.
 
void AD::ResetInput (su2double &data)
 Reset the variable (set index to zero). More...
 
void AD::SetPreaccIn (const su2double &data)
 Sets the scalar input of a preaccumulation section. More...
 
void AD::SetPreaccIn (const su2double *data, const int size)
 Sets the input variables of a preaccumulation section using a 1D array. More...
 
void AD::SetPreaccIn (const su2double *const *data, const int size_x, const int size_y)
 Sets the input variables of a preaccumulation section using a 2D array. More...
 
void AD::StartPreacc ()
 Starts a new preaccumulation section and sets the input variables. More...
 
void AD::SetPreaccOut (su2double &data)
 Sets the scalar output of a preaccumulation section. More...
 
void AD::SetPreaccOut (su2double *data, const int size)
 Sets the output variables of a preaccumulation section using a 1D array. More...
 
void AD::SetPreaccOut (su2double **data, const int size_x, const int size_y)
 Sets the input variables of a preaccumulation section using a 2D array. More...
 
void AD::EndPreacc ()
 Ends a preaccumulation section and computes the local Jacobi matrix of a code section using the variables set with SetLocalInput(), SetLocalOutput() and pushes a statement for each output variable to the AD tape.
 

Detailed Description

Main routines for the algorithmic differentiation (AD) structure.

Author
T. Albring
Version
5.0.0 "Raven"

SU2 Original Developers: Dr. Francisco D. Palacios. Dr. Thomas D. Economon.

SU2 Developers: Prof. Juan J. Alonso's group at Stanford University. Prof. Piero Colonna's group at Delft University of Technology. Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology. Prof. Alberto Guardone's group at Polytechnic University of Milan. Prof. Rafael Palacios' group at Imperial College London. Prof. Edwin van der Weide's group at the University of Twente. Prof. Vincent Terrapon's group at the University of Liege.

Copyright (C) 2012-2017 SU2, the open-source CFD code.

SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.