|
CppNoddy
0.92
|
A vector NEWTON iteration class. More...
#include <Newton.h>
Public Member Functions | |
| Newton (Residual< _Type > *ptr_to_residual_object, unsigned max_steps=20, double tolerance=1.e-8, double derivative_step=1.e-8) | |
| Constructor. More... | |
| void | iterate (DenseVector< _Type > &x) |
| The Newton iteration method. More... | |
| void | set_monitor_det (bool flag) |
| If set then the system will monitor the sign of determinant of the Jacobian matrix and cause an ExceptionBifurcation when it changes sign. More... | |
| void | solve (DenseVector< _Type > &x) |
| Solve the system for an initial guess by Newton iteration, this method is inherited from the ArcLength_base class and this simply points it to the iteration method. More... | |
| void | arclength_solve (DenseVector< _Type > &x) |
| Arc-length solve the system. More... | |
Public Member Functions inherited from CppNoddy::ArcLength_base< _Type > | |
| ArcLength_base () | |
| virtual | ~ArcLength_base () |
| void | init_arc (DenseVector< _Type > x, _Type *p, const double &length, const double &max_length) |
| Initialise the class ready for arc-length continuation. More... | |
| virtual void | solve (DenseVector< _Type > &x)=0 |
| Compute a solution for that state & parameter variables that are an arc-length 'ds' from the current state. More... | |
| double & | ds () |
| Return a handle to the arclength step. More... | |
| double & | arcstep_multiplier () |
| Used to set the multiplication constant used when increasing or decreasing the arclength step. More... | |
| bool & | rescale_theta () |
| Handle to the RESCALE_THETA flag. More... | |
| double & | theta () |
| Set the arclength theta parameter. More... | |
| double & | desired_arc_proportion () |
| Handle to the desired proportion of the parameter to be used in the arc length solver. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CppNoddy::ArcLength_base< _Type > | |
| void | update (const DenseVector< _Type > &x) |
| A method called by arclength_solve and init_arc which stores the current converged state and parameter and hence computes the derivatives w.r.t the arc-length. More... | |
| double | arclength_residual (const DenseVector< _Type > &x) const |
| The extra constraint that is to be used to replace the unknown arc length. More... | |
| DenseVector< _Type > | Jac_arclength_residual (DenseVector< _Type > &x) const |
| The derivative of the arclength_residual function with respect to each of the state variables. More... | |
| void | update_theta (const DenseVector< _Type > &x) |
| Automatically update the Keller THETA such that the proportion of the arclength obtained from the parameter is the desired value. More... | |
Protected Attributes inherited from CppNoddy::ArcLength_base< _Type > | |
| _Type * | p_PARAM |
| pointer to the parameter in arclength solves More... | |
| DenseVector< _Type > | LAST_X |
| state variable at the last computed solution More... | |
| DenseVector< _Type > | X_DERIV_S |
| derivative of the state variable w.r.t. arc length More... | |
| _Type | LAST_PARAM |
| parameter value at the last computed solution More... | |
| _Type | PARAM_DERIV_S |
| derivative of the parameter w.r.t arc length More... | |
| double | DS |
| size of the arc length step More... | |
| double | MAX_DS |
| maximum arc length step to be taken More... | |
| double | ARCSTEP_MULTIPLIER |
| step change multiplier More... | |
| bool | INITIALISED |
| for the arc-length solver - to show it has been initialised More... | |
| double | THETA |
| the arclength theta More... | |
A vector NEWTON iteration class.
This allows for Newton iteration to be performed for a vector function of a vector unknown. Use templates to allow double or complex.
|
explicit |
Constructor.
| ptr_to_residual_object | A pointer to an inherited Residual object |
| max_steps | The maximum number of iteration steps. |
| tolerance | A tolerance used as a convergence criterion. |
| derivative_step | A step length used to compute derivatives. |
Definition at line 19 of file Newton.cpp.
| void CppNoddy::Newton< _Type >::arclength_solve | ( | DenseVector< _Type > & | x | ) |
Arc-length solve the system.
Before this can be called the arc_init method should have been called in order to ensure we know a solution and have derivatives w.r.t. the arc-length parameter.
Definition at line 98 of file Newton.cpp.
References CppNoddy::Utility::dot(), CppNoddy::DenseLinearSystem< _Type >::get_det_sign(), CppNoddy::DenseVector< _Type >::inf_norm(), CppNoddy::DenseLinearSystem< _Type >::set_monitor_det(), and CppNoddy::DenseLinearSystem< _Type >::solve().
Referenced by main().
| void CppNoddy::Newton< _Type >::iterate | ( | DenseVector< _Type > & | x | ) |
The Newton iteration method.
| x | An initial guess vector and returns the solution via this too. |
Definition at line 35 of file Newton.cpp.
References CppNoddy::DenseLinearSystem< _Type >::get_det_sign(), CppNoddy::DenseLinearSystem< _Type >::set_monitor_det(), CppNoddy::DenseVector< _Type >::size(), and CppNoddy::DenseLinearSystem< _Type >::solve().
Referenced by main(), and CppNoddy::Newton< _Type >::solve().
|
inline |
If set then the system will monitor the sign of determinant of the Jacobian matrix and cause an ExceptionBifurcation when it changes sign.
| flag | The value to be set. |
Definition at line 47 of file Newton.h.
Referenced by main().
|
inlinevirtual |
Solve the system for an initial guess by Newton iteration, this method is inherited from the ArcLength_base class and this simply points it to the iteration method.
| x | An initial guess vector, the solution overwrites it. |
Implements CppNoddy::ArcLength_base< _Type >.
Definition at line 55 of file Newton.h.
References CppNoddy::Newton< _Type >::iterate().
1.9.5
© 2012
R.E. Hewitt