Class to solve the linear hyperbolic equation in 2-D by a MUSCL Finite Volume scheme on triangles. More...
#include <LCL2DT.h>

Public Member Functions | |
LCL2DT (Mesh &m) | |
Constructor using Mesh instance. | |
LCL2DT (Mesh &m, Vect< real_t > &U) | |
Constructor using mesh and initial data. More... | |
~LCL2DT () | |
Destructor. | |
Vect< real_t > & | getFlux () |
Return sidewise flux vector. | |
void | setInitialCondition (Vect< real_t > &u) |
Set elementwise initial condition. More... | |
void | setInitialCondition (real_t u) |
Set a constant initial condition. More... | |
void | setReconstruction () |
Reconstruct flux using Muscl scheme. | |
real_t | runOneTimeStep () |
Run one time step of the linear conservation law. More... | |
void | setBC (real_t u) |
Set Dirichlet boundary condition. More... | |
void | setBC (const Side &sd, real_t u) |
Set Dirichlet boundary condition. More... | |
void | setBC (int code, real_t u) |
Set Dirichlet boundary condition. More... | |
void | setVelocity (const Vect< real_t > &v) |
Set convection velocity. More... | |
void | setVelocity (const LocalVect< real_t, 2 > &v) |
Set (constant) convection velocity. More... | |
void | Forward (const Vect< real_t > &Flux, Vect< real_t > &Field) |
Computation of the primal variable n->n+1. More... | |
![]() | |
Muscl2DT (Mesh &m) | |
Constructor using mesh. | |
~Muscl2DT () | |
Destructor. | |
bool | setReconstruction (const Vect< real_t > &U, Vect< real_t > &LU, Vect< real_t > &RU, size_t dof) |
Function to reconstruct by the Muscl method. More... | |
![]() | |
Muscl (Mesh &m) | |
Constructor using mesh instance. | |
virtual | ~Muscl () |
Destructor. | |
void | setTimeStep (real_t dt) |
Assign time step value. More... | |
real_t | getTimeStep () const |
Return time step value. | |
void | setCFL (real_t CFL) |
Assign CFL value. More... | |
real_t | getCFL () const |
Return CFL value. | |
void | setReferenceLength (real_t dx) |
Assign reference length value. More... | |
real_t | getReferenceLength () const |
Return reference length. | |
Mesh & | getMesh () const |
Return reference to Mesh instance. | |
void | setVerbose (int v) |
Set verbosity parameter. More... | |
bool | setReconstruction (const Vect< real_t > &U, Vect< real_t > &LU, Vect< real_t > &RU, size_t dof) |
Function to reconstruct by the Muscl method. More... | |
void | setMethod (const Method &s) |
Choose a flux solver. More... | |
void | setSolidZoneCode (int c) |
Choose a code for solid zone. | |
bool | getSolidZone () const |
Return flag for presence of solid zones. | |
int | getSolidZoneCode () const |
Return code of solid zone, 0 if this one is not present. | |
void | setLimiter (Limiter l) |
Choose a flux limiter. More... | |
Additional Inherited Members | |
![]() | |
enum | Method { FIRST_ORDER_METHOD = 0 , MULTI_SLOPE_Q_METHOD = 1 , MULTI_SLOPE_M_METHOD = 2 } |
Enumeration for flux choice. More... | |
enum | Limiter { MINMOD_LIMITER = 0 , VANLEER_LIMITER = 1 , SUPERBEE_LIMITER = 2 , VANALBADA_LIMITER = 3 , MAX_LIMITER = 4 } |
Enumeration of flux limiting methods. More... | |
enum | SolverType { ROE_SOLVER = 0 , VFROE_SOLVER = 1 , LF_SOLVER = 2 , RUSANOV_SOLVER = 3 , HLL_SOLVER = 4 , HLLC_SOLVER = 5 , MAX_SOLVER = 6 } |
Enumeration of various solvers for the Riemann problem. More... | |
![]() | |
void | Initialize () |
Construction of normals to sides. More... | |
Detailed Description
Class to solve the linear hyperbolic equation in 2-D by a MUSCL Finite Volume scheme on triangles.
- Copyright
- GNU Lesser Public License
Constructor & Destructor Documentation
◆ LCL2DT()
Constructor using mesh and initial data.
- Parameters
-
[in] m Reference to Mesh instance [in] U Vector containing initial (elementwise) solution
Member Function Documentation
◆ Forward()
Computation of the primal variable n->n+1.
Vector Flux contains elementwise fluxes issued from the Riemann problem, calculated with, as left element, getNeighborElement(1) and right element getNeighborElement(2) if getNeighborElement(2) doesn't exist, we are on a boundary and we prescribe a symmetry condition
◆ runOneTimeStep()
real_t runOneTimeStep | ( | ) |
Run one time step of the linear conservation law.
- Returns
- Value of the time step
◆ setBC() [1/3]
Set Dirichlet boundary condition.
Assign a constant value to a side
- Parameters
-
[in] sd Side to which value is prescibed [in] u Value to prescribe
◆ setBC() [2/3]
void setBC | ( | int | code, |
real_t | u | ||
) |
Set Dirichlet boundary condition.
Assign a constant value sides with a given code
- Parameters
-
[in] code Code of sides to which value is prescibed [in] u Value to prescribe
◆ setBC() [3/3]
void setBC | ( | real_t | u | ) |
Set Dirichlet boundary condition.
Assign a constant value u
to all boundary sides
◆ setInitialCondition() [1/2]
void setInitialCondition | ( | real_t | u | ) |
Set a constant initial condition.
- Parameters
-
[in] u Value of initial condition to assign to all elements
◆ setInitialCondition() [2/2]
Set elementwise initial condition.
- Parameters
-
[in] u Vect instance containing initial condition values
◆ setVelocity() [1/2]
Set (constant) convection velocity.
- Parameters
-
[in] v Vector containing constant velocity to prescribe