9 #ifndef CT_MULTINEWTON_H
10 #define CT_MULTINEWTON_H
34 void step(doublereal* x, doublereal*
step,
42 doublereal
boundStep(
const doublereal* x0,
const doublereal* step0,
43 const OneDim& r,
int loglevel);
53 int dampStep(
const doublereal* x0,
const doublereal* step0,
54 doublereal* x1, doublereal* step1, doublereal& s1,
58 doublereal
norm2(
const doublereal* x,
const doublereal* step,
75 void resize(
size_t points);
Container class for multiple-domain 1D problems.
size_t m_n
number of variables
void step(doublereal *x, doublereal *step, OneDim &r, MultiJac &jac, int loglevel)
Compute the undamped Newton step.
int solve(doublereal *x0, doublereal *x1, OneDim &r, MultiJac &jac, int loglevel)
Find the solution to F(X) = 0 by damped Newton iteration.
doublereal norm2(const doublereal *x, const doublereal *step, OneDim &r) const
Compute the weighted 2-norm of step.
void resize(size_t points)
Change the problem size.
Class MultiJac evaluates the Jacobian of a system of equations defined by a residual function supplie...
doublereal boundStep(const doublereal *x0, const doublereal *step0, const OneDim &r, int loglevel)
Return the factor by which the undamped Newton step 'step0' must be multiplied in order to keep all s...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
int dampStep(const doublereal *x0, const doublereal *step0, doublereal *x1, doublereal *step1, doublereal &s1, OneDim &r, MultiJac &jac, int loglevel, bool writetitle)
On entry, step0 must contain an undamped Newton step for the solution x0.
Newton iterator for multi-domain, one-dimensional problems.
vector_fp m_x
Work arrays of size m_n used in solve().
void setOptions(int maxJacAge=5)
Set options.