espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo-users] time dependent force


From: Axel Arnold
Subject: Re: [ESPResSo-users] time dependent force
Date: Wed, 20 Jul 2011 14:34:07 +0200
User-agent: KMail/1.13.5 (Linux/2.6.34.8-0.2-desktop; KDE/4.4.4; x86_64; ; )

On Wednesday 20 July 2011 11:14:42 Jiajia Zhou wrote:
> 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?

Not that I am aware of. If you set the time with setmd time, it is already 
transferred to the nodes, so it should work even in this case.

Axel

-- 
JP Dr. Axel Arnold
ICP, Universität Stuttgart
Pfaffenwaldring 27
70569 Stuttgart, Germany
Email: address@hidden
Tel: +49 711 685 67609



reply via email to

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