-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefines.c
More file actions
20 lines (17 loc) · 697 Bytes
/
defines.c
File metadata and controls
20 lines (17 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "defines.h"
int DIM = 512; // Square size of solver domain
int DS = (DIM*DIM); // Total domain size
int CPADW = (DIM/2+1); // Padded width for real->complex in-place FFT
int RPADW = (2*(DIM/2+1)); // Padded width for real->complex in-place FFT
int PDS = (DIM*CPADW); // Padded total domain size
float DT = 0.09f; // Delta T for interative solver
float VIS = 0.0025f; // Viscosity constant
float FORCE = (5.8f*DIM); // Force scale factor
int FR = 4; // Force update radius
void updateVariables() {
DS = (DIM*DIM);
CPADW = (DIM/2+1);
RPADW = (2*(DIM/2+1));
PDS = (DIM*CPADW);
FORCE = (5.8f*DIM);
}