added static lists (but: glibc double free prob (for both lists!))
[physik/posic.git] / moldyn.h
index a7a81e9..ee45228 100644 (file)
--- 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 *);