CppNoddy  0.92
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CppNoddy::Example::OS_bvp_equation Class Reference

Define the OSE for the local refinement procedure. More...

Inheritance diagram for CppNoddy::Example::OS_bvp_equation:
CppNoddy::Equation_1matrix< D_complex > CppNoddy::Equation_1matrix< D_complex > CppNoddy::Residual_with_coords< _Type, _Xtype > CppNoddy::Residual_with_coords< _Type, _Xtype > CppNoddy::Residual< _Type > CppNoddy::Residual< _Type >

Public Member Functions

 OS_bvp_equation ()
 The OS LOCAL problem is a nonlinear 5th order complex BVP because the eigenvalue is added to the 4th order equation. More...
 
void residual_fn (const DenseVector< D_complex > &z, DenseVector< D_complex > &g) const
 The OS equation. More...
 
void matrix0 (const DenseVector< D_complex > &z, DenseMatrix< D_complex > &m) const
 matrix to multiply the BVP coordinate More...
 
 OS_bvp_equation ()
 The OS local problem is a nonlinear 5th order complex BVP. More...
 
void residual_fn (const DenseVector< D_complex > &z, DenseVector< D_complex > &g) const
 The OS equation. More...
 
void matrix0 (const DenseVector< D_complex > &z, DenseMatrix< D_complex > &m) const
 matrix to multiply the BVP coordinate More...
 
- Public Member Functions inherited from CppNoddy::Equation_1matrix< D_complex >
 Equation_1matrix (const unsigned &order)
 Constructor for equation class. More...
 
virtual ~Equation_1matrix ()
 An empty destructor, virtual since we have virtual methods. More...
 
void update (const DenseVector< D_complex > &state)
 Update the Equation object for the current set of state variables. More...
 
const DenseMatrix< D_complex > & matrix0 () const
 Return a handle to the matrix. More...
 
virtual void get_jacobian_of_matrix0_mult_vector (const DenseVector< D_complex > &state, const DenseVector< D_complex > &vec, DenseMatrix< D_complex > &h) const
 Return the product of the Jacobian-of-the-matrix and a vector 'vec' when the equation has a given 'state'. More...
 
- Public Member Functions inherited from CppNoddy::Residual_with_coords< _Type, _Xtype >
 Residual_with_coords (const unsigned &order, const unsigned &ncoords)
 Constructor for a 'square' residual object that is, N residuals for N unknowns. More...
 
 Residual_with_coords (const unsigned &order, const unsigned &nvars, const unsigned &ncoords)
 Constructor for a 'non-square' residual object that is, there are less residual constraints than unknowns. More...
 
virtual ~Residual_with_coords ()
 An empty destructor. More...
 
_Xtype & coord (const unsigned &i)
 General handle access to the coordinates. More...
 
const _Xtype & coord (const unsigned &i) const
 General handle access to the coordinates. More...
 
- Public Member Functions inherited from CppNoddy::Residual< _Type >
 Residual (const unsigned &order)
 Constructor for a 'square' residual object that is, N residuals for N unknowns. More...
 
 Residual (const unsigned &order, const unsigned &nvars)
 Constructor for a 'non-square' residual object that is, there are less residual constraints than unknowns. More...
 
virtual ~Residual ()
 An empty destructor, virtual since we have virtual methods. More...
 
void update (const DenseVector< _Type > &state)
 Update the Residual object for the current set of state variables. More...
 
const DenseVector< _Type > & residual () const
 Return a handle to the residuals corresponding to the last update state. More...
 
const DenseMatrix< _Type > & jacobian () const
 Retrun a handle to the Jacobian of the residual corresponding to the last update state. More...
 
_Type & delta ()
 
const _Type & delta () const
 
unsigned get_order () const
 Get the order of the residual vector. More...
 
unsigned get_number_of_vars () const
 Get the number of variables that this residual condition is defined for. More...
 
virtual void residual_fn (const DenseVector< _Type > &state, DenseVector< _Type > &f) const
 A blank virtual residual function method. More...
 

Additional Inherited Members

virtual void matrix0 (const DenseVector< D_complex > &x, DenseMatrix< D_complex > &m) const
 Define the matrix in terms of the current state vector. More...
 
- Protected Member Functions inherited from CppNoddy::Residual< _Type >
virtual void jacobian (const DenseVector< _Type > &state, DenseMatrix< _Type > &jac) const
 Because the residual evaluation at the current state is assumed to have already been done by the 'update' method, this routine is protected. More...
 
- Protected Attributes inherited from CppNoddy::Residual_with_coords< _Type, _Xtype >
std::vector< _Xtype > coords
 The coordinates stored for this residual. More...
 
- Protected Attributes inherited from CppNoddy::Residual< _Type >
DenseMatrix< _Type > JAC_AT_LAST_STATE
 Jacobian for the last state vector. More...
 
DenseVector< _Type > FN_AT_LAST_STATE
 Residual for the last state vector. More...
 
DenseVector< _Type > LAST_STATE
 The last state vector. More...
 
_Type DELTA
 A default step for FD computation of the Jacobian. More...
 
