blob: 0bc65c6c50bb23367f9054e22c476ee9941fcbb1 (
plain)
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
|
#include <cctk.h>
#include <cctk_Arguments.h>
#include <cctk_Parameters.h>
#include <loopcontrol.h>
#include "bits.h"
void
MaskBase_InitMask (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
/* Initialise the weight to 1 everywhere */
if (verbose) {
int const reflevel = GetRefinementLevel(cctkGH);
CCTK_VInfo (CCTK_THORNSTRING,
"Initialising weight to 1 on level %d", reflevel);
}
unsigned const bits = BMSK(cctk_dim);
unsigned const allbits = BMSK(bits) - 1;
#pragma omp parallel
CCTK_LOOP3_ALL(MaskBase_InitMask, cctkGH, i,j,k) {
int const ind = CCTK_GFINDEX3D (cctkGH, i, j, k);
iweight[ind] = allbits;
} CCTK_ENDLOOP3_ALL(MaskBase_InitMask);
}
|