CppNoddy
0.92
|
#include <OneD_TVDLF_Mesh.h>
Public Member Functions | |
OneD_TVDLF_Mesh (const DenseVector< double > &X, OneD_Hyperbolic_System *ptr, fn_ptr init_ptr) | |
Constructor for the Finite Volume Mesh using linear elements. More... | |
~OneD_TVDLF_Mesh () | |
Empty desctructor. More... | |
DenseVector< double > | get_mid_node_vector () const |
Get the nodal positions in the middle of each element. More... | |
DenseVector< double > | get_face_pos_vector () const |
Get the positions of the element faces. More... | |
void | set_limiter (unsigned id) |
Set the limiter type to be applied in the slope values. More... | |
double | update (const double &CFL, const double &max_dt=std::numeric_limits< long double >::max()) |
Update all the elements in this mesh to a new time step. More... | |
void | update_to (const double &CFL, const double &t_end) |
Update all the elements in this mesh to a USER SPECIFIED time step. More... | |
double | update_to_red (const double &CFL, const double &max_dt) |
double | update_to_black (const double &CFL, const double &max_dt) |
const double & | get_time () const |
Get a const reference to the time value for the current mesh. More... | |
DenseVector< double > | integrate () const |
Integrate the concentration values across the entire mesh. More... | |
OneD_Node_Mesh< double > | get_soln (std::string location="centre", std::string colour="black") |
Get a OneD_Mesh<double> object containing the one dimensional data in the usual format. More... | |
OneD_Node_Mesh< double > | get_slope () |
Definition at line 19 of file OneD_TVDLF_Mesh.h.
CppNoddy::OneD_TVDLF_Mesh::OneD_TVDLF_Mesh | ( | const DenseVector< double > & | X, |
OneD_Hyperbolic_System * | ptr, | ||
fn_ptr | init_ptr | ||
) |
Constructor for the Finite Volume Mesh using linear elements.
X | A vector of nodal locations at which the element FACES will positioned |
ptr | A pointer to the hyperbolic system applied to this mesh |
init_ptr | A pointer to a function that defines the initial conditions |
X | A vector of nodal locations at which the element FACES will positioned |
Definition at line 17 of file OneD_TVDLF_Mesh.cpp.
References CppNoddy::DenseVector< _Type >::size().
CppNoddy::OneD_TVDLF_Mesh::~OneD_TVDLF_Mesh | ( | ) |
DenseVector< double > CppNoddy::OneD_TVDLF_Mesh::get_face_pos_vector | ( | ) | const |
Get the positions of the element faces.
Definition at line 196 of file OneD_TVDLF_Mesh.cpp.
References CppNoddy::DenseVector< _Type >::push_back().
Referenced by get_soln().
DenseVector< double > CppNoddy::OneD_TVDLF_Mesh::get_mid_node_vector | ( | ) | const |
Get the nodal positions in the middle of each element.
Definition at line 186 of file OneD_TVDLF_Mesh.cpp.
References CppNoddy::DenseVector< _Type >::push_back().
Referenced by get_slope(), and get_soln().
|
inline |
Definition at line 216 of file OneD_TVDLF_Mesh.h.
References get_mid_node_vector(), get_slope(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::set_nodes_vars(), and CppNoddy::DenseVector< _Type >::size().
Referenced by get_slope(), update_to_black(), and update_to_red().
OneD_Node_Mesh< double > CppNoddy::OneD_TVDLF_Mesh::get_soln | ( | std::string | location = "centre" , |
std::string | colour = "black" |
||
) |
Get a OneD_Mesh<double> object containing the one dimensional data in the usual format.
location | Use "centre" for mid-elt values and "face_average" for the average values at the (discontinuous) element boundaries |
colour | Which mesh to output, unless debugging, this should be "black" otherwise time values will be slightly out |
Definition at line 238 of file OneD_TVDLF_Mesh.cpp.
References get_face_pos_vector(), get_mid_node_vector(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::set_nodes_vars(), and CppNoddy::DenseVector< _Type >::size().
Referenced by main().
const double & CppNoddy::OneD_TVDLF_Mesh::get_time | ( | ) | const |
Get a const reference to the time value for the current mesh.
Definition at line 224 of file OneD_TVDLF_Mesh.cpp.
DenseVector< double > CppNoddy::OneD_TVDLF_Mesh::integrate | ( | ) | const |
Integrate the concentration values across the entire mesh.
Definition at line 228 of file OneD_TVDLF_Mesh.cpp.
Referenced by main().
void CppNoddy::OneD_TVDLF_Mesh::set_limiter | ( | unsigned | id | ) |
Set the limiter type to be applied in the slope values.
0 is no limiter, 1 is Lax-Wendroff, 2 is Beam-Warming, 3 is MC and 4 is Superbee.
id | The identifier of the limiter. |
Definition at line 208 of file OneD_TVDLF_Mesh.cpp.
Referenced by main().
double CppNoddy::OneD_TVDLF_Mesh::update | ( | const double & | CFL, |
const double & | max_dt = std::numeric_limits<long double>::max() |
||
) |
Update all the elements in this mesh to a new time step.
CFL | The CFL value to be used to determine the time step |
max_dt | Do not take a time step larger than this irrespective of the CFL value |
Definition at line 212 of file OneD_TVDLF_Mesh.cpp.
References update_to_black(), and update_to_red().
Referenced by main(), and update_to().
void CppNoddy::OneD_TVDLF_Mesh::update_to | ( | const double & | CFL, |
const double & | t_end | ||
) |
Update all the elements in this mesh to a USER SPECIFIED time step.
CFL | The CFL value to be used to determine the time step |
t_end | The time level to compute to |
Definition at line 218 of file OneD_TVDLF_Mesh.cpp.
References update().
|
inline |
Definition at line 133 of file OneD_TVDLF_Mesh.h.
References get_slope().
Referenced by update().
|
inline |
Definition at line 65 of file OneD_TVDLF_Mesh.h.
References get_slope().
Referenced by update().
© 2012
R.E. Hewitt