-
Notifications
You must be signed in to change notification settings - Fork 2
/
AerofMessenger.h
51 lines (34 loc) · 1.37 KB
/
AerofMessenger.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
/************************************************************************
* Copyright © 2020 The Multiphysics Modeling and Computation (M2C) Lab
* <kevin.wgy@gmail.com> <kevinw3@vt.edu>
************************************************************************/
#ifndef _AEROF_MESSENGER_H_
#define _AEROF_MESSENGER_H_
#include<mpi.h>
#include<IoData.h>
#include<Vector3D.h>
/*************************************************************
* Class AerofMessenger is responsible for communicating with
* the AERO_F solver in an implementation of the overset grids
* method.
************************************************************/
class AerofMessenger {
IoData &iod;
MPI_Comm &m2c_comm; //!< This is the M2C communicator
MPI_Comm &joint_comm; //!< This is the joint communicator of M2C and AERO-F
int m2c_rank, m2c_size;
std::vector<double> temp_buffer;
public:
AerofMessenger(IoData &iod_, MPI_Comm &m2c_comm_, MPI_Comm &joint_comm_);
~AerofMessenger();
void Destroy();
//! Exchange data w/ AERO-F (called before the first time step)
void CommunicateBeforeTimeStepping();
//! Exchange data w/ AERO-F (called at the first time step)
void FirstExchange();
//! Exchange data w/ AERO-F (called at every time step except first and last)
void Exchange();
//! Exchange data w/ AERO-F (called at the last time step)
void FinalExchange();
};
#endif