36 f[ 2 ] = -
z[ 0 ] *
z[ 2 ] -
beta * ( 1.0 -
z[ 1 ] *
z[ 1 ] );
73 u =
ode -> shoot4(
u );
88 cout <<
"=== ARC: arc-length continuation of the FS equation =\n";
95 problem.
eqn -> beta = -0.11;
102 newton.
init_arc( stress, &problem.
eqn -> beta, -0.01, 0.1 );
105 std::string dirname(
"./DATA");
106 mkdir( dirname.c_str(), S_IRWXU );
108 my_file.
push_ptr( &problem.
eqn -> beta,
"Hartree parameter" );
109 my_file.
push_ptr( &stress,
"Shear stress at the wall" );
113 double approx_limit_point = 0.0;
116 double last_beta = problem.
eqn -> beta;
124 catch (
const std::runtime_error &error )
126 cout <<
" \033[1;31;48m * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
132 cout <<
" Bifurcation detected between beta = " << last_beta
133 <<
" and beta = " << problem.
eqn -> beta <<
"\n";
134 cout <<
" Continuing further.\n";
136 approx_limit_point = 0.5 * ( problem.
eqn -> beta + last_beta );
140 while ( problem.
eqn -> beta < -0.1 );
142 if ( abs( approx_limit_point + 0.1988 ) > 0.0005 )
144 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
149 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
A shorter bundled include file for initial-value problems.
A shorter bundled include file for Newton iteration problems.
void init_arc(DenseVector< _Type > x, _Type *p, const double &length, const double &max_length)
Initialise the class ready for arc-length continuation.
An DenseVector class – a dense vector object.
An equation object base class used in the BVP/IVP classes.
Define the Falkner-Skan equation.
FS_eqn()
The FSE is a 3rd order ODE.
double beta
The Hartree parameter.
void residual_fn(const DenseVector< double > &z, DenseVector< double > &f) const
We implement the equation as 3 first-order real ODEs.
Define a residual function using the boundary conditions for the Blasius profile.
void residual_fn(const DenseVector< double > &z, DenseVector< double > &f) const
implement a residual function.
A vector NEWTON iteration class.
void set_monitor_det(bool flag)
If set then the system will monitor the sign of determinant of the Jacobian matrix and cause an Excep...
void arclength_solve(DenseVector< _Type > &x)
Arc-length solve the system.
A templated object for real/complex vector system of first-order ordinary differential equations.
A base class to be inherited by objects that define residuals.
void push_ptr(double *scalar, std::string desc="")
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...