Tsunami Project Lab
Loading...
Searching...
No Matches
TsunamiEvent2d.h
Go to the documentation of this file.
1
34#ifndef TSUNAMI_LAB_SETUPS_TSUNAMI_EVENT_2D_H
35#define TSUNAMI_LAB_SETUPS_TSUNAMI_EVENT_2D_H
36
37#include "../io/NetCdf.h"
38#include "Setup.h"
39#include <string>
40
41namespace tsunami_lab {
42 namespace setups {
43 class TsunamiEvent2d;
44 }
45}
46
48 private:
50 static constexpr t_real DELTA = 20;
51
53 io::NetCdf::Grid m_bathy;
54
56 io::NetCdf::Grid m_displ;
57
60 t_real m_offsetX = 0;
61 t_real m_offsetY = 0;
62
68 t_real displacement( t_real i_xFile, t_real i_yFile ) const;
69
70 public:
79 TsunamiEvent2d( std::string i_bathyPath,
80 std::string i_displPath );
81
85 t_real getHeight( t_real i_x, t_real i_y ) const;
86
91
96
101 t_real getBathymetry( t_real i_x, t_real i_y ) const;
102
109 return m_bathy.x.empty() ? 0 : (m_bathy.x.back() - m_bathy.x.front());
110 }
111
116 return m_bathy.y.empty() ? 0 : (m_bathy.y.back() - m_bathy.y.front());
117 }
118};
119
120#endif
Definition Setup.h:21
Definition TsunamiEvent2d.h:47
t_real getMomentumY(t_real, t_real) const
Definition TsunamiEvent2d.cpp:48
t_real getHeight(t_real i_x, t_real i_y) const
Definition TsunamiEvent2d.cpp:32
t_real domainLengthX() const
Definition TsunamiEvent2d.h:108
t_real domainLengthY() const
Definition TsunamiEvent2d.h:115
t_real getMomentumX(t_real, t_real) const
Definition TsunamiEvent2d.cpp:43
t_real getBathymetry(t_real i_x, t_real i_y) const
Definition TsunamiEvent2d.cpp:53
TsunamiEvent2d(std::string i_bathyPath, std::string i_displPath)
Definition TsunamiEvent2d.cpp:12
Definition constants.h:12
float t_real
floating point type
Definition constants.h:17
Definition NetCdf.h:184
std::vector< t_real > x
monotonically ascending x (size nx)
Definition NetCdf.h:187
std::vector< t_real > y
monotonically ascending y (size ny)
Definition NetCdf.h:188