7#include "include/Sfx_UniversalConstants.h"
8#include "include/Sfx_StateVariables.h"
9#include "include/Sfx_Observable.h"
15#include "Sfx/Sfx_StateVectorField.h"
46 using pairStateVar = std::pair<Sfx::StateVariables, Sfx::StateVariables>;
61 template<
typename... Params>
64 std::tuple<unsigned, Params...>
values;
131 void update(
const Sfx::StateVectorField& aStateVector);
137 void update(
const std::valarray<float64>& aVarr1,
138 const std::valarray<float64>& aVarr2);
144 void update( std::valarray<float64>&& aVarr1,
145 std::valarray<float64>&& aVarr2);
212 auto&& w_xcoordBeg = w_ic.
Xcoord().begin();
215 static_assert(!std::is_same_v<
decltype(w_xcoordBeg),std::ranges::dangling>);
216 static_assert(std::is_same_v<
decltype(w_xcoordBeg),std::vector<float64>::iterator&&>);
217 static_assert(std::is_same_v<
decltype((w_xcoordBeg)), std::vector<float64>::iterator&>);
218 for(
auto w_sectH : w_ic.
Hvalues())
233 void attach(Sfx::Observer* aObserver)
override final;
238 void detach(Sfx::Observer* aObserver)
override final;
242 void notify() override final;
dbpp::NodalTpl< unsigned, float64, float64, float64 > PhyBCNdlConstraint
Physics computational domain (phenomena take place: half-open as default)
Definition SimulationConfig.h:39
Hold data for validation. Two type: EMcneil, Hudson (DamBreak config)
Definition Sfx_DamBreakData.h:17
int32 nbSections() const noexcept
Definition Sfx_DamBreakData.h:85
Sole responsibility is to provide wave profile at initial start up based on DamBreakData.
Definition Sfx_DamBreakInitialCnd.h:16
std::vector< float64 > Hvalues() const
water level values
Definition Sfx_DamBreakInitialCnd.h:130
std::vector< float64 > Xcoord() const noexcept
x-coordinate
Definition Sfx_DamBreakInitialCnd.h:110
List of cross-section flow (itereable)
Definition dbpp_ListSectionsFlow.h:15
std::vector< SectionFlow >::size_type vec_sizetype
Aliases.
Definition dbpp_ListSectionsFlow.h:20
void reserve(vec_sizetype aSize)
Definition dbpp_ListSectionsFlow.h:116
void push_back(const SectionFlow &aSectF)
Definition dbpp_ListSectionsFlow.h:45
virtual void add(const SectionFlow &aSectFlow2Add)
adding a section
Definition dbpp_PhysicalSystem.cpp:34
std::shared_ptr< ListSectionsFlow > m_listSections
Definition dbpp_PhysicalSystem.h:245
ListSectionsFlow::vec_sizetype size() const noexcept
number of physical objects
Definition dbpp_PhysicalSystem.h:120
Sfx::StateVectorField::StateVector StateVectorPair
alias template state variables vector
Definition dbpp_PhysicalSystem.h:56
bool empty() const noexcept
check emptyness
Definition dbpp_PhysicalSystem.h:115
bool useFlatEarth() const noexcept
falt bed bathymetry
Definition dbpp_PhysicalSystem.h:192
SectionStateVar m_stateVarMap
Definition dbpp_PhysicalSystem.h:246
std::list< Sfx::Observer * > m_listOfObserver
Definition dbpp_PhysicalSystem.h:253
void setLeftPhysicalBnd(std::tuple< uint32, float64, float64, float64 > aLeftPhyBnd)
physical boundry left far end of global domain
Definition dbpp_PhysicalSystem.h:166
std::shared_ptr< ListSectionsFlow > getListSectionsPtr() const
list of sections
Definition dbpp_PhysicalSystem.h:108
void detach(Sfx::Observer *aObserver) override final
Remove observer from the ist.
Definition dbpp_PhysicalSystem.cpp:177
void PhysicalSystemBndType() const noexcept
type of physical boundary
Definition dbpp_PhysicalSystem.h:196
std::map< unsigned int, pairStateVar > SectionStateVar
alias template map state variables
Definition dbpp_PhysicalSystem.h:51
int32 m_nbSectionsFlow
Definition dbpp_PhysicalSystem.h:244
bool useUnitWidthGeom() const noexcept
section geometry type
Definition dbpp_PhysicalSystem.h:187
static ListSectionsFlow createSectionFlow(const Sfx::DamBreakData &aDbdata)
Create list of section flow.
Definition dbpp_PhysicalSystem.h:202
SectionStateVar & getStateVariables() noexcept
System state variables.
Definition dbpp_PhysicalSystem.h:87
PhyBCNdlConstraint getRightPhysicalBnd() const noexcept
Physical boundary.
Definition dbpp_PhysicalSystem.h:158
const ListSectionsFlow & getSectionList() const noexcept
Definition dbpp_PhysicalSystem.h:94
PhysicalSystem()
Default ctor.
Definition dbpp_PhysicalSystem.cpp:19
PhyBCNdlConstraint m_bcNodeDownstream
Definition dbpp_PhysicalSystem.h:252
PhyBCNdlConstraint m_bcNodeUpstream
Definition dbpp_PhysicalSystem.h:251
ListSectionsFlow & getSectionList() noexcept
Definition dbpp_PhysicalSystem.h:95
ePhysicalSystemType
Definition dbpp_PhysicalSystem.h:37
@ close
Definition dbpp_PhysicalSystem.h:39
@ halfOpen
Definition dbpp_PhysicalSystem.h:38
bool isSystemFictionLess() const noexcept
friction is used
Definition dbpp_PhysicalSystem.h:182
void setRightPhysicalBnd(std::tuple< uint32, float64, float64, float64 > aRightPhyBnd)
physical boundary at far end global domain
Definition dbpp_PhysicalSystem.h:150
PhyBCNdlConstraint getLeftPhysicalBnd() const noexcept
physical boundry left far end of global domain
Definition dbpp_PhysicalSystem.h:174
SectionStateVar getStateVariables() const noexcept
Definition dbpp_PhysicalSystem.h:82
std::shared_ptr< ListSectionsFlow > & getListSectionsPtr()
list of sections
Definition dbpp_PhysicalSystem.h:100
void notify() override final
notify all observers (call update())
Definition dbpp_PhysicalSystem.cpp:176
void attach(Sfx::Observer *aObserver) override final
attach the observer
Definition dbpp_PhysicalSystem.cpp:175
void update(const Sfx::StateVectorField &aStateVector)
update all sections flow and state variables
Definition dbpp_PhysicalSystem.cpp:186
std::pair< Sfx::StateVariables, Sfx::StateVariables > pairStateVar
alias template state variables
Definition dbpp_PhysicalSystem.h:46
Sfx::StateVectorField getStateVector() const
physical system state vector (scalar field)
Definition dbpp_PhysicalSystem.cpp:80
Cross-sectional flow (2-dimensional).
Definition dbpp_SectionFlow.h:16
Definition DamBreakProb.h:15
Type to repesent the nodal constraint.
Definition dbpp_PhysicalSystem.h:63
std::tuple< unsigned, Params... > values
Definition dbpp_PhysicalSystem.h:64