LCL2DT Class Reference
[Conservation Law Equations]
#include <LCL2DT.h>

Detailed Description
Class to solve the linear hyperbolic equation in 2-D by a MUSCL Finite Volume scheme on triangles.Public Types | |
| enum | Limiter { MINMOD_LIMITER = 0, SUPERBEE_LIMITER = 2, VANLEER_LIMITER = 1, VANALBADA_LIMITER = 3, MAX_LIMITER = 4, L_FORCE_WORD = 0xFFFFFFFF } |
| enum | Method { FIRST_ORDER_METHOD = 0, MULTI_SLOPE_M_METHOD = 2, MULTI_SLOPE_Q_METHOD = 1, M_FORCE_WORD = 0xFFFFFFFF } |
Public Member Functions | |
| void | Forward (const SideVect< double > &Flux, ElementVect< double > &Field) |
| Computation of the primal variable n->n+1. | |
| double | getCFL () const |
| Return CFL value. | |
| SideVect< double > & | getFlux () |
| Return sidewise flux vector. | |
| Mesh & | getMesh () const |
| Return reference to Mesh instance. | |
| double | getReferenceLength () const |
| Return reference length. | |
| double | getTimeStep () const |
| Return time step value. | |
| LCL2DT (Mesh &m, ElementVect< double > &U) | |
| Constructor using mesh and initial data. | |
| LCL2DT (Mesh &m) | |
| Constructor using Mesh instance. | |
| double | runOneTimeStep () |
| Run one time step of the linear conservation law. | |
| void | setBC (int code, double u) |
| Set Dirichlet boundary condition. | |
| void | setBC (const Side &sd, double u) |
| Set Dirichlet boundary condition. | |
| void | setBC (double u) |
| Set Dirichlet boundary condition. | |
| void | setCFL (double CFL) |
| Assign CFL value. | |
| void | setInitialCondition (double u) |
| Set a constant initial condition. | |
| void | setInitialCondition (ElementVect< double > &u) |
| Set elementwise initial condition. | |
| void | setLimiter (Limiter l) |
| Choose a flux limiter. | |
| void | setMethod (const Method &s) |
| Choose a flux solver. | |
| bool | setReconstruction (const ElementVect< double > &U, SideVect< double > &GU, SideVect< double > &DU, int dof) |
| Function to reconstruct by the Muscl method. | |
| void | setReconstruction () |
| Reconstruct flux using Muscl scheme. | |
| void | setReferenceLength (double dx) |
| Assign reference length value. | |
| void | setTimeStep (double dt) |
| Assign time step value. | |
| void | setVelocity (const LocalVect< double, 2 > &v) |
| Set (constant) convection velocity. | |
| void | setVelocity (const SideVect< double > &v) |
| Set convection velocity. | |
| void | setVerbose (int v) |
| Set verbosity parameter. | |
| ~LCL2DT () | |
| Destructor. | |
Protected Member Functions | |
| void | Initialize () |
| Construction of normals to sides. | |
Member Enumeration Documentation
enum Limiter [inherited] |
enum Method [inherited] |
Constructor & Destructor Documentation
| LCL2DT | ( | Mesh & | m, | |
| ElementVect< double > & | U | |||
| ) |
Constructor using mesh and initial data.
- Parameters:
-
[in] m Reference to Mesh instance [in] U Vector containing initial (elementwise) solution
Member Function Documentation
| void Forward | ( | const SideVect< double > & | Flux, | |
| ElementVect< double > & | Field | |||
| ) |
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
| void Initialize | ( | ) | [protected, inherited] |
Construction of normals to sides.
Convention: for a given side, getPtrElement(1) is the left element and getPtrElement(2) is the right element. The normal goes from left to right. For boundary sides, the normal is pointed outward.
| double runOneTimeStep | ( | ) |
Run one time step of the linear conservation law.
- Return values:
-
ts Value of the time step
| void setBC | ( | int | code, | |
| double | 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
| void setBC | ( | const Side & | sd, | |
| double | u | |||
| ) |
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
| void setBC | ( | double | u | ) |
Set Dirichlet boundary condition.
Assign a constant value u to all boundary sides
| void setCFL | ( | double | CFL | ) | [inherited] |
Assign CFL value.
- Parameters:
-
CFL [in] Value of CFL
| void setInitialCondition | ( | double | u | ) |
Set a constant initial condition.
- Parameters:
-
[in] u Value of initial condition to assign to all elements
| void setInitialCondition | ( | ElementVect< double > & | u | ) |
Set elementwise initial condition.
- Parameters:
-
[in] u ElementVect instance containing initial condition values
| void setLimiter | ( | Limiter | l | ) | [inherited] |
Choose a flux limiter.
- Parameters:
-
[in] l Limiter to choose
| void setMethod | ( | const Method & | s | ) | [inherited] |
Choose a flux solver.
- Parameters:
-
[in] s Solver to choose
| bool setReconstruction | ( | const ElementVect< double > & | U, | |
| SideVect< double > & | GU, | |||
| SideVect< double > & | DU, | |||
| int | dof | |||
| ) | [inherited] |
| void setReferenceLength | ( | double | dx | ) | [inherited] |
| void setTimeStep | ( | double | dt | ) | [inherited] |
Assign time step value.
- Parameters:
-
dt [in] Time step value
| void setVelocity | ( | const LocalVect< double, 2 > & | v | ) |
Set (constant) convection velocity.
- Parameters:
-
[in] u Vector containing constant velocity to prescribe
| void setVelocity | ( | const SideVect< double > & | v | ) |
| void setVerbose | ( | int | v | ) | [inherited] |
Set verbosity parameter.
- Parameters:
-
[in] v Value of verbosity parameter