Browse Source

optimize GB calculate method

gsp 1 year ago
parent
commit
53af01ecdd
1 changed files with 12 additions and 0 deletions
  1. 12 0
      OTSCPP/OTSRptCalculate/GBCal/GBFieldData.cpp

+ 12 - 0
OTSCPP/OTSRptCalculate/GBCal/GBFieldData.cpp

@@ -289,6 +289,10 @@ namespace OTSGBCalculate
 			{
 				continue;
 			}
+			if (pParticle->GetType() == OTS_PARTICLE_TYPE::ISNOT_INCLUTION)//here we take all the particles except Invalid.
+			{
+				continue;
+			}
 			auto w = pParticle->GetDMin();
 		
 			if (w == 0 )
@@ -538,6 +542,10 @@ namespace OTSGBCalculate
 			{
 				continue;
 			}
+			if (pParticle->GetType() == OTS_PARTICLE_TYPE::ISNOT_INCLUTION)//here we take all the particles except Invalid.
+			{
+				continue;
+			}
 			//check the denominator is zero or not
 			auto w = pParticle->GetDMin();
 
@@ -712,6 +720,10 @@ namespace OTSGBCalculate
 			{
 				continue;
 			}
+			if (pParticle->GetType() == OTS_PARTICLE_TYPE::ISNOT_INCLUTION)//here we take all the particles except Invalid.
+			{
+				continue;
+			}
 			auto w = pParticle->GetDMin();
 
 			if (w == 0)