mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 17:38:23 +01:00
add: Boundary.cpp, FTCS.cpp, Grid.cpp, Simulation.cpp | added implementations files, changed simulation.hpp
This commit is contained in:
parent
a6a704a176
commit
470ebbd2ab
@ -1,2 +1,78 @@
|
|||||||
|
#include "Boundary.hpp"
|
||||||
|
#include "Grid.hpp"
|
||||||
|
|
||||||
|
enum APPROACH {
|
||||||
|
FTCS,
|
||||||
|
BTCS
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CSV_OUTPUT {
|
||||||
|
CSV_OUTPUT_OFF,
|
||||||
|
CSV_OUTPUT_ON,
|
||||||
|
CSV_OUTPUT_VERBOSE
|
||||||
|
};
|
||||||
|
|
||||||
|
class Simulation {
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Simulation object
|
||||||
|
*
|
||||||
|
* @param grid
|
||||||
|
* @param bc
|
||||||
|
* @param aproach
|
||||||
|
*/
|
||||||
|
Simulation(Grid grid, Boundary bc, APPROACH aproach);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*
|
||||||
|
* @param csv_output
|
||||||
|
*/
|
||||||
|
void outputCSV(CSV_OUTPUT csv_output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the Timestep object
|
||||||
|
*
|
||||||
|
* @param timetstep
|
||||||
|
*/
|
||||||
|
void setTimestep(double timetstep);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the Timestep object
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void getTimestep();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the Iterations object
|
||||||
|
*
|
||||||
|
* @param iterations
|
||||||
|
*/
|
||||||
|
void setIterations(int iterations);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the Iterations object
|
||||||
|
*
|
||||||
|
* @return auto
|
||||||
|
*/
|
||||||
|
auto getIterations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*
|
||||||
|
* @return auto
|
||||||
|
*/
|
||||||
|
auto run();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
double timestep;
|
||||||
|
int iterations;
|
||||||
|
CSV_OUTPUT csv_output;
|
||||||
|
|
||||||
|
Grid grid;
|
||||||
|
Boundary bc;
|
||||||
|
APPROACH approach;
|
||||||
|
|
||||||
|
};
|
||||||
|
|||||||
0
src/Boundary.cpp
Normal file
0
src/Boundary.cpp
Normal file
0
src/FTCS.cpp
Normal file
0
src/FTCS.cpp
Normal file
0
src/Grid.cpp
Normal file
0
src/Grid.cpp
Normal file
0
src/Simulation.cpp
Normal file
0
src/Simulation.cpp
Normal file
Loading…
x
Reference in New Issue
Block a user