projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pthreads -> albe fast (beginning)
[physik/posic.git]
/
moldyn.h
diff --git
a/moldyn.h
b/moldyn.h
index
9d49dfa
..
31794c8
100644
(file)
--- a/
moldyn.h
+++ b/
moldyn.h
@@
-56,6
+56,14
@@
typedef struct s_atom {
#define ATOM_ATTR_2BP 0x20 /* pair potential */
#define ATOM_ATTR_3BP 0x40 /* 3 body potential */
#define ATOM_ATTR_2BP 0x20 /* pair potential */
#define ATOM_ATTR_3BP 0x40 /* 3 body potential */
+#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 */
/* cell lists */
typedef struct s_linkcell {
int nx,ny,nz; /* amount of cells in x, y and z direction */
@@
-64,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 */
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
#else
t_list *subcell; /* pointer to the cell lists */
#endif
@@
-143,6
+153,7
@@
typedef struct s_moldyn {
double p_ref; /* reference pressure */
double p; /* actual pressure (computed by virial) */
double p_ref; /* reference pressure */
double p; /* actual pressure (computed by virial) */
+ double px,py,pz; /* components of pressure */
double p_sum; /* sum over all p */
double p_avg; /* average value of p */
double p_sum; /* sum over all p */
double p_avg; /* average value of p */
@@
-349,6
+360,13
@@
typedef struct s_vb {
#define FCC 0x02
#define DIAMOND 0x04
#define ZINCBLENDE 0x08
#define FCC 0x02
#define DIAMOND 0x04
#define ZINCBLENDE 0x08
+#define NONE 0x80
+
+/*
+ * more includes
+ */
+
+//#include "pse.h"
/*
*
/*
*
@@
-414,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);
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
#else
int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,t_list *cell);
#endif
@@
-443,6
+463,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_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);
int get_line(int fd,char *line,int max);
int pair_correlation_init(t_moldyn *moldyn,double dr);
@@
-457,7
+481,13
@@
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);
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);
int visual_atoms(t_moldyn *moldyn);
+#endif
+
+int fpu_set_rtd(void);
#endif
#endif