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);
Class MultiJac evaluates the Jacobian of a system of equations defined by a residual function supplie...
Newton iterator for multi-domain, one-dimensional problems.
void resize(size_t points)
Change the problem size.
vector_fp m_x
Work arrays of size m_n used in solve().
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...
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.
void setOptions(int maxJacAge=5)
Set options.
size_t m_n
number of variables
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 step(doublereal *x, doublereal *step, OneDim &r, MultiJac &jac, int loglevel)
Compute the undamped Newton step.
Container class for multiple-domain 1D problems.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Namespace for the Cantera kernel.