X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=6fda9ceef79e9853c0967c31004a59240e83c820;hb=452a348351ae8a2255809918a05683d2510655ce;hp=c3b8c6b2ca9206d98e6ae944737a70e1ff675274;hpb=d691728d68773335200ea15374c9155abc3fe3e2;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index c3b8c6b..6fda9ce 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 @@ -109,8 +117,12 @@ typedef struct s_moldyn { int (*func3b_j1)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc); int (*func3b_j2)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc); int (*func3b_j3)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc); +#ifdef PTHREADS + void *(*func3b_k1)(void *ptr); +#else int (*func3b_k1)(struct s_moldyn *moldyn, t_atom *ai,t_atom *aj,t_atom *ak,u8 bck); +#endif int (*func3b_k2)(struct s_moldyn *moldyn, t_atom *ai,t_atom *aj,t_atom *ak,u8 bck); void *pot_params; @@ -424,6 +436,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 @@ -453,6 +467,10 @@ int moldyn_load(t_moldyn *moldyn); int process_2b_bonds(t_moldyn *moldyn,void *data, int (*process)(t_moldyn *moldyn,t_atom *itom,t_atom *jtom, void *data,u8 bc)); +int process_neighbours(t_moldyn *moldyn,void *data,t_atom *atom, + int (*process)(t_moldyn *moldyn,t_atom *atom,t_atom *natom, + void *data,u8 bc)); + int get_line(int fd,char *line,int max); int pair_correlation_init(t_moldyn *moldyn,double dr); @@ -467,7 +485,11 @@ int bond_analyze(t_moldyn *moldyn,double *quality); int visual_init(t_moldyn *moldyn,char *filebase); int visual_bonds_process(t_moldyn *moldyn,t_atom *itom,t_atom *jtom, void *data,u8 bc); +#ifdef PTHREADS +void *visual_atoms(void *ptr); +#else int visual_atoms(t_moldyn *moldyn); +#endif int fpu_set_rtd(void);