70 u[ 3 ] = unknown[ 0 ];
71 eqn ->
lambda = unknown[ 1 ];
73 u =
ode -> shoot4(
u );
92 cout <<
"=== EVP: Biharmonic equation via shooting ==========\n";
104 unknowns[ 1 ] = B * B;
110 catch (
const std::runtime_error &error )
112 cout <<
" \033[1;31;48m * FAILED THROUGH EXCEPTION BEING RAISED \033[0m\n";
116 D_complex eigenvalue( std::sqrt( unknowns[ 1 ] ) );
118 std::string dirname(
"./DATA");
119 mkdir( dirname.c_str(), S_IRWXU );
122 my_file.
push_ptr( &eigenvalue,
"eigenvalue" );
123 my_file.
push_ptr( &problem.
ode -> get_mesh(),
"biharmonic" );
127 const double tol = 1.e-8;
128 if ( abs( sin( eigenvalue ) + eigenvalue ) < tol )
130 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
134 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
135 cout <<
" Diff = " << abs( sin( eigenvalue ) + eigenvalue ) <<
"\n";
A shorter bundled include file for initial-value problems.
An DenseVector class – a dense vector object.
An equation object base class used in the BVP/IVP classes.
Define the biharmonic eigenvalue equation by inheriting Equation base class.
D_complex lambda
The eigenvalue.
Biharmonic_equation()
The biharmonic is a 4th order complex problem.
void residual_fn(const DenseVector< D_complex > &z, DenseVector< D_complex > &f) const
We implement the equation as 4 first-order ODEs.
Define a residual function using the boundary conditions for the biharmonic_equation.
void residual_fn(const DenseVector< D_complex > &unknown, DenseVector< D_complex > &BC) const
implement a residual function.
ODE_IVP< D_complex > * ode
A vector NEWTON iteration class.
void iterate(DenseVector< _Type > &x)
The Newton iteration method.
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...
std::complex< double > D_complex
A complex double precision number using std::complex.