problem with rRESPA and per/atom computations

Dear all,

I think there is a problem when combining rRESPA and per/atom computations:

When per/atom stresses or energies are computed on, say, two levels, the order
of steps is the following:

1.) compute inner level
2.) rebuild neighbor lists
3.) compute outer level
4.) gather per/atom values

Because the rebuilding of the neighbor lists is between the force computations,
the per/atom values are not tallied correctly.

My question is: Is there a conceptual problem with changing the order of steps
to

1.) rebuild neighbor lists
2.) compute inner level
3.) compute outer level
4.) gather per/atom values

?

Doing this change in the code is fairly easy. I have tested a code in which
the order of steps is like this, and it seems to work fine. I am not sure whether
this change introduces an error at some other point, though.

Best,

Rolf

Dear all,

sorry for reposting…. maybe it was not the best idea to send this at the time
of the LAMMPS workshop.

I've attached modified versions of respa (change in only one line of code)
that fix the problem that I had reported below. The test runs that I have made
with the attached files work fine.

Best,

Rolf

respa_omp.cpp (10.2 KB)

respa.cpp (22.5 KB)

Dear all,

sorry for reposting…. maybe it was not the best idea to send this at the time
of the LAMMPS workshop.

looks like development speed is still recovering from the frenzy right
before the workshop. in any case, to certain this change isn't lost,
i'll include them in LAMMPS-ICMS and will run some tests with them as
well.

I've attached modified versions of respa (change in only one line of code)
that fix the problem that I had reported below. The test runs that I have made
with the attached files work fine.

the thing i would be the most concerned about is whether you can still
recover the behavior of verlet if you have only one respa level or
multiple levels with a multiplier of 1. that used to be one of the
most demanding acid tests for respa.

ciao,
    axel.

p.s.: apropos respa. congrats for fixing the oldest known bug in
LAMMPS. that is quite an achievement.

thanks Rolf - I’ll take a look - I need
to convince myself that changing the point of
recursion does not alter the dynamics. It seems
like it will result in the neighbor list being built

at a different time, so that seems a bit odd.

Steve