예제 #1
0
파일: stepped.cpp 프로젝트: herbsolo/DynamO
void
IStepped::checkOverlaps(const Particle& part1, const Particle& part2) const
{
  const_cmap_it capstat = getCMap_it(part1,part2);

  if (captureTest(part1,part2) != capstat->second)
    derr << "Particle " << part1.getID() << " and Particle " << part2.getID()
	 << "\nFailing as captureTest gives " << captureTest(part1,part2)
	 << "\nAnd recorded value is " << capstat->second << std::endl;
}
예제 #2
0
  void 
  IMultiCapture::initCaptureMap(const std::vector<Particle>& particleList)
  {
    //If not loaded or invalidated
    if (noXmlLoad)
      {      
	captureMap.clear();
      
	for (std::vector<Particle>::const_iterator iPtr 
	       = particleList.begin();
	     iPtr != particleList.end(); iPtr++) 
	  for (std::vector<Particle>::const_iterator iPtr2 = iPtr + 1;
	       iPtr2 != particleList.end(); iPtr2++)
	    {
	      int capval = captureTest(*iPtr,*iPtr2);
	      if (captureTest(*iPtr,*iPtr2))
		captureMap[cMapKey(iPtr->getID(), iPtr2->getID())] 
		  = capval; 
	    }
      }
  }
예제 #3
0
 void 
 ICapture::testAddToCaptureMap(const Particle& p1, const size_t& p2)
 {
   size_t capval = captureTest(p1, Sim->particles[p2]);
   if (capval) Map::operator[](Map::key_type(p1.getID(), p2)) = capval;
 }
예제 #4
0
파일: captures.cpp 프로젝트: subratv/DynamO
void
IMultiCapture::testAddToCaptureMap(const Particle& p1, const size_t& p2) const
{
    int capval = captureTest(p1, Sim->particles[p2]);
    if (capval) captureMap[cMapKey(p1.getID(), p2)] = capval;
}