-
Notifications
You must be signed in to change notification settings - Fork 0
/
Simulation.h
57 lines (45 loc) · 1.22 KB
/
Simulation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include "Parameters.h"
#include "FlowField.h"
#include "Solver.h"
#include "Scenario.h"
#include "CommunicationManager.h"
class Simulation
{
public:
Simulation(const Parameters& parameters, FlowField& flowField, CommunicationManager& communicationManager);
virtual ~Simulation();
virtual void UpdateU()=0;
virtual void UpdateV()=0;
void UpdateW();
virtual void UpdateEtta()=0;
void Updatem();
void UpdateM();
void UpdateDzI();
void UpdateDzJ();
void UpdateDzK();
void UpdateGI();
void UpdateGJ();
void UpdateGK();
void CalculateDelta();
virtual void CalculateZAZI()=0;
virtual void CalculateZAZJ()=0;
virtual void CalculateZAGI()=0;
virtual void CalculateZAGJ()=0;
void UpdateSimulationTimeStep();
void Run();
virtual void setMeasuredData()=0;
void printTimeMeasurements();
inline int map(const int& i, const int& j) const { return flowField_.map(i,j);}
inline int map(const int& i, const int& j, const int& k) const { return flowField_.map(i,j,k);}
protected:
const Parameters& parameters_;
FlowField& flowField_;
Scenario* scenario_;
CommunicationManager& communicationManager_;
FLOAT time_step;
FLOAT time=0.0;
//measurements
FLOAT T0_=0.0,T1_=0.0,T2_=0.0;
int it0_=0,it1_=0,it2_ =0;
};