X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=ee452286af3ad5cf1ab44f77e5a558cde03772a1;hb=099c05fce45cacbbd7bbf6a7c5f1067e150d30ac;hp=a7a81e9778d0be025acc79d8f2f7f57f9a1e4788;hpb=dff2917d22ed07707d222bc10fab7370356699dc;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index a7a81e9..ee45228 100644 --- a/moldyn.h +++ b/moldyn.h @@ -62,10 +62,16 @@ typedef struct s_linkcell { int cells; /* total amount of cells */ double len; /* prefered cell edge length */ double x,y,z; /* the actual cell lengthes */ +#ifdef STATIC_LISTS + int **subcell; /* pointer to the cell lists */ +#else t_list *subcell; /* pointer to the cell lists */ +#endif int dnlc; /* direct neighbour lists counter */ } t_linkcell; +#define MAX_ATOMS_PER_LIST 10 + /* moldyn schedule structure */ typedef struct s_moldyn_schedule { int count; @@ -454,7 +460,11 @@ double estimate_time_step(t_moldyn *moldyn,double nn_dist); int link_cell_init(t_moldyn *moldyn,u8 vol); int link_cell_update(t_moldyn *moldyn); +#ifdef STATIC_LISTS +int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,int **cell); +#else int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,t_list *cell); +#endif int link_cell_shutdown(t_moldyn *moldyn); typedef int (*set_hook)(void *,void *);