This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproto.h
44 lines (36 loc) · 2.12 KB
/
proto.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
#pragma once
#define ASSERT_ALLOC(cond) \
do { \
if (!(cond)) { \
printf("failed to allocate %g Mbyte on Task %d \n", bytes / (1024.0 * 1024.0), ThisTask); \
printf("Error in file: %s\tfunc: %s\tline: %d with expression `"#cond"'\n", __FILE__, __FUNCTION__, __LINE__); \
printf("bailing out.\n"); \
FatalError(1); \
} else { \
if(ThisTask == 0) \
printf("\nallocated %g Mbyte on Task %d\n", bytes / (1024.0 * 1024.0), ThisTask); \
} \
} while (0) \
#if 0
#define ASSERT_ALLOC(cond) { \
if(cond) \
{ \
if(ThisTask == 0) \
printf("\nallocated %g Mbyte on Task %d\n", bytes / (1024.0 * 1024.0), ThisTask); \
} \
else \
{ \
printf("failed to allocate %g Mbyte on Task %d\n", bytes / (1024.0 * 1024.0), ThisTask); \
printf("bailing out.\n"); \
FatalError(1); \
} \
}
#endif
void print_spec(void);
int FatalError(int errnum);
void displacement_fields(void);
void initialize_ffts(void);
void set_units(void);
void free_ffts(void);
double fnl(double x);
double periodic_wrap(double x);