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

Define the boundary conditions. More...

Inheritance diagram for CppNoddy::Example::Karman_left_BC:
CppNoddy::Residual< double > CppNoddy::Residual< double > CppNoddy::Residual< double > CppNoddy::Residual< double > CppNoddy::Residual_with_coords< double > CppNoddy::Residual< _Type >

Public Member Functions

 Karman_left_BC ()
 
void residual_fn (const DenseVector< double > &z, DenseVector< double > &B) const
 A blank virtual residual function method. More...
 
 Karman_left_BC ()
 
void residual_fn (const DenseVector< double > &z, DenseVector< double > &B) const
 A blank virtual residual function method. More...
 
 Karman_left_BC ()
 
void residual_fn (const DenseVector< double > &z, DenseVector< double > &B) const
 A blank virtual residual function method. More...
 
 Karman_left_BC ()
 
void residual_fn (const DenseVector< double > &z, DenseVector< double > &B) const
 A blank virtual residual function method. More...
 
 Karman_left_BC ()
 
void residual_fn (const DenseVector< double > &z, DenseVector< double > &b) const
 A blank virtual residual function method. More...
 
- Public Member Functions inherited from CppNoddy::Residual< double >
 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< double > &state)
 Update the Residual object for the current set of state variables. More...
 
const DenseVector< double > & residual () const
 Return a handle to the residuals corresponding to the last update state. More...
 
const DenseMatrix< double > & jacobian () const
 Retrun a handle to the Jacobian of the residual corresponding to the last update state. More...
 
double & delta ()
 
const double & 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< double > &state, DenseVector< double > &f) const
 A blank virtual residual function method. More...
 
- Public Member Functions inherited from CppNoddy::Residual_with_coords< double >
 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...
 
double & coord (const unsigned &i)
 General handle access to the coordinates. More...
 
const double & 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

