~esys-p-dev/esys-particle/2.2.2

« back to all changes in this revision

Viewing changes to pis/pi_storage_ed_t.hpp

  • Committer: Steffen Abe
  • Date: 2013-07-25 12:54:49 UTC
  • Revision ID: s.abe@igem-energie.de-20130725125449-932149gc5zvff4gt
Part I of the fix for the exclusion bug. Fixes the issue for frictional interaction groups (pi_storage_ed - tested) and elastic interaction groups (pi_storage_ne). Still to do for mesh interactions (mesh2d_pis, trimesh_pis)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        int id2=iter->second->getID();
82
82
        tv.push_back(id1);
83
83
        tv.push_back(id2);
84
 
        if(this->m_exIG!=NULL){ // if there is an ExIG
85
 
          if((!(this->m_exIG)->isIn(tv))&&(!this->isIn(tv))){  // if not already in or in ExIG
86
 
            this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
87
 
            this->m_set.insert(make_pair(id1,id2));
88
 
            count_l++;
89
 
          }
90
 
        } else if (!(this->isIn(tv))) { // if no ExIG -> check only if alrady in
 
84
 
 
85
        if((!(this->isExcluded(tv)))&&(!this->isIn(tv))){  // if not already in or in ExIG
91
86
          this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
92
87
          this->m_set.insert(make_pair(id1,id2));
 
88
          count_l++;
93
89
        }
94
90
      }
95
91
    }
122
118
        int id2=iter->second->getID();
123
119
        tv.push_back(id1);
124
120
        tv.push_back(id2); 
125
 
        if(this->m_exIG!=NULL){
126
 
          if((!(this->m_exIG)->isIn(tv))&&(!(this->isIn(tv)))) {
127
 
            this->m_interactions.push_back(InteractionType(iter->first,iter->second, this->m_param));
128
 
            this->m_set.insert(make_pair(id1,id2));
129
 
            count_l++;
130
 
          }
131
 
        } else if (!(this->isIn(tv))) {
132
 
          this->m_interactions.push_back(InteractionType(iter->first,iter->second,this->m_param));
 
121
        if((!(this->isExcluded(tv)))&&(!(this->isIn(tv)))) {
 
122
          this->m_interactions.push_back(InteractionType(iter->first,iter->second, this->m_param));
133
123
          this->m_set.insert(make_pair(id1,id2));
 
124
          count_l++;
134
125
        }
135
126
      }
136
127
    }