23 #include <iostream.hpp>
26 #if defined (__WAT32__)
36 #include <sys/types.h>
43 #include <sys/types.h>
47 #if defined(__NDPX__ )
49 int LSEEK(
int,
int,
int);
50 int read(
int,
char*,
int);
55 void _far * _cdecl _farptr_norm(
void _far *);
56 void _far * _cdecl _farptr_fromlong(
unsigned long);
57 long _cdecl _farptr_tolong(
void _far *);
87 cerr <<
"Error in jacobcalc jacobian must have minimum valid"
88 " index of 1" <<
endl;
93 if (jac.rowmax()<depvar_count)
95 cerr <<
"Error in jacobcalc jacobian must have maximumvalid"
96 " index >= the number of dependent variables " <<
endl
97 <<
" which is " << depvar_count <<
endl;
104 OFF_T last_gpos=
LSEEK(_GRADFILE_PTR,0L,SEEK_CUR);
121 for (
int i=jac.rowmin();i<=jac.rowmax();i++)
123 if (jac(i).indexmin() !=1)
125 cerr <<
"jacobian matrix minimum column index must equal 1"
126 " for all rows" <<
endl;
129 if (jac(i).indexmax() < nvar)
131 cerr <<
"jacobian matrix column size is less than the number of"
132 " independent variables" <<
endl;
143 for (
int ijac=1;ijac<=depvar_count;ijac++)
149 cout <<
"maximum number of depdendent variables of "
152 <<
"use gradient_structure::set_NUM_DEPENDENT_VARIABLES(int i);"
153 <<
endl <<
"to increase the number of dependent variables"
187 LSEEK(_GRADFILE_PTR,lpos,SEEK_SET);
198 cerr <<
"warning -- calling gradcalc when no calculations generating"
199 <<
endl <<
"derivative information have occurred" <<
endl;
218 #if defined (__ZTC__)
231 #ifdef FAST_ASSEMBLER
250 }
while (break_flag);
253 for (
int i = 0; i < nvar; ++i)
indvar_offset_list * INDVAR_LIST
void read(const test_smartlist &, void *, int nsize)
void set_gbuffer_pointers(void)
Description not yet available.
double * get_address(const int &i)
void jacobcalc(int nvar, const dmatrix &jac)
Description not yet available.
dependent_variables_information * DEPVARS_INFO
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
void jacobcalc(int nvar, const dmatrix &g)
Description not yet available.
Holds derivative information for arithmetic operators and math library functions. ...
void write_grad_stack_buffer()
Holds the data for the prevariable class.
void write_cmpdif_stack_buffer()
Description not yet available.
void read_cmpdif_stack_buffer(OFF_T &lpos)
Description not yet available.
humungous_pointer ARRAY_MEMBLOCK_BASE
prnstream & endl(prnstream &)
unsigned long int max_last_offset
unsigned long int get_max_last_offset()
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static _THREAD gradient_structure * _instance
Description not yet available.
void initialize(void)
Initialze all elements of dvector to zero.
grad_stack_entry * ptr_first
static _THREAD DF_FILE * fp
void save_variables()
Save variables to a buffer.
int read_grad_stack_buffer(OFF_T &lpos)
Description not yet available.
void restore_variables()
Restore variables from buffer.
void save_arrays()
Compute the gradient from the data stored in the global gradient_structure.
static _THREAD grad_stack * GRAD_STACK1
void(* func)(void)
< Pointer to function (if any) to be used for derivative calculation
double * dep_addr
Pointer to dependent variable.
void increment_current_gradfile_ptr(void)
If there is another file set the handle to point to it otherwise we are out of room.
double x
< value of the variable