CppNoddy
0.92
|
A class to represent a two-dimensional hyperbolic system of equations. More...
#include <TwoD_Hyperbolic_System.h>
Public Member Functions | |
TwoD_Hyperbolic_System (const unsigned &order) | |
virtual | ~TwoD_Hyperbolic_System () |
An empty destructor, virtual since we have virtual methods. More... | |
virtual void | flux_fn_x (const DenseVector< double > &x, const DenseVector< double > &q, DenseVector< double > &f) const |
A virtual flux function for the x-derivative. More... | |
virtual void | flux_fn_y (const DenseVector< double > &x, const DenseVector< double > &q, DenseVector< double > &f) const |
A virtual flux function for the y-derivative. More... | |
virtual void | Jac_flux_fn_x (const DenseVector< double > &x, const DenseVector< double > &q, DenseMatrix< double > &J) const |
A virtual function function to define the Jacobian of the x-flux function. More... | |
virtual void | Jac_flux_fn_y (const DenseVector< double > &x, const DenseVector< double > &q, DenseMatrix< double > &J) const |
A virtual function function to define the Jacobian of the y-flux function. More... | |
virtual void | max_charac_speed (const DenseVector< double > &x, const DenseVector< double > &q, DenseVector< double > &c) const |
A virtual method that is used to bound the characteristic speed in both directions. More... | |
virtual std::vector< bool > | edge_values (const int &face_index, const DenseVector< double > &x, DenseVector< double > &q) const |
Define the edge boundary conditions. More... | |
virtual void | edge_slopes (const int &face_index, const DenseVector< double > &x, DenseVector< double > &sigma_n) const |
Define the edge boundary condition slopes. More... | |
virtual void | source_fn (const DenseVector< double > &x, const DenseVector< double > &q, DenseVector< double > &r) const |
unsigned | get_order () |
Protected Attributes | |
const unsigned | ORDER_OF_SYSTEM |
The order of the system of equations. More... | |
A class to represent a two-dimensional hyperbolic system of equations.
Definition at line 12 of file TwoD_Hyperbolic_System.h.
|
inlineexplicit |
order | The order of the hyperbolic system |
Definition at line 17 of file TwoD_Hyperbolic_System.h.
|
inlinevirtual |
An empty destructor, virtual since we have virtual methods.
Definition at line 21 of file TwoD_Hyperbolic_System.h.
|
inlinevirtual |
Define the edge boundary condition slopes.
These default to zero unless otherwise over-ridden.
face_index | An index for the face: 0,1,2,3 for S,E,N,W on the TwoD_TVDLF_Mesh |
x | The global position vector |
sigma_n | Specify the slope normal to the face |
Definition at line 124 of file TwoD_Hyperbolic_System.h.
|
inlinevirtual |
Define the edge boundary conditions.
face_index | An index for the face: 0,1,2,3 for S,E,N,W on the TwoD_TVDLF_Mesh |
x | The global position vector |
q | Specify the unknowns specified along the face |
Reimplemented in CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, and CppNoddy::Example::Shallow_2d_source.
Definition at line 114 of file TwoD_Hyperbolic_System.h.
References ORDER_OF_SYSTEM.
|
inlinevirtual |
A virtual flux function for the x-derivative.
x | The vector position |
q | The unknowns |
f | The flux function |
Reimplemented in CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::Shallow_2d_rad, and CppNoddy::Example::Shallow_2d_source.
Definition at line 28 of file TwoD_Hyperbolic_System.h.
Referenced by Jac_flux_fn_x().
|
inlinevirtual |
A virtual flux function for the y-derivative.
x | The vector position |
q | The unknowns |
f | The flux function |
Reimplemented in CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::Shallow_2d_rad, and CppNoddy::Example::Shallow_2d_source.
Definition at line 39 of file TwoD_Hyperbolic_System.h.
Referenced by Jac_flux_fn_y().
|
inline |
Definition at line 130 of file TwoD_Hyperbolic_System.h.
References ORDER_OF_SYSTEM.
|
inlinevirtual |
A virtual function function to define the Jacobian of the x-flux function.
The default method uses first-order finite differencing to compute the Jacobian if not otherwise specified by the user.
x | The vector position |
q | The unknowns |
J | The Jacobian of the flux function |
cheap & nasty differencing
Reimplemented in CppNoddy::Example::Shallow_2d_rad, and CppNoddy::Example::Shallow_2d_source.
Definition at line 53 of file TwoD_Hyperbolic_System.h.
References flux_fn_x(), ORDER_OF_SYSTEM, and CppNoddy::DenseMatrix< _Type >::set_col().
|
inlinevirtual |
A virtual function function to define the Jacobian of the y-flux function.
The default method uses first-order finite differencing to compute the Jacobian if not otherwise specified by the user.
x | The vector position |
q | The unknowns |
J | The Jacobian of the flux function |
cheap & nasty differencing
Reimplemented in CppNoddy::Example::Shallow_2d_rad, and CppNoddy::Example::Shallow_2d_source.
Definition at line 76 of file TwoD_Hyperbolic_System.h.
References flux_fn_y(), ORDER_OF_SYSTEM, and CppNoddy::DenseMatrix< _Type >::set_col().
|
inlinevirtual |
A virtual method that is used to bound the characteristic speed in both directions.
It determines the time step in order that the CFL constraint holds. It is sometimes required to specify a speed that is a function of position and to even specify the two-directional speeds. eg. your mesh may actually be w.r.t. a polar coordinate system in which the physical mesh size grows linearly with radius, so one of the speeds should be scaled accordingly.
x | The global coordinate |
q | The unknowns |
c | The speed |
Reimplemented in CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::NlinAdv, CppNoddy::Example::Shallow_2d_rad, and CppNoddy::Example::Shallow_2d_source.
Definition at line 101 of file TwoD_Hyperbolic_System.h.
|
inlinevirtual |
Reimplemented in CppNoddy::Example::Shallow_2d_source.
Definition at line 127 of file TwoD_Hyperbolic_System.h.
|
protected |
The order of the system of equations.
Definition at line 137 of file TwoD_Hyperbolic_System.h.
Referenced by edge_values(), get_order(), Jac_flux_fn_x(), and Jac_flux_fn_y().
© 2012
R.E. Hewitt