Tsunami Project Lab
Loading...
Searching...
No Matches
CheckPoint.h
Go to the documentation of this file.
1
18#ifndef TSUNAMI_LAB_SETUPS_CHECKPOINT_H
19#define TSUNAMI_LAB_SETUPS_CHECKPOINT_H
20
21#include "../io/NetCdf.h"
22#include "Setup.h"
23#include <string>
24
25namespace tsunami_lab {
26 namespace setups {
27 class CheckPoint;
28 }
29}
30
32 private:
35
36 public:
42 CheckPoint( std::string i_path );
43
47 t_real getHeight( t_real i_x, t_real i_y ) const;
48
52 t_real getMomentumX( t_real i_x, t_real i_y ) const;
53
57 t_real getMomentumY( t_real i_x, t_real i_y ) const;
58
62 t_real getBathymetry( t_real i_x, t_real i_y ) const;
63
65 t_real simTime() const { return m_cp.simTime; }
67 t_idx timeStep() const { return m_cp.timeStep; }
69 t_real dt() const { return m_cp.dt; }
70
72 t_idx nx() const { return m_cp.nx(); }
74 t_idx ny() const { return m_cp.ny(); }
76 t_real dxy() const { return m_cp.dxy(); }
77
79 t_real domainLengthX() const { return m_cp.nx() * m_cp.dxy(); }
81 t_real domainLengthY() const { return m_cp.ny() * m_cp.dxy(); }
82};
83
84#endif
Definition CheckPoint.h:31
t_real getMomentumX(t_real i_x, t_real i_y) const
Definition CheckPoint.cpp:19
CheckPoint(std::string i_path)
Definition CheckPoint.cpp:9
t_real getMomentumY(t_real i_x, t_real i_y) const
Definition CheckPoint.cpp:24
t_real getBathymetry(t_real i_x, t_real i_y) const
Definition CheckPoint.cpp:29
t_idx ny() const
number of interior cells in y-direction
Definition CheckPoint.h:74
t_real domainLengthX() const
domain length in x-direction (nx * dxy)
Definition CheckPoint.h:79
t_real getHeight(t_real i_x, t_real i_y) const
Definition CheckPoint.cpp:14
t_real dxy() const
uniform cell size recovered from the checkpoint (m)
Definition CheckPoint.h:76
t_idx timeStep() const
time-step counter stored in the checkpoint
Definition CheckPoint.h:67
t_real simTime() const
simulation time stored in the checkpoint (seconds)
Definition CheckPoint.h:65
t_real domainLengthY() const
domain length in y-direction (ny * dxy)
Definition CheckPoint.h:81
t_real dt() const
constant time step of the interrupted run (seconds)
Definition CheckPoint.h:69
t_idx nx() const
number of interior cells in x-direction
Definition CheckPoint.h:72
Definition Setup.h:21
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
t_real dxy() const
cell size (m)
Definition NetCdf.h:273
t_idx timeStep
time-step counter of the checkpoint
Definition NetCdf.h:268
t_idx nx() const
interior cells in x
Definition NetCdf.h:271
t_idx ny() const
interior cells in y
Definition NetCdf.h:272
t_real simTime
simulation time of the checkpoint (s)
Definition NetCdf.h:267
t_real dt
constant time step of the run (s)
Definition NetCdf.h:269