74 for (
int i=mmin;i<=mmax;i++)
85 for (
int i=mmin;i<=mmax;i++)
116 static_cast<unsigned int>(max < min ? 0 : max - min + 1)];
119 cerr <<
"error allocating memory in df1_one_vector" <<
endl;
124 cerr <<
"Error trying to allocate memory for df1_one_vector\n";
142 for (
int i=rmin;i<=rmax;i++)
147 for (
int j=cmin;
j<=cmax;
j++)
198 for (
int i=mmin;i<=mmax;i++)
219 static_cast<unsigned int>(rmax < rmin ? 0 : rmax - rmin + 1)];
222 cerr <<
"error allocating memory in df1_one_matrix" <<
endl;
227 cerr <<
"Error trying to allocate memory for df1_one_vector\n";
231 for (
int i = rmin; i <= rmax; ++i)
289 double f_u,
double f_v)
367 double zp=1/(*x.
get_u());
387 double xinv=1.0/(*x.
get_u());
389 double zp=-xinv*xinv;
404 for (
int i=mmin;i<=mmax;i++)
406 cv(i)=*(v(i).get_udot());
420 for (
int i=rmin;i<=rmax;i++)
452 double f_u=*y.
get_u();
453 double f_v=*x.
get_u();
579 cerr <<
"can only have 1 independent_variables in df1_one_variable"
594 cerr <<
"illegal num_ind_var value of " <<
num_ind_var
595 <<
" in df1_one_variable function" <<
endl;
611 int cmin=
M(rmin).indexmin();
613 int cmax=
M(rmin).indexmax();
614 if (rmin !=1 || cmin !=1)
616 cerr <<
"minimum row and column inidices must equal 1 in "
617 "df1b2matrix choleski_decomp(const df1_one_atrix& MM)"
623 cerr <<
"Error in df1b2matrix choleski_decomp(const df1_one_matrix& MM)"
624 " Matrix not square" <<
endl;
630 #ifndef SAFE_INITIALIZE
639 cerr <<
"Error matrix not positive definite in choleski_decomp"
647 L(i,1)=
M(i,1)/L(1,1);
669 cerr <<
"Error matrix not positive definite in choleski_decomp"
Base class for dvariable.
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
void * trueptr
Address of first element in the vector.
Description not yet available.
~init_df1_one_variable()
Destructor.
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
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_one_vector()
Destructor.
static prevariable * ind_var[]
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.
void set_derivatives(df1_one_variable &z, const df1_one_variable &x, double u, double zp)
df1_one_matrix(int rmin, int rmax, int cmin, int cmax)
Construct matrix of df1_one_variable with dimensions [rmin to rmax] x [cmin to cmax].
df1_one_variable & operator*=(const df1_one_variable &v)
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
df1_one_variable & operator=(const df1_one_variable &v)
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
df1_one_variable(void)
Default constructor.
df1_one_variable & operator+=(const df1_one_variable &v)
void deallocate(void)
Deallocate df1_one_matrix, then set to empty.
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.
void deallocate(void)
Resets num_ind_var count to zero.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
dvector first_derivatives(const df1_one_vector &v)
Description not yet available.
Description not yet available.
unsigned int ncopies
Copy counter to enable shallow copies.
double * get_u_x(void) const
double * get_u(void) const
Holds "shape" information for vector objects.
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
init_df1_one_variable(const prevariable &)
Construct init_df1_one_variable with _var.
df1_one_variable & operator-=(const df1_one_variable &v)
void deallocate(void)
Deallocate df1_one_vector, then set to empty.
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
dvector value(const df1_one_vector &v)
df1_one_vector(void)
Default constructor.
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.
void allocate(void)
Reinitialize df1_one_vector to empty.