6 #ifndef CT_MULTINEWTON_H 7 #define CT_MULTINEWTON_H 33 void step(doublereal* x, doublereal*
step,
41 doublereal
boundStep(
const doublereal* x0,
const doublereal* step0,
42 const OneDim& r,
int loglevel);
51 int dampStep(
const doublereal* x0,
const doublereal* step0,
52 doublereal* x1, doublereal* step1, doublereal& s1,
56 doublereal
norm2(
const doublereal* x,
const doublereal*
step,
73 void resize(
size_t points);
Container class for multiple-domain 1D problems.
size_t m_n
number of variables
doublereal norm2(const doublereal *x, const doublereal *step, OneDim &r) const
Compute the weighted 2-norm of step.
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.
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.
Namespace for the Cantera kernel.
vector_fp m_x
Work arrays of size m_n used in solve().
void setOptions(int maxJacAge=5)
Set options.