projects
/
physik
/
nlsop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8800252
)
plot in atom percentage
author
hackbard
<hackbard>
Thu, 5 Aug 2004 14:32:32 +0000
(14:32 +0000)
committer
hackbard
<hackbard>
Thu, 5 Aug 2004 14:32:32 +0000
(14:32 +0000)
dfbapi.c
patch
|
blob
|
history
nlsop.c
patch
|
blob
|
history
nlsop.h
patch
|
blob
|
history
diff --git
a/dfbapi.c
b/dfbapi.c
index
2f3639e
..
18cf9cc
100644
(file)
--- a/
dfbapi.c
+++ b/
dfbapi.c
@@
-377,6
+377,7
@@
int scan_event(d3_lattice *d3_l,int *x,int *y,int *z,int *q,int *esc,int *switch
if(ke.key_id==DIKI_A) *ac_distr=1;
if(ke.key_id==DIKI_C) *ac_distr=2;
if(ke.key_id==DIKI_B) *ac_distr=3;
if(ke.key_id==DIKI_A) *ac_distr=1;
if(ke.key_id==DIKI_C) *ac_distr=2;
if(ke.key_id==DIKI_B) *ac_distr=3;
+ if(ke.key_id==DIKI_X) *ac_distr=4;
}
return 1;
}
return 1;
diff --git
a/nlsop.c
b/nlsop.c
index
7463054
..
7f7f92c
100644
(file)
--- a/
nlsop.c
+++ b/
nlsop.c
@@
-341,11
+341,14
@@
int write_ac_distr(d3_lattice *d3_l,int ac_distr)
{
int fd,x,y,z;
int count,offset;
{
int fd,x,y,z;
int count,offset;
- char file[16];
-
- if(ac_distr==1) strcpy(file,"a.plot");
- if(ac_distr==2) strcpy(file,"c.plot");
- if(ac_distr==3) strcpy(file,"b.plot");
+ char file[32];
+ int si_count;
+
+ si_count=d3_l->max_x*d3_l->max_y*SI_PER_VOLUME;
+ if(ac_distr==1) strcpy(file,"carbon_in_av.plot");
+ if(ac_distr==2) strcpy(file,"carbon_in_cv.plot");
+ if(ac_distr==3) strcpy(file,"carbon.plot");
+ if(ac_distr==4) strcpy(file,"amorphous_volumes.plot");
if((fd=open(file,O_WRONLY|O_CREAT))<0)
{
if((fd=open(file,O_WRONLY|O_CREAT))<0)
{
@@
-366,9
+369,12
@@
int write_ac_distr(d3_lattice *d3_l,int ac_distr)
if(ac_distr==2)
if(!(*(d3_l->status+offset)&AMORPH)) count+=*(d3_l->extra+offset);
if(ac_distr==3) count+=*(d3_l->extra+offset);
if(ac_distr==2)
if(!(*(d3_l->status+offset)&AMORPH)) count+=*(d3_l->extra+offset);
if(ac_distr==3) count+=*(d3_l->extra+offset);
+ if(ac_distr==4)
+ if(*(d3_l->status+offset)&AMORPH) count+=1;
}
}
}
}
- dprintf(fd,"%d %d\n",z,count);
+ if(ac_distr==4) dprintf(fd,"%d %d\n",z*CELL_LENGTH,count);
+ else dprintf(fd,"%d %f\n",z*CELL_LENGTH,100.0*count/si_count);
}
close(fd);
}
close(fd);
diff --git
a/nlsop.h
b/nlsop.h
index
3231cb7
..
971a018
100644
(file)
--- a/
nlsop.h
+++ b/
nlsop.h
@@
-50,7
+50,8
@@
typedef struct __info
#define CPI 20
#define CPI 20
-#define C_SAT (6*6*6*8)
+#define C_SAT (168*8)
+#define SI_PER_VOLUME (168*8)
#define FFT_HEIGHT 64
#define FFT_HEIGHT 64