DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp_HLLPhysicalFlux.h
Go to the documentation of this file.
1
2#pragma once
3
4// ...
5#include "../SfxBase/StVenant1DEquations.h"
6
7namespace dbpp
8{
13 {
14 public:
19 HLLPhysicalFlux( Sfx::SCLEquation* aMthEq) {}
24 Sfx::SCLEquation* getSclEquations() { return nullptr; }
29 void setSclEquations( const Sfx::SCLEquation* aSclEq) {}
30 // Maybe use a factory Dsn::createSclEquations()
31 // File Dsn_SclEquations i think should be more appropriate
37 cellFaceFlux calculFF( const Sfx::cellFaceVariables& aULR/*, Sfx::SCLEquation* aScleq*/) const
38 {
39 // DESIGN NOTE
40 // may be use a factory (why pass it as an arg?) unique_ptr<> return by factory
41 // see Scott Meyers book "Modern Effective C++"
42 // new Dsn::StVenant1DEq( std::string("St-Venant1D FrictionLess with Convective flux"))
43
44 Sfx::StVenant1D w_Scleq; // incomplete as default;
45
46 Sfx::StateVector w_UL = aULR.UL(); // left state
47 Sfx::StateVector w_UR = aULR.UR(); // right state
48
49 const auto w_FL1 = w_UL.Q(); // flux left state
50 const auto w_FR1 = w_UR.Q(); // flux right state
51
52 // create a math equation from the factory?? avoid passing math eq as arg
53 // "shr_ptr createSCLEquation(incomplete)" since we need it
54 // to evaluate (physical)flux of state variable (node value)
55
56 // compute flux according to math equation
57 const auto w_FL2 = w_Scleq.flux( Sfx::StateVector(w_UL.A(), w_UL.Q())); //FL2
58 const auto w_FR2 = w_Scleq.flux( Sfx::StateVector(w_UR.A(), w_UR.Q())); //FR2
59
60 return { w_FL1, w_FL2, w_FR1, w_FR2 };
61 }
62 };
63}//End of namespace
Shallow-water (one-dimension) is a system of conservation laws. Conserved quantities (state variables...
Definition Sfx_StVenant1DEquations.h:36
float64 flux(const Sfx::StateVector &aState, const eFluxType aFluxT=eFluxType::incomplete) override final
convective flux function
Definition Sfx_StVenant1DEquations.cpp:10
HLLPhysicalFlux(Sfx::SCLEquation *aMthEq)
ctor
Definition dbpp_HLLPhysicalFlux.h:19
void setSclEquations(const Sfx::SCLEquation *aSclEq)
Set math equations.
Definition dbpp_HLLPhysicalFlux.h:29
cellFaceFlux calculFF(const Sfx::cellFaceVariables &aULR) const
Set math equations.
Definition dbpp_HLLPhysicalFlux.h:37
Sfx::SCLEquation * getSclEquations()
Return math equations.
Definition dbpp_HLLPhysicalFlux.h:24
Face flux variables at cell face (aggregate). Physical flux is used to compute the face flux ....
Definition dbpp_CellFaceFlux.h:12
Definition DamBreakProb.h:15