ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Friends | List of all members
grad_stack Class Reference

Description not yet available. More...

#include <fvar.hpp>

Public Member Functions

 grad_stack ()
 
 grad_stack (const size_t size)
 
 grad_stack (const size_t size, const unsigned int id)
 Size constructor with filename id. More...
 
 grad_stack (const grad_stack &)=delete
 
 ~grad_stack ()
 Destructor. More...
 
void create_gradfile ()
 Description not yet available. More...
 
int decrement_current_gradfile_ptr (void)
 If there is a previous file set the handle to point to it otherwise return a -1. More...
 
char * get_gradfile_name ()
 Description not yet available. More...
 
int & gradfile_handle ()
 
void increment_current_gradfile_ptr (void)
 If there is another file set the handle to point to it otherwise we are out of room. More...
 
ostream & operator<< (grad_stack)
 
void print ()
 
int read_grad_stack_buffer (OFF_T &lpos)
 Description not yet available. More...
 
void set_gbuffer_pointers (void)
 Description not yet available. More...
 
void set_gradient_stack (void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
 Description not yet available. More...
 
void set_gradient_stack (void(*func)(void), double *dep_addr, double *ind_addr1, double *ind_addr2)
 Description not yet available. More...
 
void set_gradient_stack (void(*func)(void), double *dep_addr, double *ind_addr1, double mult1, double *ind_addr2, double mult2, double *ind_addr3, double mult3, double *ind_addr4, double mult4)
 Description not yet available. More...
 
void set_gradient_stack (void(*func)(void), double *dep_addr, double *ind_addr1, double mult1, double *ind_addr2, double mult2, double *ind_addr3, double mult3)
 Description not yet available. More...
 
void set_gradient_stack (void(*ptr)(void))
 Push func to adjoint functions stack. More...
 
void set_gradient_stack0 (void(*func)(void), double *dep_addr)
 Description not yet available. More...
 
void set_gradient_stack1 (void(*func)(void), double *dep_addr, double *ind_addr1)
 Sets the gradient stack entry for a function or operator with a single independent variable. More...
 
void set_gradient_stack2 (void(*func)(void), double *dep_addr, double *ind_addr1, double mult1)
 Description not yet available. More...
 
void set_gradient_stack4 (void(*func)(void), double *dep_addr, double *ind_addr1, double *ind_addr2)
 Description not yet available. More...
 
size_t total () const
 
void write_grad_stack_buffer ()
 
void write_grad_stack_buffer (gradient_structure *)
 Description not yet available. More...
 

Public Attributes

int _GRADFILE_PTR
 
int _GRADFILE_PTR1
 
int _GRADFILE_PTR2
 
int _VARSSAV_PTR
 
OFF_T end_pos
 
OFF_T end_pos1
 
OFF_T end_pos2
 
char gradfile_name [61]
 
char gradfile_name1 [61]
 
char gradfile_name2 [61]
 
size_t length
 
grad_stack_entryptr
 
grad_stack_entryptr_first
 
grad_stack_entryptr_last
 
size_t true_length
 
grad_stack_entrytrue_ptr_first
 
char var_store_file_name [61]
 

Friends

void cleanup_temporary_files ()
 Close gradient and variable files and free gradient structure memory. More...
 
void default_evaluation (void)
 Description not yet available. More...
 
void default_evaluation3ind (void)
 Description not yet available. More...
 
void default_evaluation4ind (void)
 Description not yet available. More...
 
void funnel_gradcalc (void)
 Description not yet available. More...
 
void grad_chk (void)
 Description not yet available. More...
 
void gradcalc (int nvar, const dvector &g)
 
class gradient_structure
 
void gradloop ()
 
void reset_gradient_stack (void)
 Rewind buffer. More...
 
void slave_gradcalc (void)
 

Detailed Description

Description not yet available.

Parameters

Definition at line 920 of file fvar.hpp.

Constructor & Destructor Documentation

grad_stack::grad_stack ( )
inline

Definition at line 970 of file fvar.hpp.

grad_stack::grad_stack ( const size_t  size)
inline

Definition at line 971 of file fvar.hpp.

grad_stack::grad_stack ( const size_t  size,
const unsigned int  id 
)

Size constructor with filename id.

Parameters
sizearray size of grad_stack_entry
idfilename id

Definition at line 107 of file gradstak.cpp.

grad_stack::grad_stack ( const grad_stack )
delete
grad_stack::~grad_stack ( )

Destructor.

Definition at line 285 of file gradstak.cpp.

Member Function Documentation

void grad_stack::create_gradfile ( )

Description not yet available.

Parameters

Definition at line 432 of file gradstak.cpp.

Referenced by grad_stack().

int grad_stack::decrement_current_gradfile_ptr ( void  )

If there is a previous file set the handle to point to it otherwise return a -1.

Definition at line 519 of file gradstak.cpp.

Referenced by read_grad_stack_buffer().

char * grad_stack::get_gradfile_name ( )

Description not yet available.

Parameters

Definition at line 543 of file gradstak.cpp.

Referenced by read_grad_stack_buffer().

int & grad_stack::gradfile_handle ( )
void grad_stack::increment_current_gradfile_ptr ( void  )

If there is another file set the handle to point to it otherwise we are out of room.

Definition at line 503 of file gradstak.cpp.

Referenced by gradient_structure::jacobcalc(), and write_grad_stack_buffer().

ostream& grad_stack::operator<< ( grad_stack  )
void grad_stack::print ( )
int grad_stack::read_grad_stack_buffer ( OFF_T lpos)
void grad_stack::set_gbuffer_pointers ( void  )

Description not yet available.

Parameters

Definition at line 551 of file gradstak.cpp.

Referenced by gradient_structure::jacobcalc(), and write_grad_stack_buffer().

void grad_stack::set_gradient_stack ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1 = NULL,
double  mult1 = 0,
double *  ind_addr2 = NULL,
double  mult2 = 0 
)
inline
void grad_stack::set_gradient_stack ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1,
double *  ind_addr2 
)
inline

