X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.c;h=c7243e04ef82a9d7004059429ce73e00999b52a0;hb=d3d65b8212c02f787a16cb312bf08b7712e89550;hp=8b8024257678eae44c2b1815ff2674e4c56126fc;hpb=2c65282d51589acb2f08631c7a7920cb70a46a5c;p=physik%2Fposic.git 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; }