Page MenuHomec4science

simulation.h
No OneTemporary

File Metadata

Created
Sat, Nov 9, 02:39

simulation.h

//
// 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