[Top][All Lists]

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

Re: [ESPResSo-users] Access local particles in each linked cell

From: Rahul Arora
Subject: Re: [ESPResSo-users] Access local particles in each linked cell
Date: Thu, 12 Dec 2013 16:11:43 +0100


Thanks for the reply.
I need to access particles in each linked cell, since I have to transfer average quantities to a macroscopic solver from Espresso, and that has to be done cell wise (I have some overlapping cells between the two codes). It would be useful to get to know, which cell the particle is in and from that form a particle list and iterate over it. Mainly I am interested to this in parallel, however in the beginning I am look to do this in a serial code.

Thanks once again
Rahul Arora

On Thu, Dec 12, 2013 at 3:29 PM, Olaf Lenz <address@hidden> wrote:

On what level do you want to access the particles? And do you really need to access the particles per cell, or just all particles on this processor, or just all particles?

From a Tcl script, you can easily access all particles in the simulation via the "part $pid print" command. You have no access to the linked cells, as they have no physical meaning. However, it is of course simple to compute what cell a particle would be in.

From serial C code, you can also access all particles. Again, you have no access to the linked cells. To see how to access all particles, have a look at the function "mindist" in src/statistics.cpp.

If you really need to access the particles in the linked cells (why would you want that?), you will have to do this in parallel. As an example, have a look at "predict_momentum_particles" in src/statistics.cpp. If you actually need a loop over all particles within the cutoff range, have a look at the function "aggregation" in the same file.


2013/12/12 Rahul Arora <address@hidden>
Dear Espresso Users,

I am simulating a simple Lennard-Jones fluid using Espresso. I am trying to access the particles in each linked cell (I found the type ParticleList in Espresso source code) of the my simulation domain and calculate the average properties in each linked cell. Is there any subroutine available to iterate over all the molecules in each linked cell?

Thanks in advance

Rahul Arora

Dr. rer. nat. Olaf Lenz
Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart

reply via email to

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