Skip to content

Code detail #1

@GFTwrt

Description

@GFTwrt

Hello,

if I interprete eight-16th correct the call of sys.init_force() is nessary only once, as long as the sys data are hold constantly. But according my tests is it better to call sys.init_force() more often. Can you please comment.

Thanks
Thomas

Amuse ported code at:
https://github.com/GFTwrt/amuse/blob/master/src/amuse/community/gpuhermite8/interface.cc

of interest: commended or not commended call of sys.init_force() line 215 ff.

if(new_data==true)

{
// sys.init_force();
// i=0;
new_data=false;
e0 = sys.calc_energy_from_ptcl();
}

   sys.init_force();
   i=0;

Calls executed by AMUSE at Runtime:

init
set_const_time_step
set_begin_time
commit_parameters
new_particle
new_particle ..
commit_particles

evolve_model //to specific time good results
synchronize_model
get_state
get_total_energy

evolve_model //to specific time results differ between the call and not call of sys.init_force. Not to call gives lower accuracy...
synchronize_model
get_state
get_total_energy

evolve_model //to specific time results differ between the call and not call of sys.init_force. Not to call gives lower accuracy...
synchronize_model
get_state
get_total_energy

evolve_model //to specific time results differ between the call and not call of sys.init_force. Not to call gives lower accuracy...
synchronize_model
get_state
get_total_energy

evolve_model... //to specific time results differ between the call and not call of sys.init_force. Not to call gives lower accuracy...

synchronize_model
cleanup_code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions