LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] fix/pair_style works in serial but do not work in parallel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] fix/pair_style works in serial but do not work in parallel?


From: Quang Ha <quang.t.ha.20@...24...>
Date: Mon, 30 Oct 2017 11:45:57 -0400

Hi all,

SHORT VERSION: I have written my fixes and pair styles to allow concentration diffusion. It works nicely in serial, but it chokes in parallel. What are the common errors that people make when implementing new fixes/pair styles that I could look into to fix this?

LONGER VERSION (my apologise...): I don't think this is the right way to do it, but I got something to work (also it helped understanding how LAMMPS structure). I defined a new property using fix property/atom in the input script, here:

https://github.com/quang-ha/lammps-test-case/blob/master/concentration_diffusion/sph_conc_diffusion_2d.lmp

Then I added a new fixes and pair_style to allow the diffusion of the property here (the concentration cA):

https://github.com/quang-ha/lammps/blob/concentraion_diffusion/src/USER-SPH/fix_meso_concentration_A.cpp

https://github.com/quang-ha/lammps/blob/concentraion_diffusion/src/USER-SPH/pair_sph_concA_diffusion.cpp

While I would truly appreciate being criticised about code-styles and good/bad practice (please do! I am still learning), I would love to know which step I missed out? Do I need to regenerate/update the values of the ghost atoms (from what I collected here http://lammps.sandia.gov/doc/Developer.pdf) at each time step? Bear in mind the code is still simply a proof on concept at this stage - I have not sanitise all inputs errors and make it truly robust...

Also, I have a feeling like my approach is fundamentally wrong. Some instincts tell me that it would be better to implement the new properties inside the atom styles instead of introducing them anew in each script?

Thanks,
Quang