espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-users] time dependent force


From: Jiajia Zhou
Subject: [ESPResSo-users] time dependent force
Date: Wed, 20 Jul 2011 11:14:42 +0200

Dear Espresso Users,

I'm wondering if any one give me some suggestions. I try to apply a
time-dependent external force in the simulation. I implement some
codes in the source to assign the external force to every particle at
each integration step. The force is a function of time, so I use the
global variable sim_time.

The program runs fine in serial, but fails in parallel because the
sim_time is only on master node. In the integrate.c, the line to
update sim_time reads:
00577     /* Propagate time: t = t+dt */
00578     if(this_node==0) sim_time += time_step;
00579   }

I'm just wondering why the sim_time is only updated in the master
node? Naively, if I just get rid of the if statement and update on
every nodes, it will solve my problem, but will it causes other
problems?

Thanks a lot for your help!
Jiajia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]