-
Notifications
You must be signed in to change notification settings - Fork 0
/
SIRC.h
74 lines (59 loc) · 2.53 KB
/
SIRC.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
58
59
60
61
62
63
64
65
66
67
68
69
70
//----------------------------------------------------------------------------------||
//------------------- SIRC.h -------------------||
//----------------------------------------------------------------------------------||
// ____ ___ ____ ____ ||
// / ___|_ _| _ \ / ___| ||
// \___ \| || |_) | | ||
// ___) | || _ <| |___ ||
// |____/___|_| \_\\____| ||
// ||
//----------------------------------------------------------------------------------||
//-- (S)imple (I)ncoherent (R)adiation (C)alculation -||
//----------------------------------------------------------------------------------||
//---Author----------- : Tianhong Wang --------------------||
//---Starting--------- : Feb-16-2022 --------------------||
//---Email------------ : tw474@cornell.edu --------------------||
//---Group------------ : Dr. Gennady Shvets' Group --------------------||
//---Copyright-------- : (C) 2022 by Tianhong Wang --------------------||
//----------------------------------------------------------------------------------||
//----------------------------------------------------------------------------------||
#pragma once
#define FILENAME "Traj"
#define dcom std::complex<double>
#define ULONG unsigned long
enum class Node
{
Start,
End
};
#include <mpi.h>
#include <complex>
#include <cmath>
#include <chrono>
#include <ctime>
#include <iomanip>
#include <string>
#include <list>
#include <array>
#include <assert.h>
#include "struct.h"
#include "namelist.h"
#include "domain.h"
#include "particle.h"
#include "pixel.h"
#include "detector.h"
namespace Constant
{
const dcom i(0.0,1.0);
const double PI = 3.14159265358979323846;
}
namespace GlobalVars
{
extern int Rank;
extern FILE *LogFile;
}
void Log0(bool all, const char * fmt,...);
void LogDebug(const char * fmt,...);
#define Log(fmt, ...) Log0(false,fmt,##__VA_ARGS__) //rank 0 console output
#define ALog(fmt, ...) Log0(true,fmt,##__VA_ARGS__) //all ranks console output
#define DLog(fmt, ...) LogDebug(fmt,##__VA_ARGS__) //all ranks file output