[MOAB-dev] r5532 - MOAB/trunk/src/moab

iulian at mcs.anl.gov iulian at mcs.anl.gov
Wed May 23 16:30:09 CDT 2012


Author: iulian
Date: 2012-05-23 16:30:09 -0500 (Wed, 23 May 2012)
New Revision: 5532

Modified:
   MOAB/trunk/src/moab/ScdInterface.hpp
Log:
compute factors a little faster


Modified: MOAB/trunk/src/moab/ScdInterface.hpp
===================================================================
--- MOAB/trunk/src/moab/ScdInterface.hpp	2012-05-23 18:48:20 UTC (rev 5531)
+++ MOAB/trunk/src/moab/ScdInterface.hpp	2012-05-23 21:30:09 UTC (rev 5532)
@@ -783,11 +783,13 @@
     }
   else {
     std::vector<double> pfactors, ppfactors;
-    for (int i = 2; i <= np; i++) 
+    for (int i = 2; i <= np/2; i++) 
       if (!(np%i)) {
 	pfactors.push_back(i);
 	ppfactors.push_back(((double)(i*i))/np);
       }
+    pfactors.push_back(np);
+    ppfactors.push_back( (double)np);
     
     // ideally, Px/Py = I/J
     double ijratio = ((double)(gijk[3]-gijk[0]))/((double)(gijk[4]-gijk[1]));


































More information about the moab-dev mailing list