30 return - std::sin( y );
42 cout <<
"=== EVP: Rayleigh modes, Tollmien's example =========\n";
48 double right = 2 * M_PI;
54 for (
unsigned i = 0; i < N; ++i )
57 c_nodes[ i ] -= .2 *
D_complex( 0.0, 1.0 ) * y * std::exp( - y );
62 for (
unsigned i = 0; i < c_nodes.
size(); ++i )
65 base( i, 0 ) = Example::U( y );
66 base( i, 1 ) = Example::Udd( y );
75 for (
unsigned i = 0; i < my_ray.
eigenvalues().size(); ++i )
86 if ( std::abs( my_ray.
alpha() - .5*sqrt( 3. ) ) < tol )
88 cout <<
"\033[1;32;48m * PASSED \033[0m\n";
91 cout <<
"\033[1;31;48m * FAILED \033[0m\n";
92 cout <<
" Final error in critical wavenumber = " << std::abs( my_ray.
alpha() - .5*sqrt( 3. ) ) <<
"\n";
A shorter bundled include file for ODE_EVP and general eigenvalue problems.
Some classes useful for hydrodynamic stability theory problems.
An DenseVector class – a dense vector object.
std::size_t size() const
A pass-thru definition to get the size of the vector.
void iterate_to_neutral(std::size_t i_ev)
Iterate on the wavenumber ALPHA, using the local_evp routine, to drive a selected eigenvalue to be ne...
DenseVector< std::complex< double > > & eigenvalues()
A handle to the eigenvalues vector.
void global_evp()
Solve the global eigenvalue problem for the Rayleigh equation by employing a second-order finite-diff...
double & alpha()
A handle to the wavenumber.
A one dimensional mesh utility object.
double Udd(double y)
Globally define the base flow curvature.
OneD_Node_Mesh< D_complex, D_complex > baseflow
DenseVector< double > power_node_vector(const double &lower, const double &upper, const std::size_t &N, const double &power)
Return a DENSE vector with the nodal points of a non-uniform mesh distributed between the upper/lower...
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.