diff --git a/example.conf b/example.conf
index 8c72613..76f3a1d 100644
--- a/example.conf
+++ b/example.conf
@@ -20,7 +20,11 @@ DoFixing = no # do mode fixing à la Angulo&Pontzen (https://arxiv.o
DoInversion = no # invert phases (for paired simulations)
ParticleLoad = sc # particle load, can be 'sc' (1x), 'bcc' (2x) or 'fcc' (4x)
- # (increases number of particles by given factor!), or 'glass'
+ # (increases number of particles by given factor!),
+ # or 'glass' or 'masked'
+
+## if `ParticleLoad = masked' then you can specify here how masking should take place
+# ParticleMaskType = 3 # bit mask for particle mask (0=center,1=center+edges,2=center+faces,3=center+edges+faces)
## if `ParticleLoad = glass' then specify here where to load the glass distribution from
# GlassFileName = glass128.hdf5
diff --git a/external/panphasia_ho/uniform_rand_threefry4x64.c b/external/panphasia_ho/uniform_rand_threefry4x64.c
index 2dcf8dc..683ba85 100644
--- a/external/panphasia_ho/uniform_rand_threefry4x64.c
+++ b/external/panphasia_ho/uniform_rand_threefry4x64.c
@@ -100,8 +100,8 @@ void threefry4x64_test_(int verbose)
if ((rand.v[0] != result.v[0]) || (rand.v[1] != result.v[1]) || (rand.v[2] != result.v[2]) || (rand.v[3] != result.v[3]))
{
printf("Serious error occured !!!!!!!!!! Random generator is not working correctly \n");
- printf("Random generated: %lu %lu %lu %lu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
- printf("Random expected: %lu %lu %lu %lu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
+ printf("Random generated: %llu %llu %llu %llu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
+ printf("Random expected: %llu %llu %llu %llu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
//abort();
}
else
@@ -121,8 +121,8 @@ void threefry4x64_test_(int verbose)
if ((rand.v[0] != result.v[0]) || (rand.v[1] != result.v[1]) || (rand.v[2] != result.v[2]) || (rand.v[3] != result.v[3]))
{
printf("Serious error occured !!!!!!!!!! Random generator is not working correctly \n");
- printf("Random generated: %lu %lu %lu %lu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
- printf("Random expected: %lu %lu %lu %lu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
+ printf("Random generated: %llu %llu %llu %llu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
+ printf("Random expected: %llu %llu %llu %llu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
//abort();
}
else
@@ -143,8 +143,8 @@ void threefry4x64_test_(int verbose)
if ((rand.v[0] != result.v[0]) || (rand.v[1] != result.v[1]) || (rand.v[2] != result.v[2]) || (rand.v[3] != result.v[3]))
{
printf("Serious error occured !!!!!!!!!! Random generator is not working correctly \n");
- printf("Random generated: %lu %lu %lu %lu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
- printf("Random expected: %lu %lu %lu %lu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
+ printf("Random generated: %llu %llu %llu %llu\n", rand.v[0], rand.v[1], rand.v[2], rand.v[3]);
+ printf("Random expected: %llu %llu %llu %llu\n", result.v[0], result.v[1], result.v[2], result.v[3]);
//abort();
}
else
@@ -176,7 +176,7 @@ void set_panphasia_key_(int verbose)
verbose = 0; //ARJ
if (verbose)
- printf("Setting the threefry4x64 key to\n(%0lu %0lu %0lu %0lu)\n\n",
+ printf("Setting the threefry4x64 key to\n(%0llu %0llu %0llu %0llu)\n\n",
panphasia_key.v[0], panphasia_key.v[1], panphasia_key.v[2], panphasia_key.v[3]);
panphasia_key_initialised = 999;
@@ -237,10 +237,10 @@ void check_panphasia_key_(int verbose)
if (panphasia_check_key.v[0] != panphasia_key.v[0] || panphasia_check_key.v[1] != panphasia_key.v[1] || panphasia_check_key.v[2] != panphasia_key.v[2] || panphasia_check_key.v[2] != panphasia_key.v[2])
{
printf("A serious error has happened - the threefry4x64 key has become corrupted!\n");
- printf("Should be: (%0lu %0lu %0lu %0lu)\n", panphasia_check_key.v[0],
+ printf("Should be: (%0llu %0llu %0llu %0llu)\n", panphasia_check_key.v[0],
panphasia_check_key.v[1], panphasia_check_key.v[2], panphasia_check_key.v[3]);
- printf("But now is: (%0lu %0lu %0lu %0lu)\n", panphasia_key.v[0],
+ printf("But now is: (%0llu %0llu %0llu %0llu)\n", panphasia_key.v[0],
panphasia_key.v[1], panphasia_key.v[2], panphasia_key.v[3]);
printf("The fact that it has changed suggests the key has been overwritten in memory.\n");
abort();
diff --git a/include/grid_ghosts.hh b/include/grid_ghosts.hh
new file mode 100644
index 0000000..be31ede
--- /dev/null
+++ b/include/grid_ghosts.hh
@@ -0,0 +1,209 @@
+// This file is part of monofonIC (MUSIC2)
+// A software package to generate ICs for cosmological simulations
+// Copyright (C) 2022 by Oliver Hahn
+//
+// monofonIC is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// monofonIC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+#pragma once
+
+#include
+#include
+
+#include
+
+#include
+#include