CppNoddy
0.92
|
#include <ArcLength_base.h>
Public Member Functions | |
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... | |
Protected Member Functions | |
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 | |
_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... | |
Definition at line 16 of file ArcLength_base.h.
|
inline |
Definition at line 20 of file ArcLength_base.h.
|
inlinevirtual |
Definition at line 28 of file ArcLength_base.h.
|
protected |
The extra constraint that is to be used to replace the unknown arc length.
Definition at line 81 of file ArcLength_base.cpp.
References CppNoddy::DenseVector< _Type >::size().
double & CppNoddy::ArcLength_base< _Type >::arcstep_multiplier |
Used to set the multiplication constant used when increasing or decreasing the arclength step.
Definition at line 18 of file ArcLength_base.cpp.
double & CppNoddy::ArcLength_base< _Type >::desired_arc_proportion |
Handle to the desired proportion of the parameter to be used in the arc length solver.
If this parameter is 1, then the system is effectively doing zero-order continuation in the secondary parameter.
Definition at line 33 of file ArcLength_base.cpp.
Referenced by main().
double & CppNoddy::ArcLength_base< _Type >::ds |
Return a handle to the arclength step.
This is normally done via the init_arc method, but one can use this to change the setting post-initialisation.
Definition at line 13 of file ArcLength_base.cpp.
void CppNoddy::ArcLength_base< _Type >::init_arc | ( | DenseVector< _Type > | x, |
_Type * | p, | ||
const double & | length, | ||
const double & | max_length | ||
) |
Initialise the class ready for arc-length continuation.
This will ensure that x is a solution at the current parameter value and compute the required derivatives with respect to the parameter.
x | The initial guess at a solution |
p | A pointer to the required parameter |
length | Initial arc-length step to take |
max_length | Maximum absolute arc length step permitted |
Definition at line 53 of file ArcLength_base.cpp.
Referenced by main().
|
inlineprotected |
The derivative of the arclength_residual function with respect to each of the state variables.
When arc-length continuing boundary value problems you would NOT want to finite-difference this since vector lengths will be of the order of 10^3.
x | The state vector. |
Definition at line 94 of file ArcLength_base.h.
References CppNoddy::ArcLength_base< _Type >::LAST_X, CppNoddy::DenseVector< _Type >::size(), and CppNoddy::ArcLength_base< _Type >::THETA.
bool & CppNoddy::ArcLength_base< _Type >::rescale_theta |
Handle to the RESCALE_THETA flag.
If true the arclength theta will be rescaled to balance the relative importance of the state variables and the parameter.
Definition at line 23 of file ArcLength_base.cpp.
Referenced by main().
|
pure virtual |
Compute a solution for that state & parameter variables that are an arc-length 'ds' from the current state.
virtual void arclength_solve( DenseVector<_Type> &x ) = 0; Solve the system for a given initial guess.
x | The initial guess for the system. |
Implemented in CppNoddy::Newton< _Type >.
Definition at line 38 of file ArcLength_base.cpp.
double & CppNoddy::ArcLength_base< _Type >::theta |
Set the arclength theta parameter.
Definition at line 28 of file ArcLength_base.cpp.
Referenced by main().
|
protected |
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.
Definition at line 42 of file ArcLength_base.cpp.
|
protected |
Automatically update the Keller THETA such that the proportion of the arclength obtained from the parameter is the desired value.
This method will only have any effect of the RESCALE_THETA flag is true.
Definition at line 88 of file ArcLength_base.cpp.
References CppNoddy::DenseVector< _Type >::size().
|
protected |
step change multiplier
Definition at line 123 of file ArcLength_base.h.
|
protected |
size of the arc length step
Definition at line 119 of file ArcLength_base.h.
|
protected |
for the arc-length solver - to show it has been initialised
Definition at line 125 of file ArcLength_base.h.
|
protected |
parameter value at the last computed solution
Definition at line 115 of file ArcLength_base.h.
|
protected |
state variable at the last computed solution
Definition at line 111 of file ArcLength_base.h.
Referenced by CppNoddy::ArcLength_base< _Type >::Jac_arclength_residual().
|
protected |
maximum arc length step to be taken
Definition at line 121 of file ArcLength_base.h.
|
protected |
pointer to the parameter in arclength solves
Definition at line 109 of file ArcLength_base.h.
|
protected |
derivative of the parameter w.r.t arc length
Definition at line 117 of file ArcLength_base.h.
|
protected |
the arclength theta
Definition at line 127 of file ArcLength_base.h.
Referenced by CppNoddy::ArcLength_base< _Type >::Jac_arclength_residual().
|
protected |
derivative of the state variable w.r.t. arc length
Definition at line 113 of file ArcLength_base.h.
© 2012
R.E. Hewitt