Tsunami Project Lab
Loading...
Searching...
No Matches
WavePropagation.h
Go to the documentation of this file.
1
7#ifndef TSUNAMI_LAB_PATCHES_WAVE_PROPAGATION
8#define TSUNAMI_LAB_PATCHES_WAVE_PROPAGATION
9
10#include "../constants.h"
11#include "../solvers/Solver.h"
12#include <type_traits>
13
14namespace tsunami_lab {
15 namespace patches {
16 template <class T>
17 class WavePropagation;
18 }
19}
20
21template <class T>
23 protected: T solver;
24 public:
25
27 static_assert(std::is_base_of<solvers::Solver, T>::value, "T not derived from Solver");
28
29 solver = T();
30 }
31
35 virtual ~WavePropagation(){}
36
42 virtual void timeStep( t_real i_scaling ) = 0;
43
47 virtual void setGhostOutflow() = 0;
48
54 virtual t_idx getStride() = 0;
55
61 virtual t_real const * getHeight() = 0;
62
68 virtual t_real const * getMomentumX() = 0;
69
75 virtual t_real const * getMomentumY() = 0;
76
84 virtual void setHeight( t_idx i_ix,
85 t_idx i_iy,
86 t_real i_h ) = 0;
87
95 virtual void setMomentumX( t_idx i_ix,
96 t_idx i_iy,
97 t_real i_hu ) = 0;
98
106 virtual void setMomentumY( t_idx i_ix,
107 t_idx i_iy,
108 t_real i_hv ) = 0;
109};
110
111#endif
Definition WavePropagation.h:22
T solver
Definition WavePropagation.h:23
virtual t_real const * getHeight()=0
WavePropagation()
Definition WavePropagation.h:26
virtual void setMomentumY(t_idx i_ix, t_idx i_iy, t_real i_hv)=0
virtual void setMomentumX(t_idx i_ix, t_idx i_iy, t_real i_hu)=0
virtual ~WavePropagation()
Definition WavePropagation.h:35
virtual void setHeight(t_idx i_ix, t_idx i_iy, t_real i_h)=0
virtual void timeStep(t_real i_scaling)=0
virtual t_real const * getMomentumX()=0
virtual t_real const * getMomentumY()=0
Definition constants.h:12
float t_real
floating point type
Definition constants.h:17
std::size_t t_idx
integral type for cell-ids, pointer arithmetic, etc.
Definition constants.h:14