10#include "include/Sfx_StateVector.h"
11#include "include/Sfx_DefineTypes.h"
12#include "include/Sfx_UniversalConstants.h"
14#include "Sfx/Sfx_scalarField1D.h"
28 class cellFaceVariables;
48 using valr64 = std::valarray<float64>;
50 using pairf12 = std::pair<std::valarray<float64>, std::valarray<float64>>;
76 calculFF(
const Sfx::scalarField1D& U1,
const Sfx::scalarField1D& U2,
86 const cellFace& aCellFace)
override final
98 calculFF(
const Sfx::scalarField1D& aU1,
const Sfx::scalarField1D& aU2,
102 auto w_phySys = aPhysbc.getPhysicalSystem();
103 std::valarray<float64> w_H(aPhysbc.getPhysicalSystem()->size());
106 for(
const auto& w_sectFlowH :
107 w_phySys->getSectionList().getSectionsWaterLevel() | std::views::values)
109 w_H[i++] = w_sectFlowH;
112 auto [Aleftbc, Qleftbc, Hleftbc] = aPhysbc.getLeftEnd();
113 auto [Arightbc, Qrightbc, Hrightbc] = aPhysbc.getRightEnd();
116 std::valarray<float64> w_Arrp1(aU1.asStdVector().data(),aU1.values().size() + 1);
117 std::valarray<float64> w_Qrrp1(aU2.asStdVector().data(),aU1.values().size() + 1);
120 w_Arrp1[aU1.grid().getBaseI()] = Aleftbc;
121 w_Qrrp1[aU1.grid().getBaseI()] = Qleftbc;
123 w_Arrp1[aU1.grid().getMaxI()] = Arightbc;
124 w_Qrrp1[aU1.grid().getMaxI()] = Qrightbc;
127 return calculFF( std::move(w_Arrp1),std::move(w_Qrrp1),std::move(w_H));
135 bool useReconstr() const noexcept override final {
return false; }
161 std::valarray<float64>&& aH);
181 std::span<float64, Sfx::DIM::value>&& adRng);
189 std::span<float64, Sfx::DIM::value>&& adRng);
Shallow-water (one-dimension) is a system of conservation laws. Conserved quantities (state variables...
Definition Sfx_StVenant1DEquations.h:36
Abstract base class for numerical flux algorithm.
Definition dbpp_FluxAlgorithm.h:24
FluxTensorMap calculFF(const Sfx::scalarField1D &aU1, const Sfx::scalarField1D &aU2, const PhysicalBoundaryCnd &aPhysbc) override final
compute numerical flux
Definition dbpp_NujicFluxAlgorithm.h:98
float64 m_algoPrm
Definition dbpp_NujicFluxAlgorithm.h:194
FluxTensor calculFF(const Sfx::StateVector &aUL, const Sfx::StateVector &aUR, const cellFace &aCellFace) override final
Numerical flux algorithm.
Definition dbpp_NujicFluxAlgorithm.h:85
NujicFluxAlgorithm(const dbpp::ePhysicalFluxType aFluxType, float64 aAlgoNujicPrm)
ctor from physical flux and constant
Definition dbpp_NujicFluxAlgorithm.h:57
valr64 computef12m(std::span< float64, Sfx::DIM::value > &&aRng, std::span< float64, Sfx::DIM::value > &&adRng)
negative component of physical flux
Definition dbpp_NujicFluxAlgorithm.cpp:360
FluxTensor calculFF(const Sfx::cellFaceVariables &aFaceVariables) override final
numerical flux at cell face
Definition dbpp_NujicFluxAlgorithm.cpp:19
bool usePhysicalCompleteFlux() const noexcept override final
(hydrostatic term is considered)
Definition dbpp_NujicFluxAlgorithm.h:140
eReconstrType m_reconstype
Definition dbpp_NujicFluxAlgorithm.h:192
ePhysicalFluxType m_fluxType
Definition dbpp_NujicFluxAlgorithm.h:191
float64 m_Alpha
Definition dbpp_NujicFluxAlgorithm.h:193
bool useReconstr() const noexcept override final
use variable reconstruction
Definition dbpp_NujicFluxAlgorithm.h:135
void setReconstrType(eReconstrType aRecnstrType) noexcept override final
Set type of extrapolation.
Definition dbpp_NujicFluxAlgorithm.h:145
void setNujicAlgoPrm(float64 aNujicAlgoPrm)
Definition dbpp_NujicFluxAlgorithm.h:166
std::valarray< float64 > valr64
Definition dbpp_NujicFluxAlgorithm.h:48
std::tuple< valr64, valr64, valr64, valr64 > computePhysicalFlux(std::valarray< float64 > &&aU1, std::valarray< float64 > &&aU2, std::valarray< float64 > &&aH)
compute face numerical flux
Definition dbpp_NujicFluxAlgorithm.cpp:114
eReconstrType getReconstrType() const noexcept override final
Getter.
Definition dbpp_NujicFluxAlgorithm.h:150
valr64 computef12p(std::span< float64, Sfx::DIM::value > &&aRng, std::span< float64, Sfx::DIM::value > &&adRng)
positive component of physical flux
Definition dbpp_NujicFluxAlgorithm.cpp:337
std::pair< std::valarray< float64 >, std::valarray< float64 > > pairf12
Definition dbpp_NujicFluxAlgorithm.h:50
std::vector< float64 > m_Hvec
Definition dbpp_NujicFluxAlgorithm.h:195
Global Domain (part of global discretization) list of elements and geomeric nodes used by numerical m...
Definition dbpp_Omega.h:19
Physical boundary condition (computational domain) based on characteristic equation ....
Definition dbpp_PhysicalBoundaryCnd.h:22
Container of nodal variables.
Definition dbpp_Uh.h:21
Cell face in the finite volume discretization Usage: caculFF(const cellFace& aFace) compute the numer...
Definition dbpp_CellFace.h:29
Definition DamBreakProb.h:15
double float64
Definition dbpp_LDeltaOperator.h:12
ePhysicalFluxType
Definition dbpp_Enumerations.h:9
NujicFluxAlgorithm::valr64 valr64
Definition dbpp_NujicFluxAlgorithm.cpp:17
eReconstrType
Definition dbpp_Enumerations.h:33
Flux tensor field (aggregate initialization).
Definition dbpp_FluxTensor.h:21
Map cell face and flux values.
Definition dbpp_FluxTensor.h:52