- Protected Member Functions inherited from CppNoddy::Residual< double >
virtual void jacobian (const DenseVector< double > &state, DenseMatrix< double > &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 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< double >
DenseMatrix< double > JAC_AT_LAST_STATE
 Jacobian for the last state vector. More...
 
DenseVector< double > FN_AT_LAST_STATE
 Residual for the last state vector. More...
 
DenseVector< double > LAST_STATE
 The last state vector. More...
 
double 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...
 
- Protected Attributes inherited from CppNoddy::Residual_with_coords< double >
std::vector< double > 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 boundary conditions.

Definition at line 53 of file BVPKarman.cpp.

Constructor & Destructor Documentation

◆ Karman_left_BC() [1/5]

CppNoddy::Example::Karman_left_BC::Karman_left_BC ( )
inline

Definition at line 57 of file BVPKarman.cpp.

57: Residual<double> ( 3, 5 ) {}
A base class to be inherited by objects that define residuals.
Definition: Residual.h:15

◆ Karman_left_BC() [2/5]

CppNoddy::Example::Karman_left_BC::Karman_left_BC ( )
inline

Definition at line 55 of file BVPKarmanAdaptive.cpp.

55: Residual<double> ( 3, 5 ) {}

◆ Karman_left_BC() [3/5]

CppNoddy::Example::Karman_left_BC::Karman_left_BC ( )
inline

Definition at line 63 of file BVPKarmanArclength.cpp.

63: Residual<double> ( 3, 5 ) {}

◆ Karman_left_BC() [4/5]

CppNoddy::Example::Karman_left_BC::Karman_left_BC ( )
inline

Definition at line 69 of file BVPKarmanJacobian.cpp.

69: Residual<double> ( 3, 5 ) {}

◆ Karman_left_BC() [5/5]

CppNoddy::Example::Karman_left_BC::Karman_left_BC ( )
inline

Definition at line 87 of file IBVPKarman.cpp.

87: Residual_with_coords<double> ( 3, 5, 1 ) {}
A base class to be inherited by objects that define residuals.

Member Function Documentation

◆ residual_fn() [1/5]

void CppNoddy::Example::Karman_left_BC::residual_fn ( const DenseVector< double > &  state,
DenseVector< double > &  f 
) const
inlinevirtual

A blank virtual residual function method.

Parameters
stateThe unknown variable.
fThe residual function f(x).

Reimplemented from CppNoddy::Residual< double >.

Definition at line 59 of file BVPKarman.cpp.

60 {
61 B[ 0 ] = z[ U ];
62 B[ 1 ] = z[ V ];
63 B[ 2 ] = z[ W ] - 1.0;
64 }
@ V
Definition: BVPKarman.cpp:20
@ W
Definition: BVPKarman.cpp:20
@ U
Definition: BVPKarman.cpp:20

References U, V, W, and CppNoddy::Example::z().

◆ residual_fn() [2/5]

void CppNoddy::Example::Karman_left_BC::residual_fn ( const DenseVector< double > &  state,
DenseVector< double > &  f 
) const
inlinevirtual

A blank virtual residual function method.

Parameters
stateThe unknown variable.
fThe residual function f(x).

Reimplemented from CppNoddy::Residual< double >.

Definition at line 57 of file BVPKarmanAdaptive.cpp.

58 {
59 B[ 0 ] = z[ U ];
60 B[ 1 ] = z[ V ];
61 B[ 2 ] = z[ W ] - 1.0;
62 }

References U, V, W, and CppNoddy::Example::z().

◆ residual_fn() [3/5]

void CppNoddy::Example::Karman_left_BC::residual_fn ( const DenseVector< double > &  state,
DenseVector< double > &  f 
) const
inlinevirtual

A blank virtual residual function method.

Parameters
stateThe unknown variable.
fThe residual function f(x).

Reimplemented from CppNoddy::Residual< double >.

Definition at line 65 of file BVPKarmanArclength.cpp.

66 {
67 B[ 0 ] = z[ U ];
68 B[ 1 ] = z[ V ];
69 B[ 2 ] = z[ W ] - 1.0;
70 }

References U, V, W, and CppNoddy::Example::z().

◆ residual_fn() [4/5]

void CppNoddy::Example::Karman_left_BC::residual_fn ( const DenseVector< double > &  state,
DenseVector< double > &  f 
) const
inlinevirtual

A blank virtual residual function method.

Parameters
stateThe unknown variable.
fThe residual function f(x).

Reimplemented from CppNoddy::Residual< double >.

Definition at line 71 of file BVPKarmanJacobian.cpp.

72 {
73 B[ 0 ] = z[ U ];
74 B[ 1 ] = z[ V ];
75 B[ 2 ] = z[ W ] - 1.0;
76 }

References U, V, W, and CppNoddy::Example::z().

◆ residual_fn() [5/5]

void CppNoddy::Example::Karman_left_BC::residual_fn ( const DenseVector< double > &  state,
DenseVector< double > &  f 
) const
inlinevirtual

A blank virtual residual function method.

Parameters
stateThe unknown variable.
fThe residual function f(x).

Reimplemented from CppNoddy::Residual< double >.

Definition at line 89 of file IBVPKarman.cpp.

90 {
91 // get the time level for unsteady boundary condition
92 const double t = coord( 0 );
93 const double W_bc = Example::W_disk + ( Example::W_inf - Example::W_disk ) * std::exp( - 2 * t * t );
94 b[ 0 ] = z[ U ];
95 b[ 1 ] = z[ V ];
96 b[ 2 ] = z[ W ] - W_bc;
97 }
double & coord(const unsigned &i)
General handle access to the coordinates.
double W_disk(1.0)
double W_inf(0.0)

References CppNoddy::Residual_with_coords< double >::coord(), U, V, W, CppNoddy::Example::W_disk(), CppNoddy::Example::W_inf(), and CppNoddy::Example::z().


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

© 2012

R.E. Hewitt