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:
e7c475b
)
-
author
hackbard
<hackbard>
Fri, 18 Jul 2003 16:42:43 +0000
(16:42 +0000)
committer
hackbard
<hackbard>
Fri, 18 Jul 2003 16:42:43 +0000
(16:42 +0000)
nlsop.c
patch
|
blob
|
history
diff --git
a/nlsop.c
b/nlsop.c
index
c7d56e4
..
47f6869
100644
(file)
--- a/
nlsop.c
+++ b/
nlsop.c
@@
-84,6
+84,7
@@
int process_cell(d3_lattice *d3_l,u32 x,u32 y,u32 z,info *my_info)
}
}
p+=*conc*my_info->a_cp*URAND_MAX;
}
}
p+=*conc*my_info->a_cp*URAND_MAX;
+ printf("debug: %f - %u\n",p,URAND_MAX);
if(!(*thiz&AMORPH))
{
if(get_rand(URAND_MAX)<=p) MAKE_AMORPH(thiz);
if(!(*thiz&AMORPH))
{
if(get_rand(URAND_MAX)<=p) MAKE_AMORPH(thiz);
@@
-98,7
+99,7
@@
int process_cell(d3_lattice *d3_l,u32 x,u32 y,u32 z,info *my_info)
return 1;
}
return 1;
}
-int distrib_c(d3_lattice *d3_l,info *my_info)
+int distrib_c(d3_lattice *d3_l,info *my_info
,int step
)
{
u32 x,y,z;
int i,j,k,c;
{
u32 x,y,z;
int i,j,k,c;
@@
-111,6
+112,9
@@
int distrib_c(d3_lattice *d3_l,info *my_info)
z=get_rand_lgp(d3_l->max_z,my_info->a_cd,my_info->b_cd);
*(d3_l->extra+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)+=1;
z=get_rand_lgp(d3_l->max_z,my_info->a_cd,my_info->b_cd);
*(d3_l->extra+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)+=1;
+ if(step%my_info->diff_rate==0)
+ {
+
for(i=0;i<d3_l->max_x;i++)
{
for(j=0;j<d3_l->max_y;j++)
for(i=0;i<d3_l->max_x;i++)
{
for(j=0;j<d3_l->max_y;j++)
@@
-208,6
+212,8
@@
int distrib_c(d3_lattice *d3_l,info *my_info)
} /* for y */
} /* for x */
} /* for y */
} /* for x */
+ } /* if step modulo diff_rate == 0 */
+
return 1;
}
return 1;
}
@@
-606,7
+612,7
@@
int main(int argc,char **argv)
x_c=get_rand(d3_l.max_x);
y_c=get_rand(d3_l.max_y);
z_c=get_rand_lgp(d3_l.max_z,my_info.a_el,my_info.b_el);
x_c=get_rand(d3_l.max_x);
y_c=get_rand(d3_l.max_y);
z_c=get_rand_lgp(d3_l.max_z,my_info.a_el,my_info.b_el);
-
if(i%my_info.diff_rate==0)
distrib_c(&d3_l,&my_info);
+ distrib_c(&d3_l,&my_info);
process_cell(&d3_l,x_c,y_c,z_c,&my_info);
#ifdef USE_DFB_API
if(i%refresh==0)
process_cell(&d3_l,x_c,y_c,z_c,&my_info);
#ifdef USE_DFB_API
if(i%refresh==0)