-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce uses of the local_cells global #2899
Comments
This can at least be partially automate with tooling, e.g. with clion's extract parameter refactoring. It probably should also be split up, this affects about 150 functions. |
Example: int count_particles() {
int c = 0;
for(auto const&p : local_cells.particles()) {
c++;
}
return c;
} should be updated to int cound_particles(const ParticleRange &particles) {
int c = 0;
for(auto const&p : particles) {
c++;
}
return c;
} |
2939: Documentation of VV, NPT, Thermostats r=RudolfWeeber a=christophlohrmann Fixes #2680 Description of changes: - Added sphinx documentation for velocity verlet, NPT - Added/Updated sphinx documentation for Langevin, NPT, LB, DPD thermostat - Found some papers as reference PR Checklist ------------ - [ ] Tests? - [ ] Interface - [ ] Core - [x] Docs? 3006: Reduce usage of local cells r=fweik a=KaiSzuttor Fixes part of #2899 Description of changes: - replacement for #2991 3008: Removed from __future__ r=jngrad a=jrfinkbeiner Fixes #3004 3015: Update checkpointing docs r=jngrad a=RudolfWeeber Fixes #2808 Co-authored-by: Christoph Lohrmann <clohrmann@icp.uni-stuttgart.de> Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de> Co-authored-by: Kai Szuttor <kai@icp.uni-stuttgart.de> Co-authored-by: Alexander Reinauer <st144434@stud.uni-stuttgart.de> Co-authored-by: Jan Finkbeiner <st144298@stud.uni-stuttgart.de> Co-authored-by: Rudolf Weeber <weeber@icp.uni-stuttgart.de>
2939: Documentation of VV, NPT, Thermostats r=RudolfWeeber a=christophlohrmann Fixes #2680 Description of changes: - Added sphinx documentation for velocity verlet, NPT - Added/Updated sphinx documentation for Langevin, NPT, LB, DPD thermostat - Found some papers as reference PR Checklist ------------ - [ ] Tests? - [ ] Interface - [ ] Core - [x] Docs? 3006: Reduce usage of local cells r=fweik a=KaiSzuttor Fixes part of #2899 Description of changes: - replacement for #2991 Co-authored-by: Christoph Lohrmann <clohrmann@icp.uni-stuttgart.de> Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de> Co-authored-by: Kai Szuttor <kai@icp.uni-stuttgart.de> Co-authored-by: Alexander Reinauer <st144434@stud.uni-stuttgart.de>
This is merged? |
This is an issue. |
On Tue, Aug 06, 2019 at 01:57:03AM -0700, Florian Weik wrote:
This is an issue.
Yes. But was it resolved by #3006?
|
No, of course not?! |
|
Candidates for refactoring:
|
thanks to @reinaual there are only 29 occurrences left:
|
The following places can be kept until we have decided how to pass global state to
The following places do actually depend on the cell system (not only on the particles):
The following usage can be fixed by an interface change:
The following sites are flagged for removal and can be ignored:
|
The goal here is to make it transparent which call sites actually need access to the cells, and which just need to iterate the particles. There are a quite a lot of changes her, but most of them are just textual replacements, so should be fast to check. The final goal here is to be able to hide the cells from client code of the particle storage. From my side #2899 can be closed with this. Description of changes: - Add functions {local_particles, ghost_particles} to CellStructure to directly get the local/ghost particle ranges - Replaced all occurrences of particles access thru the {local, ghost} cell ranges by direct calls to the aforementioned functions - Replaced CellPList by the now functionally equivalent Utils::Span
Many methods directly use the
local_cells
global, in most of the cases to iterate over the particles.This exposes implementation details of the cell system to the methods, which isn't actually needed.
For those methods the
ParticleRange
to be iterated over should be passed as an argument.The text was updated successfully, but these errors were encountered: