Commit 8df528a4 authored by Rainer Weinberger's avatar Rainer Weinberger

Fixed SUBFIND_EXTENDED_PROPERTIES bug; resolves issue #1; added PLOT variable...

Fixed SUBFIND_EXTENDED_PROPERTIES bug; resolves issue #1; added PLOT variable in test to specify if check scripts should create plots or not
parent bceafcd5
......@@ -41,7 +41,7 @@ FOF_SECONDARY_LINK_TYPES=1+16+32 # 2^type for the types linked to neares
SUBFIND # enables substructure finder
SAVE_HSML_IN_SNAPSHOT # stores hsml, density, and velocity dispersion values in the snapshot files
SUBFIND_CALC_MORE # calculates also the velocity dispersion in the local density estimate (this is automatically enabled by several other options, e.g. SAVE_HSML_IN_SNAPSHOT)
#SUBFIND_EXTENDED_PROPERTIES # adds calculation of further quantities related to angular momentum in different components
SUBFIND_EXTENDED_PROPERTIES # adds calculation of further quantities related to angular momentum in different components
#-------------------------------------------- Things for special behaviour
PROCESS_TIMES_OF_OUTPUTLIST # goes through times of output list prior to starting the simulaiton to ensure that outputs are written as close to the desired time as possible (as opposed to at next possible time if this flag is not active)
......
......@@ -50,7 +50,7 @@ FOF_SECONDARY_LINK_TYPES=1+16+32 # 2^type for the types linked t
SUBFIND # enables substructure finder
SAVE_HSML_IN_SNAPSHOT # stores hsml, density, and velocity dispersion values in the snapshot files
SUBFIND_CALC_MORE # calculates also the velocity dispersion in the local density estimate (this is automatically enabled by several other options, e.g. SAVE_HSML_IN_SNAPSHOT)
#SUBFIND_EXTENDED_PROPERTIES # adds calculation of further quantities related to angular momentum in different components
SUBFIND_EXTENDED_PROPERTIES # adds calculation of further quantities related to angular momentum in different components
#------------------------------------------------ Things for special behaviour
......
......@@ -16,7 +16,7 @@ ResubmitCommand my-scriptfile
%----- Memory alloction
MaxMemSize 10000
MaxMemSize 3500
%---- Caracteristics of run
TimeBegin 0.0196078431372549 % Begin of the simulation z=50
......
......@@ -153,7 +153,7 @@ void domain_exchange_and_update_DC(void)
{
DC[i].image_flags = 1;
}
#endif
#endif /* #if !defined(GRAVITY_NOT_PERIODIC) && !defined(DO_NOT_RANDOMIZE_DOMAINCENTER) && defined(SELFGRAVITY) */
/* first, we need to complete the translation table */
for(int j = 0; j < NTask; j++)
......@@ -348,7 +348,7 @@ void domain_exchange_and_update_DC(void)
#if !defined(GRAVITY_NOT_PERIODIC) && !defined(DO_NOT_RANDOMIZE_DOMAINCENTER) && defined(SELFGRAVITY)
// Nothing to do here
#else
#else /* #if !defined(GRAVITY_NOT_PERIODIC) && !defined(DO_NOT_RANDOMIZE_DOMAINCENTER) && defined(SELFGRAVITY) */
if(recv_transscribe_data[i].new_task >= 0)
{
if(trans_table[old_index].wrapped)
......@@ -428,7 +428,7 @@ void domain_exchange_and_update_DC(void)
recv_transscribe_data[i].image_flags = (1 << (zbits * 9 + ybits * 3 + xbits));
}
}
#endif
#endif /* #if !defined(GRAVITY_NOT_PERIODIC) && !defined(DO_NOT_RANDOMIZE_DOMAINCENTER) && defined(SELFGRAVITY) #else */
}
/* now return the data */
......
......@@ -169,7 +169,7 @@ void domain_findExtent(void)
DomainCenter[j] = 0.5 * (xmin_glob[j] + xmax_glob[j]);
DomainCorner[j] = 0.5 * (xmin_glob[j] + xmax_glob[j]) - 0.5 * len;
}
#else /* #if !defined(RANDOMIZE_DOMAINCENTER) */
#else /* #if defined(DO_NOT_RANDOMIZE_DOMAINCENTER) || !defined(GRAVITY_NOT_PERIODIC) || defined(ONEDIMS) || defined(TWODIMS) */
for(j = 0; j < 3; j++)
{
DomainCenter[j] = 0.5 * (xmin_glob[j] + xmax_glob[j]);
......@@ -182,7 +182,7 @@ void domain_findExtent(void)
for(j = 0; j < 3; j++)
DomainCorner[j] = DomainCenter[j] - 0.5 * len;
#endif /* #if !defined(RANDOMIZE_DOMAINCENTER) #else */
#endif /* #if defined(DO_NOT_RANDOMIZE_DOMAINCENTER) || !defined(GRAVITY_NOT_PERIODIC) || defined(ONEDIMS) || defined(TWODIMS) #else */
DomainLen = len;
......@@ -234,7 +234,7 @@ void do_box_wrapping(void)
MPI_Bcast(All.GlobalDisplacementVector, 3, MPI_DOUBLE, 0, MPI_COMM_WORLD);
domain_displacePositions( DISPLACE_POSITION_FORWARD );
#endif
#endif /* #if !defined(GRAVITY_NOT_PERIODIC) && !defined(DO_NOT_RANDOMIZE_DOMAINCENTER) && defined(SELFGRAVITY) && (NUMDIMS > 2) */
int i;
for(i = 0; i < NumPart; i++)
......
......@@ -762,7 +762,7 @@ static int subfind_overdensity_evaluate(int target, int mode, int threadid)
else
rate = (SUBFIND_SO_POT_CALCULATION_PARTICLE_NUMBER / N200);
if(get_random_number() < rate)
if(get_random_number_aux() < rate)
{
if(NumPaux >= NumPart)
terminate("NumPaux >= NumPart");
......
......@@ -195,7 +195,7 @@ static int subfind_so_potegy_loctree_treebuild(int npart, int start)
/* insert all particles */
LocTree_IntPos_list = (unsigned long long *) mymalloc_movable(&LocTree_IntPos_list, "LocTree_IntPos_list", 3 * NumPart * sizeof(unsigned long long));
LocTree_IntPos_list = (unsigned long long *) mymalloc_movable(&LocTree_IntPos_list, "LocTree_IntPos_list", 3 * LocMaxPart * sizeof(unsigned long long));
for(int k = 0; k < npart; k++)
{
......@@ -814,7 +814,13 @@ double subfind_so_potegy(double *egypot)
for(int i = 1; i < Ngroups; i++)
group_off[i] = group_off[i - 1] + group_len[i - 1];
subfind_so_potegy_loctree_treeallocate((int) (All.TreeAllocFactor * NumPart) + NTopnodes, NumPart);
int MaxAllocPart = NumPart;
// extend in case a single group holds more particles than NumPart
for(int i = 0; i < Ngroups; i++)
if(group_len[i] > MaxAllocPart)
MaxAllocPart = group_len[i];
subfind_so_potegy_loctree_treeallocate((int) (All.TreeAllocFactor * MaxAllocPart) + NTopnodes, MaxAllocPart);
/* now do the actual potential calculation */
for(int i = 0; i < Ngroups; i++)
......
......@@ -8,6 +8,7 @@
## Number of cores to compile and run the problem on
## use NUMBER_OF_TASKS=1 for 1d test problems!
NUMBER_OF_TASKS=1
PLOT=False # create plots? True/False
## choose your examples
TESTS=""
......@@ -74,7 +75,7 @@ do
fi
## check result in example directory, this also creates some check plots
python ${RUNDIR}/check.py ${RUNDIR}
python ${RUNDIR}/check.py ${RUNDIR} ${PLOT}
((return_value=$?)) ## get return value
if [ $return_value != 0 ] ## check return value
then echo "ERROR: test.sh: test failed!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment