18 for (
int i = 0; i < 20; ++i)
28 memcpy(&(
v[0]),&(x.
v[0]),20*
sizeof(
double));
55 df3_three_variable::ind_var[0]=0;
56 df3_three_variable::ind_var[1]=0;
57 df3_three_variable::ind_var[2]=0;
69 *zd++ = dfx * *xd++ + dfy * *yd++ + dfz * *vd++;
108 for (
int i = 0; i < 20; ++i)
154 for (
int i=mmin;i<=mmax;i++)
169 for (
int i=mmin;i<=mmax;i++)
200 static_cast<unsigned int>(max < min ? 0 : max - min + 1)];
203 cerr <<
"error allocating memory in df3_three_vector\n";
208 cerr <<
"Error trying to allocate memory for df3_three_vector\n";
233 for (
int i=rmin;i<=rmax;i++)
238 for (
int j=cmin;j<=cmax;j++)
240 cm(i,j)=
value(v(i,j));
296 for (
int i = mmin; i <= mmax; ++i)
315 static_cast<unsigned int>(rmax < rmin ? 0 : rmax - rmin + 1)];
318 cerr <<
"error allocating memory in df3_three_matrix\n";
323 cerr <<
"Error trying to allocate memory for df3_three_vector\n";
327 for (
int i = rmin;i <= rmax; ++i)
490 double u,
double zp,
double zp2,
double zp3)
573 double f_u,
double f_v,
double f_uu,
double f_uv,
double f_vv,
double f_uuu,
574 double f_uuv,
double f_uvv,
double f_vvv)
818 double xinv=1.0/(*x.
get_u());
820 double zp2=-0.5*zp*xinv;
821 double zp3=-1.5*zp2*xinv;
837 double d=1.0/(1+
square(cx));
842 double zp2=-2.0*cx*d2;
843 double zp3=-2.0*d2+8*cx*cx*d*d2;
891 double zp2=2.0*w*v2*v;
892 double zp3=(4.0*w*w+2.0)*v2*v2;
924 double zp=1/(*x.
get_u());
926 double zp3=-2.0*zp*zp2;
956 double xinv=1.0/(*x.
get_u());
958 double zp=-xinv*xinv;
959 double zp2=-2.0*zp*xinv;
960 double zp3=-3.0*zp2*xinv;
1032 double f_u = *y.
get_u();
1033 double f_v = *x.
get_u();
1044 f_uuu, f_uuv, f_uvv, f_vvv);
1430 cerr <<
"This can't happen" <<
endl;
1448 cerr <<
"can only have 3 independent_variables in df3_three_variable"
1449 " function" <<
endl;
1470 cerr <<
"illegal num_ind_var value of " <<
num_ind_var
1471 <<
" in df3_three_variable function" <<
endl;
1500 cerr <<
"can only have 3 independent_variables in df3_three_variable"
1501 " function" <<
endl;
1521 cerr <<
"illegal num_ind_var value of " <<
num_ind_var
1522 <<
" in df3_three_variable function" <<
endl;
1551 int cmin=
M(rmin).indexmin();
1553 int cmax=
M(rmin).indexmax();
1554 if (rmin !=1 || cmin !=1)
1556 cerr <<
"minimum row and column inidices must equal 1 in "
1557 "df1b2matrix choleski_decomp(const df3_three_atrix& MM)"
1563 cerr <<
"Error in df1b2matrix choleski_decomp(const df3_three_matrix& MM)"
1564 " Matrix not square" <<
endl;
1570 #ifndef SAFE_INITIALIZE
1579 cerr <<
"Error matrix not positive definite in choleski_decomp"
1584 L(1,1)=
sqrt(
M(1,1));
1587 L(i,1)=
M(i,1)/L(1,1);
1592 for (j=2;j<=i-1;j++)
1595 for (k=1;k<=j-1;k++)
1602 for (k=1;k<=i-1;k++)
1609 cerr <<
"Error matrix not positive definite in choleski_decomp"
void initialize()
Description not yet available.
df3_three_variable & operator+=(const df3_three_variable &v)
Add values of v to df3_three_variable.
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
df1b2_gradlist * f1b2gradlist
void * trueptr
Address of first element in the vector.
void memcpy(test_smartlist &dest, void *source, const size_t nsize)
memcpy for test_smartlist
Description not yet available.
df3_three_variable & operator-=(const df3_three_variable &v)
Subtract values from _v in df3_three_variable.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
df1b2variable & operator=(const df3_one_variable &v)
Description not yet available.
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.
double * get_u_xxy() const
df3_three_vector()
Default constructor.
df3_three_variable & operator*=(const df3_three_variable &v)
Multiply df3_three_variable by var, then call set_derivatives.
Description not yet available.
double * get_u_zz() const
double * get_u_yzz() 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).
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.
Description not yet available.
double * get_u_xyy() const
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_xz() const
d3_array cube(const d3_array &m)
Description not yet available.
void deallocate(void)
Deallocate df3_three_matrix, then set to empty.
void deallocate()
Free allocated memory.
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.
df3_three_variable & operator=(const df3_three_variable &v)
Assignment operator sets values from _v to df3_three_variable.
void allocate()
Does not allocate, but initializes member variables and pointers to NULL.
void initialize()
Intialize values in v to zero.
init_df3_three_variable(const df1b2variable &)
Construct init_df3_three_variable from df1b2variable.
df3_three_variable()
Default constructor.
prnstream & endl(prnstream &)
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double var(const dvector &vec)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double * get_u_yz() const
Description not yet available.
double * get_u_xx() const
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
static df1b2variable * ind_var[]
void initialize(void)
Initialize values.
Description not yet available.
double * get_u_xy() const
df3_three_variable & operator/=(const df3_three_variable &v)
Divide df3_three_variable by var, then call set_derivatives.
unsigned int ncopies
Copy counter to enable shallow copies.
int write_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, df1b2function2 *pf)
Description not yet available.
Holds "shape" information for vector objects.
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
~df3_three_vector()
Destructor.
double * get_u_yy() const
double * get_u_yyy() const
Description not yet available.
double * get_u_xzz() const
static int num_local_ind_var
double * get_u_zzz() const
df3_three_matrix(int rmin, int rmax, int cmin, int cmax)
Construct matrix of df3_three_variable with dimensions [rmin to rmax] x [cmin to cmax].
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
double * get_u_xyz() const
double * get_u_xxz() const
~init_df3_three_variable()
Destructor.
dvector value(const df1_one_vector &v)
double * get_u_xxx() const
double * get_u_yyz() const
~df3_three_matrix()
Destructor.
double square(const double value)
Return square of value; constant object.
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.