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);
85 std::vector<doublereal*> m_workarrays;
87 size_t m_nv, m_np, m_n;
Container class for multiple-domain 1D problems.
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...
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 releaseWorkArray(doublereal *work)
Release a work array by pushing its pointer onto the stack of available arrays.
Newton iterator for multi-domain, one-dimensional problems.
doublereal * getWorkArray()
Get a pointer to an array of length m_n for temporary work space.
void setOptions(int maxJacAge=5)
Set options.