X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=da951b5b54cd440f82facea485193738efce2206;hb=99a9305339d568641a7ec55783faa161b3c33311;hp=c3b8c6b2ca9206d98e6ae944737a70e1ff675274;hpb=e3e1d8e2f7fc65748c8da0accb9b3e6b0b1eb049;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index c3b8c6b..da951b5 100644 --- a/moldyn.h +++ b/moldyn.h @@ -58,6 +58,12 @@ typedef struct s_atom { #define DEFAULT_ATOM_ATTR 0x74 // 1,2,3 body interaction + visualize +/* special list structure for low mem approach */ +typedef struct s_lowmem_list { + int *head; + int *list; +} t_lowmem_list; + /* cell lists */ typedef struct s_linkcell { int nx,ny,nz; /* amount of cells in x, y and z direction */ @@ -66,6 +72,8 @@ typedef struct s_linkcell { double x,y,z; /* the actual cell lengthes */ #ifdef STATIC_LISTS int **subcell; /* pointer to the cell lists */ +#elif LOWMEM_LISTS + t_lowmem_list *subcell; /* low mem approach list */ #else t_list *subcell; /* pointer to the cell lists */ #endif @@ -424,6 +432,8 @@ 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); +#elif LOWMEM_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