[Top][All Lists]

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

Re: [ESPResSo-devel] accessibility of p1->r.p and p1->l.i on ghost cells

From: Axel Arnold
Subject: Re: [ESPResSo-devel] accessibility of p1->r.p and p1->l.i on ghost cells
Date: Sun, 25 Jan 2015 17:53:14 +0100

On 25.01.2015, at 14:05, Ivan Cimrak <address@hidden> wrote:

Hi Axel,

Yes, the image is not set for ghost particles. Even worse, p1->r.p is shifted so that the Euclidian distance can be used for particles in the primary cell. That is, ghost particles on the left of the simulation box have their x coordinate shifted by -box_l[0], those to the right by +box_l[0]. But their p1->l.i is not updated when doing this shifting, so you would get wrong unfolded coordinates.

Ok, so the image is not set for ghost particles, I get it. But for two
particles with bonded interaction I can get correct unfolded
positions, right? When evaluating bonded forces, one gets always the
first particle which is not a ghost particle. Am I correct? And
unfolding this non-ghost particle give us its unfolded position.
Afterwards, using relative positions to other neighbors of bonded
interaction (which might be ghost particles) we get unfolded position
of all neighbors from bonded interaction...

set box_l 10 10 10
part 0 pos 9 5 5
part 1 pos 9.5 5 5
inter 0 fene 1.0 1.0
part 0 bond 0 1

Let us move particles p0 and p1 to the right so that x coord of p0 is
e.g. 9.8 and x-coord of p1 is 10.2. When evaluating fene forces, we
get p0 from inside simulation box and we can unfold position of p0.
Using get_mi_vector and p0->r.p and p1->r.p we get unfolded position
also for p1, right?

Provided you know your bond cannot stretch more than half the box length, that should work, yes. However, I don’t think the first particle is always the physical one, just one of the two. But you can just use the feature GHOST_FLAG to get a flag to easily figure out who is a ghost.


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

reply via email to

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