[Top][All Lists]

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

Re: [ESPResSo] position folded in the code?

From: Axel Arnold
Subject: Re: [ESPResSo] position folded in the code?
Date: Wed, 3 Mar 2010 12:10:59 +0100
User-agent: KMail/1.10.3 (Linux/; KDE/4.1.3; x86_64; ; )

On Wednesday 03 March 2010 07:43:19 BIN ZHANG wrote:
> Hi, there:
> I have been reading the code of Espresso, and get confused about how
> the positions for each particle is stored. What exactly are the
> variables stored in the part[i].r.p[0-2]? are these folded positions
> around the pbc box? or real positions in 3d space?


The positions stored with the particles are neither folded nor unfolded - they 
are "almost folded". More precisely, the stored position can differ from the 
true folded position by at most skin, a configurable parameter. The background 
is, that otherwise one would need to exchange particles at processor 
boundaries every time step, which is rather expensive. However, you need to be 
careful when using these coordinates. For the force calculation, this is taken 
care of by the fact that our cells are bigger than the interaction range + 
skin, so that even if a particle should have moved to another cell or even 
processor, its interactions are still calculated.

>  From the function centermass() in statistics.c, it seems to me that
> they are folded positions, since unfold_position() are called
> explicitly. Also, the function in domain decomposition:
> dd_exchange_and_sort_particles(), kind of support this.

The latter functions are actually the ones that from time to time fold back 
the positions. No one else can do that, since the image position of the 
particle is coupled to its location in the domain grid. Therefore, all the 
other functions only temporarily unfold (or rarely, fold) the positions.

> If this were true, I would expect to call unfold_position() before any
> update of position in integrate.c. However, I do not see any folding,
> unfolding there.

Yes, because that is not necessary. Propagation can be done on unfolded, 
folded or our "almost folded" coordinates, just that if you would propagate 
with strictly folded coordinates, you would have to take care to update the 
image information. After all, the information of an unfolded coordinate or an 
folded coordinate plus image is exactly the same.


Dr. Axel Arnold Tel: +49 711 685 63593
ICP, Universit├Ąt Stuttgart      Email: address@hidden
Pfaffenwaldring 27
70569 Stuttgart, Germany

reply via email to

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