Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W waLBerla
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • waLBerla
  • waLBerla
  • Merge requests
  • !514

Fix unintended sweep copying introduced in !486

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Christoph Schwarzmeier requested to merge fix-sweep-copy-bug into master Feb 17, 2022
  • Overview 0
  • Commits 11
  • Pipelines 4
  • Changes 8

In !486 (merged), program execution is aborted when multiple sweeps (with the same selectors) are added to a SweepTimeloop at once. However, if the execution continued, instead of using a pointer to the sweep's object (as done before !486 (merged)), a reference is used. With this reference, an internal copy is created such that the sweep's object is copied in every time step. This issue was introduced mainly by convenience, as SelectableObject provides a function that returns the number of matching selectors and a reference to the matching object.

With this MR, !486 (merged) is partially reverted such that a pointer to a sweep's object is used again. In SelectableObject, function getNumberOfMatching(selector) is implemented that returns the number of objects matching the selector.

Additionally, two tests are included to check if:

  • adding multiple sweeps with the same selectors aborts the program (as expected and resolved by !486 (merged))
  • adding multiple sweeps with different selectors works
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-sweep-copy-bug