DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp_RK2HLLScheme.h
Go to the documentation of this file.
1#pragma once
2
3// stl include
4#include <vector>
5// project includes
8
9namespace dbpp {
10 class PhysicalSystem;
11 class SweRhsAlgorithm;
12}
13
14namespace dbpp
15{
26 {
27 public:
31 Rk2HllScheme( /*SweRhsAlgorithm const std::shared_ptr<ListSectFlow>& aListSectShrd*/); //something like this!!
36 Rk2HllScheme(dbpp::PhysicalSystem* aPhysys/*, dbpp::SweRhsAlgorithm* aSweRhsAlgo*/);
41
42 // Validating EMcNeilPhysicalAlgorithm (need to be refactored!!!)
43 // Design Note (next version)
44 // Main purpose of this method its let user implement its own algorithm
45 // similar to EMcNeilAlgorithm::calculate() and not to set pointer
46 // setting pointer is dangereous (who responsible ot delete the pointer?)
47 // result od dangling pointer. In this case pas the algorithm in ctor
48 // Also, maybe pass a unique_ptr<SweRhsAlgorithm> as argument
49 // could provide another service witn no argument pass to method
50 // void setSweRhsAlgorithm() this method let user implement the algo
51 void setSweRhsAlgorithm( SweRhsAlgorithm* aRhsAlgo) override
52 {
53 // Design Note
54 // NO!! see SemiDiscreteMethod note. this is wrong
55 m_rhsAlgo = aRhsAlgo;
56 }
57
61 SweRhsAlgorithm* getSweRhsAlgorithm() const override final
62 {
63 return m_rhsAlgo;
64 }
65
70 {
71 return m_rhsAlgo;
72 }
73
77 void setSourceTerm( dbpp::SrcNumericalTreatment* aSrcTreatment) override final {}
81 void setFaceFluxAlgorithm(/*FluxAlgorithm*/) override final {}
82 // void setApproximateRiemannSolver( emcil::ApprRiemannSolver* ARprob) override final {}
83 /*
84 * @brief update nodal values
85 * @return global nodal values
86 */
87 Uh updatedValues() override final;
88
89 protected:
95 void advance(/*dbpp::PhysicalSystem* aPhysys,*/
96 const std::shared_ptr<dbpp::FiniteVolumeDiscretization>& aGblDiscr, const double aDt) override final;
97
101 //void setPhysicalBoundaryCnd( const PhysicalBoundaryCnd& aPhyBCond)
102 //{
103 // m_phyBC = aBCond.getBCpair();
104 //}
105
106 private:
117 FluxTensorMap computeFaceFlux( const dbpp::Omega& aOmega,
118 const std::vector<float64>& aVecA, const std::vector<float64>& aVecQ);
126 FluxTensorMap computeFaceFlux( const dbpp::Omega& aOmega,
127 std::vector<float64>&& aVecA, std::vector<float64>&& aVecQ);
128 };
129} // End of namespace
global discretized domain is defined as a set of all nodes and all elements. PHYSICAL ENTITIES includ...
Definition dbpp_FiniteVolumeDiscretization.h:26
Abstract base class for Godunov-type scheme (Model of). This is a model of an explicit scheme U_i = U...
Definition dbpp_GodunovTypeScheme.h:30
Belongs two-step integrator Runge-Kutta family.
Definition dbpp_NujicIntegrator.h:24
Global Domain (part of global discretization) list of elements and geomeric nodes used by numerical m...
Definition dbpp_Omega.h:19
Physical system made of physical objects under study and described by the state variables....
Definition dbpp_PhysicalSystem.h:32
Uh updatedValues() override final
update nodal values
Definition dbpp_RK2HLLScheme.cpp:68
dbpp::SweRhsAlgorithm * m_rhsAlgo
Definition dbpp_RK2HLLScheme.h:109
dbpp::PhysicalSystem * m_physys
Definition dbpp_RK2HLLScheme.h:108
void setSourceTerm(dbpp::SrcNumericalTreatment *aSrcTreatment) override final
Set source term discretization.
Definition dbpp_RK2HLLScheme.h:77
~Rk2HllScheme()
destructor
Definition dbpp_RK2HLLScheme.cpp:61
NujicIntegrator m_twoStepsIntegrator
Physical boundary condition (deprecated)
Definition dbpp_RK2HLLScheme.h:107
void advance(const std::shared_ptr< dbpp::FiniteVolumeDiscretization > &aGblDiscr, const double aDt) override final
time stepping algorithm
Definition dbpp_RK2HLLScheme.cpp:118
Rk2HllScheme()
default ctor
Definition dbpp_RK2HLLScheme.cpp:30
SweRhsAlgorithm * getSweRhsAlgorithm() const override final
Right-hand-side disretization algorithm in use.
Definition dbpp_RK2HLLScheme.h:61
SweRhsAlgorithm * getSweRhsAlgorithm() override final
Right-hand-side disretization algorithm in use.
Definition dbpp_RK2HLLScheme.h:69
FluxTensorMap computeFaceFlux(const dbpp::Omega &aOmega, const std::vector< float64 > &aVecA, const std::vector< float64 > &aVecQ)
Compute numerical face flux.
Definition dbpp_RK2HLLScheme.cpp:239
void setFaceFluxAlgorithm() override final
Set numerical flux algorithm.
Definition dbpp_RK2HLLScheme.h:81
void setSweRhsAlgorithm(SweRhsAlgorithm *aRhsAlgo) override
Set.
Definition dbpp_RK2HLLScheme.h:51
Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read...
Definition dbpp_SrcNumericalTreatment.h:31
Abstract class. "Model" of the right-hand-side terms discretization. Hold discretization scheme or al...
Definition dbpp_SweRhsAlgorithm.h:28
Container of nodal variables.
Definition dbpp_Uh.h:21
Definition DamBreakProb.h:15
double float64
Definition dbpp_LDeltaOperator.h:12
Map cell face and flux values.
Definition dbpp_FluxTensor.h:52