Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80233334
simulation.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 30, 14:45
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Sep 1, 14:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20328027
Attached To
rTSUNAMIPROJECT PHPC-TSUNAMI-PROJECT
simulation.h
View Options
//
// Created by Arnaud Pannatier on 06.05.18.
// Based on the code of :
// - Nicolas Richart <nicolas.richart@epfl.ch>
// - Vincent Keller <vincent.keller@epfl.ch>
// - Vittoria Rezzonico <vittoria.rezzonico@epfl.ch>
// See the files AUTHORS and COPYRIGHT for the concerning information
//
#ifndef PHPCTSUNAMIPROJECT_SIMULATION_H
#define PHPCTSUNAMIPROJECT_SIMULATION_H
#include <tuple>
#include <string>
#include "double_buffer.h"
#include "grid.h"
class
Simulation
{
public:
Simulation
(
std
::
size_t
NX_
,
double
G_
,
int
SIZE_
,
double
TEND_
,
double
DX_
,
std
::
string
dir_
);
void
readInitialConditionsFromFile
();
void
writeResultsToFile
();
/// perform the simulation
std
::
tuple
<
double
,
int
>
compute
();
inline
std
::
size_t
m
(){
return
NX
;
};
inline
std
::
size_t
n
(){
return
NY
;
};
protected:
/// compute one step and return an error
void
compute_step
();
void
compute_mu_and_set_dt
();
private:
/// Global problem size
std
::
size_t
NX
,
NY
;
std
::
string
dir
;
double
G
,
TEND
,
DX
,
dt
,
T
,
nt
;
int
SIZE
;
DoubleBuffer
H
,
HV
,
HU
;
Grid
Zdx
,
Zdy
;
};
#endif
//PHPCTSUNAMIPROJECT_SIMULATION_H
Event Timeline
Log In to Comment