Description not yet available.

Parameters

Definition at line 1175 of file fvar.hpp.

void grad_stack::set_gradient_stack ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1,
double  mult1,
double *  ind_addr2,
double  mult2,
double *  ind_addr3,
double  mult3,
double *  ind_addr4,
double  mult4 
)
inline

Description not yet available.

Parameters

Definition at line 1132 of file fvar.hpp.

void grad_stack::set_gradient_stack ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1,
double  mult1,
double *  ind_addr2,
double  mult2,
double *  ind_addr3,
double  mult3 
)
inline

Description not yet available.

Parameters

Definition at line 1092 of file fvar.hpp.

void grad_stack::set_gradient_stack ( void(*)(void)  func)
inline

Push func to adjoint functions stack.

Parameters
funcpointer to adjoint function

Definition at line 1256 of file fvar.hpp.

void grad_stack::set_gradient_stack0 ( void(*)(void)  func,
double *  dep_addr 
)

Description not yet available.

Parameters

Definition at line 565 of file gradstak.cpp.

Referenced by dvariable::dvariable().

void grad_stack::set_gradient_stack1 ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1 
)

Sets the gradient stack entry for a function or operator with a single independent variable.

Parameters
funcPointer to function to compute the derivative of the dependent variable with respect to the independent variable. Function prototype: void func(void);
dep_addrAddress of dependent variable; pointer to double.
ind_addr1Address of independent variable; pointer to double

Definition at line 385 of file sgradclc.cpp.

Referenced by prevariable::operator+=().

void grad_stack::set_gradient_stack2 ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1,
double  mult1 
)
inline

Description not yet available.

Parameters

Definition at line 1202 of file fvar.hpp.

void grad_stack::set_gradient_stack4 ( void(*)(void)  func,
double *  dep_addr,
double *  ind_addr1,
double *  ind_addr2 
)
inline

Description not yet available.

Parameters

Definition at line 1229 of file fvar.hpp.

Referenced by operator+().

size_t grad_stack::total ( ) const
inline

Definition at line 1026 of file fvar.hpp.

void grad_stack::write_grad_stack_buffer ( )
inline
void grad_stack::write_grad_stack_buffer ( gradient_structure gs)

Description not yet available.

Parameters

Definition at line 339 of file gradstak.cpp.

Friends And Related Function Documentation

void cleanup_temporary_files ( )
friend

Close gradient and variable files and free gradient structure memory.

Definition at line 192 of file gradstrc.cpp.

void default_evaluation ( void  )
friend

Description not yet available.

Parameters

Definition at line 61 of file def_eval.cpp.

void default_evaluation3ind ( void  )
friend

Description not yet available.

Parameters

Definition at line 174 of file def_eval.cpp.

void default_evaluation4ind ( void  )
friend

Description not yet available.

Parameters

Definition at line 205 of file def_eval.cpp.

void funnel_gradcalc ( void  )
friend

Description not yet available.

Parameters

Definition at line 76 of file xgradclc.cpp.

void grad_chk ( void  )
friend

Description not yet available.

Parameters

Definition at line 18 of file gradchk.cpp.

void gradcalc ( int  nvar,
const dvector g 
)
friend

Definition at line 77 of file sgradclc.cpp.

friend class gradient_structure
friend

Definition at line 1035 of file fvar.hpp.

void gradloop ( )
friend
void reset_gradient_stack ( void  )
friend

Rewind buffer.

Definition at line 367 of file sgradclc.cpp.

void slave_gradcalc ( void  )
friend

Member Data Documentation

int grad_stack::_GRADFILE_PTR
int grad_stack::_GRADFILE_PTR1
int grad_stack::_GRADFILE_PTR2

Definition at line 944 of file fvar.hpp.

Referenced by create_gradfile(), increment_current_gradfile_ptr(), and ~grad_stack().

int grad_stack::_VARSSAV_PTR
OFF_T grad_stack::end_pos

Definition at line 952 of file fvar.hpp.

Referenced by grad_stack(), read_grad_stack_buffer(), and write_grad_stack_buffer().

OFF_T grad_stack::end_pos1
OFF_T grad_stack::end_pos2

Definition at line 954 of file fvar.hpp.

Referenced by grad_stack().

char grad_stack::gradfile_name[61]
char grad_stack::gradfile_name1[61]

Definition at line 936 of file fvar.hpp.

Referenced by create_gradfile(), decrement_current_gradfile_ptr(), grad_stack(), and ~grad_stack().

char grad_stack::gradfile_name2[61]

Definition at line 937 of file fvar.hpp.

Referenced by create_gradfile(), grad_stack(), increment_current_gradfile_ptr(), and ~grad_stack().

size_t grad_stack::length
grad_stack_entry* grad_stack::ptr
grad_stack_entry* grad_stack::ptr_first
grad_stack_entry* grad_stack::ptr_last
size_t grad_stack::true_length

Definition at line 931 of file fvar.hpp.

Referenced by grad_stack(), and read_grad_stack_buffer().

grad_stack_entry* grad_stack::true_ptr_first
char grad_stack::var_store_file_name[61]

Definition at line 938 of file fvar.hpp.

Referenced by create_gradfile(), grad_stack(), and ~grad_stack().


The documentation for this class was generated from the following files: