Commit 535460cc authored by Rainer Weinberger's avatar Rainer Weinberger
Browse files

Removed option FOF_FUZZ_SORT_BY_NEAREST_GROUP; ensured allvars.h and proto.h are included first.

parent 01902d5c
......@@ -231,7 +231,6 @@ ifeq (FOF,$(findstring FOF,$(CONFIGVARS)))
OBJS += fof/fof.o \
fof/fof_distribute.o \
fof/fof_findgroups.o \
fof/fof_fuzz.o \
fof/fof_io.o \
fof/fof_nearest.o \
fof/fof_sort_kernels.o \
......
......@@ -34,10 +34,10 @@
* - 11.05.2018 Prepared file for public release -- Rainer Weinberger
*/
#include "add_bggrid.h"
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "add_bggrid.h"
#include "../domain/domain.h"
#ifdef ADDBACKGROUNDGRID
......
......@@ -38,9 +38,9 @@
#include <mpi.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "add_bggrid.h"
#ifdef ADDBACKGROUNDGRID
......
......@@ -49,10 +49,10 @@
#include <string.h>
#include <strings.h>
#include "../domain/bsd_tree.h"
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/bsd_tree.h"
#include "../domain/domain.h"
#include "../mesh/voronoi/voronoi.h"
/* do some preparation work for use of red-black ordered binary tree based on BSD macros */
......
......@@ -49,9 +49,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../mesh/voronoi/voronoi.h"
#include <gsl/gsl_heapsort.h>
......
......@@ -49,9 +49,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......@@ -350,11 +350,7 @@ void fof_prepare_output_order(void)
aux_sort[i].DM_BindingEnergy = PS[i].BindingEnergy;
#endif /* #ifdef SUBFIND */
aux_sort[i].Type = P[i].Type;
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
aux_sort[i].key = PS[i].GroupNr;
#else /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
aux_sort[i].ID = P[i].ID;
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP #else */
#if defined(RECOMPUTE_POTENTIAL_IN_SNAPSHOT)
aux_sort[i].FileOrder = P[i].FileOrder;
#endif /* #if defined(RECOMPUTE_POTENTIAL_IN_SNAPSHOT) */
......
......@@ -62,9 +62,6 @@ extern struct group_properties
MyDouble CM[3];
MyFloat Vel[3];
MyDouble Pos[3];
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
unsigned long long FuzzOffsetType[NTYPES];
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
MyDouble FirstPos[3];
#ifdef USE_SFR
......@@ -106,11 +103,7 @@ struct data_aux_sort
int TargetTask, TargetIndex;
int GrNr;
int Type;
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
peanokey key;
#else /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
MyIDType ID;
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP #else */
#if defined(RECOMPUTE_POTENTIAL_IN_SNAPSHOT)
MyIDType FileOrder;
#endif /* #if defined(RECOMPUTE_POTENTIAL_IN_SNAPSHOT) */
......
......@@ -37,9 +37,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......
......@@ -52,9 +52,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......
This diff is collapsed.
......@@ -63,10 +63,10 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../gitversion/version.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../gitversion/version.h"
#include "../subfind/subfind.h"
#include "fof.h"
......@@ -601,10 +601,6 @@ void fof_subfind_fill_write_buffer(enum fof_subfind_iofields blocknr, int *start
ip = (int *)CommBuffer;
idp = (MyIDType *)CommBuffer;
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
unsigned long long *llp = (unsigned long long *)CommBuffer;
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
pindex = *startindex;
for(n = 0; n < pc; pindex++, n++)
......@@ -1120,10 +1116,6 @@ void fof_subfind_fill_write_buffer(enum fof_subfind_iofields blocknr, int *start
#endif /* #ifdef SUBFIND */
break;
case IO_FOF_FUZZOFFTYPE:
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
for(k = 0; k < NTYPES; k++)
*llp++ = Group[pindex].FuzzOffsetType[k];
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
break;
case IO_SUB_LEN:
#ifdef SUBFIND
......@@ -2520,9 +2512,6 @@ int fof_subfind_blockpresent(enum fof_subfind_iofields blocknr)
break;
case IO_FOF_FUZZOFFTYPE:
#ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP
present = 1;
#endif /* #ifdef FOF_FUZZ_SORT_BY_NEAREST_GROUP */
break;
case IO_FOF_M_MEAN200:
......
......@@ -48,9 +48,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......
......@@ -64,9 +64,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......@@ -166,19 +166,11 @@ int fof_compare_aux_sort_GrNr(const void *a, const void *b)
return +1;
#endif /* #ifdef SUBFIND */
#if defined(FOF_FUZZ_SORT_BY_NEAREST_GROUP)
if(((struct data_aux_sort *)a)->key < ((struct data_aux_sort *)b)->key)
return -1;
if(((struct data_aux_sort *)a)->key > ((struct data_aux_sort *)b)->key)
return +1;
#else /* #if defined(FOF_FUZZ_SORT_BY_NEAREST_GROUP) */
if(((struct data_aux_sort *)a)->ID < ((struct data_aux_sort *)b)->ID)
return -1;
if(((struct data_aux_sort *)a)->ID > ((struct data_aux_sort *)b)->ID)
return +1;
#endif /* #if defined(FOF_FUZZ_SORT_BY_NEAREST_GROUP) #else */
return 0;
}
......
......@@ -40,9 +40,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#include "../subfind/subfind.h"
#include "fof.h"
......
......@@ -73,9 +73,9 @@
#include <string.h>
#include <time.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
static int *th_list;
static unsigned char *level_list;
......
......@@ -41,10 +41,10 @@
#include <string.h>
#include <time.h>
#include "../domain/bsd_tree.h"
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/bsd_tree.h"
#include "../domain/domain.h"
/* \brief Structure of my tree nodes.
*/
......
......@@ -42,9 +42,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#ifdef EXTERNALGRAVITY
static void gravity_external_get_force(double pos[3], int type, MyIDType ID, double acc[3], double *pot, int *flag_set);
......
......@@ -39,9 +39,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
/*! \brief Sets the (comoving) softening length of all particle
* types in the table All.SofteningTable[...].
......
......@@ -43,9 +43,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
#ifdef ALLOW_DIRECT_SUMMATION
static int Nimport;
......
......@@ -48,9 +48,9 @@
#include <stdlib.h>
#include <string.h>
#include "../domain/domain.h"
#include "../main/allvars.h"
#include "../main/proto.h"
#include "../domain/domain.h"
static double ThreadsCosttotal[NUM_THREADS]; /*!< The total cost of the particles/nodes processed by each thread */
static int ThreadFirstExec[NUM_THREADS]; /*!< Keeps track, if a given thread executes the gravity_primary_loop() for the first time */
......
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