Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • SWIFTsim SWIFTsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 57
    • Issues 57
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • SWIFT
  • SWIFTsimSWIFTsim
  • Merge requests
  • !225

Only drift the particles that need drifting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Matthieu Schaller requested to merge kill_drift into master Aug 23, 2016
  • Overview 9
  • Commits 13
  • Changes 8

Here is an algorithmic speed-up. The plan is to drift only the cells that contain an active particles and the cells that have at least one neighbour with an active particle.

  • If this condition is not met then runner_do_drift() just returns without performing any operation.

  • If the condition is met, runner_do_drift() moves all particles (as before) from the last point in time where a drift was performed.

We record for each cell the last time a drift was done such that we now by how much to drift things when needed.

Two exceptions to this rule: before reconstructing and before duping a snapshot, we drift all particles as we need correct position information at these two stages.

Note that I have made this an engine policy to ease the testing. Drifting all particles can be restored by setting the right flag.

@nnrw56 could you check that the function cell_is_drift_needed() makes sense and fully does what it says it does ? Also could you let me know whether you also agree with the whole logic and implementation.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: kill_drift