[Top][All Lists]

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

Re: [ESPResSo-users] iccp3m question

From: Stefan Kesselheim
Subject: Re: [ESPResSo-users] iccp3m question
Date: Tue, 7 Oct 2014 22:52:22 +0200


On Oct 7, 2014, at 10:36 PM, Axel Arnold <address@hidden> wrote:

> 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.

That means no matter if before or after the ghost communication, the sum of the 
forces is correct. The iccp3m formula is linear, so we could sum up the 
contributions from each particle and its ghosts. Or, the charges must be 
communicated. Both cases require a certain amount of coding, but not too much. 
But I am afraid I have little time to fix it. I could assist in fixing it, but 
I'm not sure when I have the time to do it properly myself.

reply via email to

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