espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo-users] iccp3m question


From: Axel Arnold
Subject: Re: [ESPResSo-users] iccp3m question
Date: Tue, 07 Oct 2014 22:36:39 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07.10.14 22:17, Stefan Kesselheim wrote:
Here is how the parallelism of ICDP3M works: The algorithm assumes the 
electrostatics solver, in this case P3M calculates the forces on all particles, 
including ghost particles, and that it is stored in the force property of the 
particle. The electric field is calculated by dividing the occurring forces by 
the particle charge. Then in each iteration, the algorithm calculates the new 
surface charge density based on the electric field times the normal vector. 
Multiplied by the area of the corresponding discretisation element, this yields 
the new charge to assign to the particle. As the forces on real particles and 
ghost particles are identical (to the bit), the charge update does not have to 
be communicated, but is consistent on all nodes.
Then, a new iteration step can be performed.

The iteration in iccp3m_iteration the loop over is executed over the local 
cells. This would be correct, if the local cells included the ghost cells. It 
is however possible that this assumption is wrong. Then, of course, the 
magnitude of the charges becomes inconsistent between the nodes, as it is not 
communicated. Of the other espresso guys someone should know. Can you help guys?
Things are a bit more complicated. P3M computes the Fourier space forces only for physical particles, not for ghosts. Ghosts carry only forces originating from the real space forces, such that each actio-reactio pair occurs exactly twice. In other words, if a particle has ghost(s), parts of the real space interactions are stored with the particle, and other parts are stored with its ghosts.

After the normal force computation, the ghost forces are communicated back to their primary particles they are copies of, and zeroed out. Neither before nor after this step ghost and real forces are the same.

So, to answer the simple question: local_cells only contains physical cells. But looping over ghost cells doesn't really help as well, since you don't have access to the particles these ghosts are stemming from, namely, other processors. There are only very few places where accessing the ghosts is justified.

Best,
Axel

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




reply via email to

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