96 for (
int i=mmin;i<=mmax;i++)
111 for (
int i=mmin;i<=mmax;i++)
146 static_cast<unsigned int>(max < min ? 0 : max - min + 1)];
149 cerr <<
"error allocating memory in df1_three_vector" <<
endl;
154 cerr <<
"Error trying to allocate memory for df1_three_vector\n";
181 for (
int i=rmin;i<=rmax;i++)
186 for (
int j=cmin;j<=cmax;j++)
188 cm(i,j)=
value(v(i,j));
245 for (
int i=mmin;i<=mmax;i++)
264 static_cast<unsigned int>(rmax < rmin ? 0 : rmax - rmin + 1)];
267 cerr <<
"error allocating memory in df1_three_matrix" <<
endl;
272 cerr <<
"Error trying to allocate memory for df1_three_vector\n";
276 for (
int i = rmin; i <= rmax; ++i)
390 double tmp=1.0/
value(y);
407 double tmp=1.0/
value(y);
456 double f_u,
double f_v)
495 double d=1.0/(1+
square(cx));
576 double zp=1/(*x.
get_u());
604 double xinv=1.0/(*x.
get_u());
606 double zp=-xinv*xinv;
648 double f_u=*y.
get_u();
649 double f_v=*x.
get_u();
839 cerr <<
"can only have 2 independent_variables in df1_three_variable"
866 cerr <<
"illegal num_ind_var value of " <<
num_ind_var
867 <<
" in df1_three_variable function" <<
endl;
894 int cmin=
M(rmin).indexmin();
896 int cmax=
M(rmin).indexmax();
897 if (rmin !=1 || cmin !=1)
899 cerr <<
"minimum row and column inidices must equal 1 in "
900 "df1b2matrix choleski_decomp(const df1_three_atrix& MM)"
906 cerr <<
"Error in df1b2matrix choleski_decomp(const df1_three_matrix& MM)"
907 " Matrix not square" <<
endl;
913 #ifndef SAFE_INITIALIZE
922 cerr <<
"Error matrix not positive definite in choleski_decomp"
930 L(i,1)=
M(i,1)/L(1,1);
952 cerr <<
"Error matrix not positive definite in choleski_decomp"
969 const prevariable * px=df1_three_variable::ind_var[0];
970 const prevariable * py=df1_three_variable::ind_var[1];
971 const prevariable * pz=df1_three_variable::ind_var[2];
Base class for dvariable.
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
df1_three_variable & operator+=(const df1_three_variable &v)
Description not yet available.
Description not yet available.
void * trueptr
Address of first element in the vector.
void initialize(void)
Description not yet available.
Description not yet available.
void deallocate(void)
Description not yet available.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double * get_u_z(void) const
d3_array operator-(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
~df1_three_matrix()
Destructor.
df1_three_variable & operator-=(const df1_three_variable &v)
Description not yet available.
Description not yet available.
df1_three_matrix(int rmin, int rmax, int cmin, int cmax)
Allocate matrix of df1_three_variable with dimension [min to max] x [cmin to cmax].
d3_array operator+(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
df1_one_variable atan(const df1_one_variable &x)
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
df1_two_variable fabs(const df1_two_variable &x)
void set_derivatives(df1_one_variable &z, const df1_one_variable &x, double u, double zp)
double * get_u(void) const
double * get_u_y(void) const
double * get_u_x(void) const
void default_evaluation3ind(void)
Description not yet available.
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
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.
void initialize(void)
Description not yet available.
df1_three_vector(void)
Description not yet available.
~df1_three_vector()
Destructor.
df1_three_variable & my_diveq(const df1_three_variable &v)
Description not yet available.
prnstream & endl(prnstream &)
void deallocate(void)
Deallocate df1_three_vector, then set as empty.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Description not yet available.
Description not yet available.
friend double & value(const prevariable &v1)
unsigned int ncopies
Copy counter to enable shallow copies.
Description not yet available.
df1_three_variable & operator/=(const df1_three_variable &v)
Description not yet available.
df1_three_variable & operator=(const df1_three_variable &v)
Description not yet available.
df1_three_variable(void)
Default constructor.
dvariable & operator=(const double x)
Assigns a value to a dvariable object.
Holds "shape" information for vector objects.
init_df1_three_variable(const prevariable &)
Description not yet available.
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
~init_df1_three_variable()
Destructor.
void initialize(void)
Description not yet available.
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
dvector value(const df1_one_vector &v)
void allocate(void)
Description not yet available.
void deallocate(void)
Deallocate df1_three_vector, then set as empty.
static _THREAD grad_stack * GRAD_STACK1
static prevariable * ind_var[]
df1_three_variable & operator*=(const df1_three_variable &v)
Description not yet available.
double square(const double value)
Return square of value; constant object.
Fundamental data type for reverse mode automatic differentiation.
df1_one_variable inv(const df1_one_variable &x)
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array pow(const d3_array &m, int e)
Description not yet available.