[Top][All Lists]

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

Re: [ESPResSo-users] Saving old velocity

From: Axel Arnold
Subject: Re: [ESPResSo-users] Saving old velocity
Date: Fri, 20 Jun 2014 18:09:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0


On 06/20/2014 04:38 PM, Mohammad Abdulkhaliq wrote:
> I want to save the particle's old velocity at the previous time step.
> So, I want to make sure if this the correct way ? 
> I included v_old in ParticleMomentum struct in particle data and added
> corresponding methods 
> set_particle_v_old
> mpi_send_v_old
> mpi_send_v_old_slave

ParticleMomentum contains the _current_ momentum information and for
certain algorithms is communicated to other nodes, which you don't need.
So you should store your old velocity better in the ParticleLocal
struct, which contains nonstatic information about the particle that
only the node holding the particle needs to know.

Also, you don't need to write the set_particle_v_old and mpi_send_v_*
functions. These serve to set the particle property from the Tcl level,
but you actually want to update that information in the integrator loop,
which is in C (integrate.cpp). You can just copy the current velocity in
the *_update_vel_* function.


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]