DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp_SweRhsData.hpp
Go to the documentation of this file.
1#pragma once
2
3// C++ include
4#include <valarray>
5// SfxBase19 lib include
6#include "include/Sfx_DefineTypes.h"
7
8namespace dbpp
9{
15 template<typename T=float64, typename CONT=std::valarray<T>>
16 struct SweRhsData
17 {
18 CONT m_FF1;
19 CONT m_FF2;
20 CONT m_S;
25 [[nodiscard]] bool empty() const noexcept
26 {
27 return m_FF1.size() == 0 && m_FF2.size() && m_S.size();
28 }
29
32 void resize() noexcept
33 {
34 m_FF1.resize(0); // clear
35 m_FF2.resize(0); // ditto
36 m_S.resize(0);
37 }
38 };
39
43 {
44 decltype(m_FF1) m_PF2;
48 void resize() noexcept
49 {
51 m_PF2.resize(0);
52 }
53
57 [[nodiscard]] bool empty() const noexcept
58 {
59 return SweRhsData::empty() && m_PF2.size() == 0;
60 }
61 };
62} // End of namespace
Definition DamBreakProb.h:15
Aggregate (must support operator[])
Definition dbpp_SweRhsData.hpp:17
CONT m_FF2
Definition dbpp_SweRhsData.hpp:19
bool empty() const noexcept
Check size of containers.
Definition dbpp_SweRhsData.hpp:25
void resize() noexcept
Reset size to zero.
Definition dbpp_SweRhsData.hpp:32
CONT m_S
Definition dbpp_SweRhsData.hpp:20
CONT m_FF1
Definition dbpp_SweRhsData.hpp:18
Inherited aggregate (extended), add pressure term data.
Definition dbpp_SweRhsData.hpp:43
void resize() noexcept
Reset size to zero.
Definition dbpp_SweRhsData.hpp:48
decltype(m_FF1) m_PF2
Definition dbpp_SweRhsData.hpp:44
bool empty() const noexcept
Check size to zero.
Definition dbpp_SweRhsData.hpp:57