9 #include <iostream.hpp>
82 cerr <<
"Error -- you are trying to create a dvar_vector object"
83 " when there is " <<
endl <<
"no object of type"
84 " gradient_structure in scope " <<
endl;
88 char* temp_ptr =
nullptr;
95 unsigned int bytes_needed = sz * (
unsigned int)
sizeof(
double_and_int);
108 if (tmp->
size >= bytes_needed)
113 if (tmp->
size <= bytes_needed + 50)
148 tmp1->
size=bytes_needed;
152 tmp->
offset+=bytes_needed;
153 tmp->
size-=bytes_needed;
171 cerr <<
"Error allocating new arr_link" <<
endl;
204 cout <<
" No memory for dvar_vectors\n"
205 <<
" Need to increase ARRAY_MEMBLOCK_SIZE parameter\n"
206 "In gradient_structure declaration\n";
211 tmp->
size = bytes_needed;
235 temp_ptr = (
char *) varr;
308 char * s = (
char *) _s;
323 char * s = (
char *) _s;
338 char * s = (
char *) _s;
352 char * s = (
char *) _s;
376 for (i=0 ; i< (max_last_offset/size) ; i++ )
378 if (
fabs(temp_ptr[i])>1.e+8)
382 cout << i <<
" " << temp_ptr[i] <<
endl;
419 cout <<
"GS = " << str <<
endl;
436 unsigned long int max_last_offset =
442 cout << str <<
" index = " << index <<
endl;
444 for (i=0 ; i< (max_last_offset/size) ; i++ )
446 if (
fabs(temp_ptr[i])>1.e+8)
451 if (icount>10)
break;
489 unsigned long int max_last_offset =
495 cout <<
"break condition" <<
endl;
499 cout << str <<
" index = " << index <<
endl;
501 for (i=0 ; i< (max_last_offset/size) ; i++ )
503 if (
fabs(temp_ptr[i])>1.e+8)
507 cout << i <<
" " << temp_ptr[i] <<
endl;
508 if (icount>10)
break;
520 cout <<
"dlist " << i <<
" " <<
538 assert(pptr != NULL);
545 cout <<
" Error -- tried to delete NULL arr_link in arr_remove\n";
561 cout <<
"Deleting an arr_link with adress "
563 << _farptr_tolong(tmp)
565 << farptr_tolong(tmp)
double_and_int * arr_new(unsigned int sz)
Description not yet available.
void arr_remove(arr_link **pptr)
Remove and delete arr_link node pptr from gradient_structure::ARR_LIST1.
static unsigned long ARRAY_MEMBLOCK_SIZE
df1_two_variable fabs(const df1_two_variable &x)
void df_check_derivative_values_indexed(void)
Description not yet available.
adstring get_string_marker(void)
Description not yet available.
void save_int_value(int x)
Holds the data for the prevariable class.
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.
unsigned long int max_last_offset
humungous_pointer ARRAY_MEMBLOCK_BASE
prescientific setscientific(void)
Description not yet available.
void df_check_derivative_values(void)
Description not yet available.
unsigned long int last_offset
void arr_free(double_and_int *varr)
Description not yet available.
prnstream & endl(prnstream &)
unsigned long int get_max_last_offset()
void arr_free_remove(arr_link *tmp)
Description not yet available.
arr_link()
Default constructor.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static _THREAD gradient_structure * _instance
void insert_identifier_string(const char *s)
Description not yet available.
void df_check_derivative_values_indexed_break(void)
Description not yet available.
int save_identifier_string(const char *)
Writes a gradient stack verification string.
adstring str(double x, int minwidth=17, int decplaces=-1)
Convert x to adstring with minimum width and total number of decimal places.
static _THREAD DF_FILE * fp
unsigned long int number_arr_links
void arr_free_add(arr_link *tmp)
Description not yet available.
Stores the adjoint gradient data that will be processed by gradcalc.
static _THREAD grad_stack * GRAD_STACK1
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
void df_print_identifier_string(void)
Description not yet available.
void check_derivative_values_break(const char *s, int i, int b)
Description not yet available.
void check_derivative_values(const char *s)
Description not yet available.