From bfa3100323176eef3bf3396e67c863c82a6c56bd Mon Sep 17 00:00:00 2001
From: Baptiste LENIAU <baptiste.leniau@subatech.in2p3.fr>
Date: Thu, 15 Jan 2015 18:50:26 +0000
Subject: [PATCH] Correct a huge bug leadings CLASS to fill a PWR MOX with 100%
 Pu !!

git-svn-id: svn+ssh://svn.in2p3.fr/class@462 0e7d625b-0364-4367-a6be-d5be4a48d228
---
 .../branches/CLASSV3/include/FabricationPlant.hxx |  1 +
 source/branches/CLASSV3/src/FabricationPlant.cxx  | 15 ++++++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/source/branches/CLASSV3/include/FabricationPlant.hxx b/source/branches/CLASSV3/include/FabricationPlant.hxx
index fd829804d..0b2684f38 100644
--- a/source/branches/CLASSV3/include/FabricationPlant.hxx
+++ b/source/branches/CLASSV3/include/FabricationPlant.hxx
@@ -184,6 +184,7 @@ protected :
 	bool	fSubstitutionFuel;		//!< true if a subtitution fuel as been set
 
 	void	FabricationPlantEvolution(cSecond t);	//!< Deal the FabricationPlant Evolution
+	void 	ResetArrays(); //!< empty the fFertileArray and fFissileArray
 
 
 #ifndef __CINT__
diff --git a/source/branches/CLASSV3/src/FabricationPlant.cxx b/source/branches/CLASSV3/src/FabricationPlant.cxx
index 5abc02eff..804ba2e5f 100644
--- a/source/branches/CLASSV3/src/FabricationPlant.cxx
+++ b/source/branches/CLASSV3/src/FabricationPlant.cxx
@@ -253,6 +253,7 @@ void FabricationPlant::BuildFuelForReactor(int ReactorId, cSecond t)
 				if(!IResult.second)
 					IResult.first->second = EmptyIV;
 			}
+			ResetArrays();
 		}
 		else
 		{
@@ -563,8 +564,15 @@ DBGL
 	else
 		GetParc()->AddOutIncome( fFertileArray[0]*LambdaArray.back() );
 
+	ResetArrays();
 
-	//Clear the Building Array (Fissile and Fertile)
+
+DBGL
+}
+//________________________________________________________________________
+void FabricationPlant::ResetArrays()
+{
+		//Clear the Building Array (Fissile and Fertile)
 	fFissileArray.clear();
 	fFissileArrayTime.clear();
 	fFissileArrayAdress.clear();
@@ -573,11 +581,8 @@ DBGL
 	fFertileArrayAdress.clear();
 
 	fFertileList = fFissileList = IsotopicVector();
-
-DBGL
 }
-
-	//________________________________________________________________________
+//________________________________________________________________________
 pair<IsotopicVector, IsotopicVector> FabricationPlant::Separation(IsotopicVector isotopicvector, IsotopicVector ExtractedList)
 {
 DBGL
-- 
GitLab