unsigned ORDER_OF_SYSTEM
 The order of the system of equations. More...
 
unsigned NUMBER_OF_VARS
 The number of elements in the state vector. More...
 

Detailed Description

Define the OSE for the local refinement procedure.

Definition at line 83 of file EVPOrrSommerfeldEasy_lapack.cpp.

Constructor & Destructor Documentation

◆ OS_bvp_equation() [1/2]

CppNoddy::Example::OS_bvp_equation::OS_bvp_equation ( )
inline

The OS LOCAL problem is a nonlinear 5th order complex BVP because the eigenvalue is added to the 4th order equation.

Definition at line 88 of file EVPOrrSommerfeldEasy_lapack.cpp.

An equation object base class used in the IBVP classes (and others).

◆ OS_bvp_equation() [2/2]

CppNoddy::Example::OS_bvp_equation::OS_bvp_equation ( )
inline

The OS local problem is a nonlinear 5th order complex BVP.

Definition at line 89 of file EVPOrrSommerfeldNeutralCurve_lapack.cpp.

Member Function Documentation

◆ matrix0() [1/2]

void CppNoddy::Example::OS_bvp_equation::matrix0 ( const DenseVector< D_complex > &  z,
DenseMatrix< D_complex > &  m 
) const
inlinevirtual

matrix to multiply the BVP coordinate

Reimplemented from CppNoddy::Equation_1matrix< D_complex >.

Definition at line 104 of file EVPOrrSommerfeldEasy_lapack.cpp.

105 {
107 }
void fill_identity(CppNoddy::Sequential_Matrix_base< _Type > &A)
Fill diagonal with unit values.
Definition: Utils_Fill.h:22

References Utils_Fill::fill_identity(), and m.

◆ matrix0() [2/2]

void CppNoddy::Example::OS_bvp_equation::matrix0 ( const DenseVector< D_complex > &  z,
DenseMatrix< D_complex > &  m 
) const
inlinevirtual

matrix to multiply the BVP coordinate

Reimplemented from CppNoddy::Equation_1matrix< D_complex >.

Definition at line 105 of file EVPOrrSommerfeldNeutralCurve_lapack.cpp.

106 {
108 }

References Utils_Fill::fill_identity(), and m.

◆ residual_fn() [1/2]

void CppNoddy::Example::OS_bvp_equation::residual_fn ( const DenseVector< D_complex > &  z,
DenseVector< D_complex > &  g 
) const
inline

The OS equation.

Definition at line 91 of file EVPOrrSommerfeldEasy_lapack.cpp.

92 {
93 // define the equation as 5 1st order equations
94 g[ phi ] = z[ phid ];
95 g[ phid ] = z[ psi ] + alpha * alpha * z[ phi ];
96 g[ psi ] = z[ psid ];
97 g[ psid ] = alpha * alpha * z[ psi ]
98 + D_complex( 0.0, 1.0 ) * alpha * Re * ( U( coord(0) ) * z[ psi ] - Udd( coord(0) ) * z[ phi ] )
99 - D_complex( 0.0, 1.0 ) * alpha * Re * z[ eval ] * z[ psi ];
100 g[ eval ] = 0.0;
101 }
@ U
Definition: BVPKarman.cpp:20
_Xtype & coord(const unsigned &i)
General handle access to the coordinates.
double Udd(double y)
Globally define the base flow curvature.
double Re
Globally define the Reynolds number and wavenumber.
double g(1.0)
gravitational acceleration
std::complex< double > D_complex
A complex double precision number using std::complex.
Definition: Types.h:98

References CppNoddy::Example::alpha, CppNoddy::Residual_with_coords< _Type, _Xtype >::coord(), eval, CppNoddy::Example::g(), phi, phid, psi, psid, CppNoddy::Example::Re, U, CppNoddy::Example::Udd(), and CppNoddy::Example::z().

◆ residual_fn() [2/2]

void CppNoddy::Example::OS_bvp_equation::residual_fn ( const DenseVector< D_complex > &  z,
DenseVector< D_complex > &  g 
) const
inline

The OS equation.

Definition at line 92 of file EVPOrrSommerfeldNeutralCurve_lapack.cpp.

93 {
94 // define the equation as 5 1st order equations
95 g[ phi ] = z[ phid ];
96 g[ phid ] = z[ psi ] + alpha * alpha * z[ phi ];
97 g[ psi ] = z[ psid ];
98 g[ psid ] = alpha * alpha * z[ psi ]
99 + D_complex( 0.0, 1.0 ) * alpha * Re * ( U( coord(0) ) * z[ psi ] - Udd( coord(0) ) * z[ phi ] )
100 - D_complex( 0.0, 1.0 ) * alpha * Re * z[ eval ] * z[ psi ];
101 g[ eval ] = 0.0;
102 }

References CppNoddy::Example::alpha, CppNoddy::Residual_with_coords< _Type, _Xtype >::coord(), eval, CppNoddy::Example::g(), phi, phid, psi, psid, CppNoddy::Example::Re, U, CppNoddy::Example::Udd(), and CppNoddy::Example::z().


The documentation for this class was generated from the following files:

© 2012

R.E. Hewitt