From: hackbard Date: Sat, 25 Nov 2006 23:09:34 +0000 (+0000) Subject: foo X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3d65b8212c02f787a16cb312bf08b7712e89550;p=physik%2Fposic.git foo --- diff --git a/moldyn.c b/moldyn.c index 8b80242..c7243e0 100644 --- a/moldyn.c +++ b/moldyn.c @@ -547,6 +547,18 @@ int link_cell_shutdown(t_moldyn *moldyn) { return 0; } +int moldyn_add_schedule(t_moldyn *moldyn,) { + + + return 0; +} + +int moldyn_set_schedule_hook(t_moldyn *moldyn,void *hook,void *hook_params) { + + + return 0; +} + /* * * 'integration of newtons equation' - algorithms @@ -587,10 +599,13 @@ int moldyn_integrate(t_moldyn *moldyn) { moldyn->potential_force_function(moldyn); for(sched=0;schedschedule.content_count;sched++) { - moldyn->tau=; - moldyn->tau_square=; - // hier weiter ... + /* setting amont of runs and finite time step size */ + moldyn->tau=schedule->tau[sched]; + moldyn->tau_square=moldyn->tau*moldyn->tau; + moldyn->timesteps=schedule->runs[sched]; + + /* integration according to schedule */ for(i=0;itime_steps;i++) { @@ -636,6 +651,10 @@ int moldyn_integrate(t_moldyn *moldyn) { } } + /* check for hooks */ + if(schedule->hook) + schedule->hook(moldyn,schedule->hook_params); + return 0; } diff --git a/moldyn.h b/moldyn.h index 1df6dfa..a76b3b4 100644 --- a/moldyn.h +++ b/moldyn.h @@ -232,7 +232,7 @@ typedef struct s_tersoff_mult_params { #define MOLDYN_POTENTIAL_TM 0x02 #define MOLDYN_SET_POTENTIAL 0x00 -#define MOLDYN_SET_ +#define MOLDYN_SET_TEMPERATURE 0x01 #define MOLDYN_SET_ #define MOLDYN_SET_