Commit 14a94564 authored by Johannes Blaschke's avatar Johannes Blaschke
Browse files

only compare nearest squirmers to tryp position in md

parent 4655dc09
......@@ -579,8 +579,19 @@ trypanosome_time_driven_md(world_state * world, const int n_md_step, const doubl
// assign forces due to squirmers **********************************************************************
if(config.squirmeron == 1)
{
for(int i=0; i<config.nsquirmers; i++)
assign_trypanosome_squirmer_forces(world->trypanosome, & all_sq_r_buffer[i]);
int n_slice = world->trypanosome->tryp_net.skeleton.n_slice;
double l_search = 0.5*n_slice;
vector3 com_search = world->trypanosome->tryp_net.skeleton.slices[(int) l_search].centre.r;
for(int i=0; i<config.nsquirmers; i++){
vector3 sq_r, dr;
vcpy(& sq_r, & all_sq_r_buffer[i]);
vdist_relative(& sq_r, & sq_r, & com_search);
vsub(& dr, & sq_r, & com_search);
if(vlength2(& dr) < l_search * l_search)
assign_trypanosome_squirmer_forces(world->trypanosome, & sq_r);
}
}
trypanosome_network__md_update_v(net, md_time, dt, vertex_buffer, end_node_buffer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment