Changeset f3eb6a


Ignore:
Timestamp:
Apr 23, 2021, 8:34:22 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
9f55b9
Parents:
ef0f8f
git-author:
Frederik Heber <frederik.heber@…> (10/03/20 21:54:41)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:34:22)
Message:

FIX: LinkedCell_model executes deletes right away.

  • we use the memory address as key in the queue map. If an atom is removed and another new one happens to land at the same address, this will confuse the queue and end in an assertion failure as the update will be overriden and the atom is already present.
Location:
src/LinkedCell
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/LinkedCell/LinkedCell_Model.cpp

    ref0f8f rf3eb6a  
    333333void LinkedCell::LinkedCell_Model::deleteNode(const TesselPoint *Walker)
    334334{
    335   LOG(2, "INFO: Requesting update to delete node " << *Walker << ".");
    336   Changes->addUpdate(Walker, 0, boost::bind(&LinkedCell_Model::deleteNode_internal, this, _1), "delete");
     335  LOG(2, "INFO: Deleting node " << *Walker << ".");
     336  deleteNode_internal(Walker);
     337  Changes->removeUpdates(Walker);
    337338}
    338339
  • src/LinkedCell/LinkedCell_Model_changeModel.cpp

    ref0f8f rf3eb6a  
    9393}
    9494
     95/**
     96 * Removes all contained updates for a specific tesselpoint.
     97 *
     98 */
     99void LinkedCell::LinkedCell_Model::changeModel::removeUpdates(const TesselPoint *Walker)
     100{
     101  queue.erase(Walker);
     102}
     103
    95104/** Empties changeModel::queue by performing all update functions.
    96105 *
  • src/LinkedCell/LinkedCell_Model_changeModel.hpp

    ref0f8f rf3eb6a  
    4646        const std::string name=""
    4747        );
     48
     49    void removeUpdates(const TesselPoint *Walker);
    4850  private:
    4951    //!> grant LinkedCell_Model access to bind LinkedCellArrayCache to update funcation
Note: See TracChangeset for help on using the changeset viewer.