diff --git a/source/branches/BaM_Dev/Model/Irradiation/IM_Matrix.cxx b/source/branches/BaM_Dev/Model/Irradiation/IM_Matrix.cxx index 8b0fcd201c43f392a8965ec29d75b183ee22c59f..0f81e9fcc1ca60ebc16a4e0b61166831546f8c3c 100644 --- a/source/branches/BaM_Dev/Model/Irradiation/IM_Matrix.cxx +++ b/source/branches/BaM_Dev/Model/Irradiation/IM_Matrix.cxx @@ -259,10 +259,10 @@ EvolutionData IM_Matrix::GenerateEvolutionData(IsotopicVector isotopicvector, Ev } GeneratedDB.NucleiInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NMatrix.size(), timevector, ZAIQuantity))); - GeneratedDB.FissionXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, FissionXS))); +/* GeneratedDB.FissionXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, FissionXS))); GeneratedDB.CaptureXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, CaptureXS))); GeneratedDB.n2nXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, n2nXS))); - } +*/ } GeneratedDB.SetPower(Power ); GeneratedDB.SetHeavyMetalMass(M); diff --git a/source/branches/BaM_Dev/Model/Irradiation/IM_RK4.cxx b/source/branches/BaM_Dev/Model/Irradiation/IM_RK4.cxx index 8fe82f0cc964985b5ce649dcdd8750d60b718200..b79adb743f7d65f0be0f2183822d8b71fabc942d 100644 --- a/source/branches/BaM_Dev/Model/Irradiation/IM_RK4.cxx +++ b/source/branches/BaM_Dev/Model/Irradiation/IM_RK4.cxx @@ -248,10 +248,10 @@ EvolutionData IM_RK4::GenerateEvolutionData(IsotopicVector isotopicvector, Evolu } GeneratedDB.NucleiInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NMatrix.size(), timevector, ZAIQuantity))); - GeneratedDB.FissionXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, FissionXS))); +/* GeneratedDB.FissionXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, FissionXS))); GeneratedDB.CaptureXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, CaptureXS))); GeneratedDB.n2nXSInsert(pair<ZAI, TGraph*> (fReverseMatrixIndex[i], new TGraph(NStep, timevector, n2nXS))); - } +*/ } DBGL GeneratedDB.SetPower(Power ); GeneratedDB.SetHeavyMetalMass(M); diff --git a/source/branches/BaM_Dev/include/EvolutionData.hxx b/source/branches/BaM_Dev/include/EvolutionData.hxx index df13f19c842e914258dbe9b546b4bc8e7c085e40..94be6c6e1189f2eeb9f8e43dab4f406bb7973c87 100755 --- a/source/branches/BaM_Dev/include/EvolutionData.hxx +++ b/source/branches/BaM_Dev/include/EvolutionData.hxx @@ -116,6 +116,9 @@ public : In some case needed to be called to avoid memory leaks. */ void DeleteEvolutionData(); + + void DeleteEvolutionDataCopy(); + //} //@} diff --git a/source/branches/BaM_Dev/src/EvolutionData.cxx b/source/branches/BaM_Dev/src/EvolutionData.cxx index a71bd88f718f7e090ca34ae66098bce5062bd7f2..8d0b1154e26b35185a792c2f3d259f41c98ccdeb 100755 --- a/source/branches/BaM_Dev/src/EvolutionData.cxx +++ b/source/branches/BaM_Dev/src/EvolutionData.cxx @@ -350,6 +350,7 @@ EvolutionData::EvolutionData():CLASSObject() fCycleTime = 0; fKeff = 0; fFlux = 0; + fDB_file = ""; } //________________________________________________________________________ @@ -360,6 +361,7 @@ EvolutionData::EvolutionData(CLASSLogger* log):CLASSObject(log) fCycleTime = 0; fKeff = 0; fFlux = 0; + fDB_file = ""; } //________________________________________________________________________ @@ -410,7 +412,7 @@ EvolutionData::EvolutionData(bool oldread, CLASSLogger* log, string DB_file, boo //________________________________________________________________________ EvolutionData::~EvolutionData() { - + } //________________________________________________________________________ void EvolutionData::DeleteEvolutionData() @@ -450,10 +452,56 @@ void EvolutionData::DeleteEvolutionData() fFlux = 0; fKeff = 0; + } +//________________________________________________________________________ +void EvolutionData::DeleteEvolutionDataCopy() +{ + + if(fDB_file=="") + { + map<ZAI ,TGraph* >::iterator it_del; + + for( it_del = fInventoryEvolution.begin(); it_del != fInventoryEvolution.end(); it_del++) + { + delete (*it_del).second; + (*it_del).second = 0; + } + for( it_del = fFissionXS.begin(); it_del != fFissionXS.end(); it_del++) + { + delete (*it_del).second; + (*it_del).second = 0; + } + for( it_del = fCaptureXS.begin(); it_del != fCaptureXS.end(); it_del++) + { + delete (*it_del).second; + (*it_del).second = 0; + } + for( it_del = fn2nXS.begin(); it_del != fn2nXS.end(); it_del++) + { + delete (*it_del).second; + (*it_del).second = 0; + } + + + delete fKeff; + delete fFlux; + + fInventoryEvolution.clear(); + fFissionXS.clear(); + fCaptureXS.clear(); + fn2nXS.clear(); + + fFlux = 0; + fKeff = 0; + } + + +} + bool EvolutionData::NucleiInsert(pair<ZAI, TGraph*> zaitoinsert) { diff --git a/source/branches/BaM_Dev/src/FabricationPlant.cxx b/source/branches/BaM_Dev/src/FabricationPlant.cxx index 3043bc3ba2d245747ce6e3b0418db27454d97d3f..b76ba2a32db1cbe98dfcc40ee2da47ed03d0094e 100644 --- a/source/branches/BaM_Dev/src/FabricationPlant.cxx +++ b/source/branches/BaM_Dev/src/FabricationPlant.cxx @@ -527,7 +527,7 @@ DBGL (*it2).second = IV; map< int,EvolutionData >::iterator it = fReactorFuturDB.find(Id); - (*it).second = EvolutionData(); + (*it).second.DeleteEvolutionDataCopy(); UpdateInsideIV(); DBGL diff --git a/source/branches/BaM_Dev/src/Reactor.cxx b/source/branches/BaM_Dev/src/Reactor.cxx index c49d26cc637d0fe8a8274dfb0707715684aa2354..5e21dee9430628bef5a99e2da6a2df4a3d35c8b6 100755 --- a/source/branches/BaM_Dev/src/Reactor.cxx +++ b/source/branches/BaM_Dev/src/Reactor.cxx @@ -243,7 +243,7 @@ Reactor::Reactor(CLASSLogger* log, EvolutionData* evolutivedb, { DBGL (*this).SetName("R_Reactor."); - + fIsStarted = false; fIsShutDown = false; @@ -284,8 +284,7 @@ Reactor::Reactor(CLASSLogger* log, EvolutionData* evolutivedb, INFO << "\t The Cycle Time set at\t " << ((double)fCycleTime)/((double)cYear) << " year" << endl; INFO << "\t The Effective Thermal Power is \t " << (double)(fPower *1e-6) << " MW (with Full Power " << power << " and " << CapacityFactor << " capacity factor)"<< endl; INFO << "\t The Heavy Metal Mass in the Core set at " << (double)(fHeavyMetalMass) << " tons" << endl << endl; - - + DBGL } @@ -399,6 +398,9 @@ void Reactor::SetBurnUp(double BU) void Reactor::SetEvolutionDB(EvolutionData evolutionDB) { DBGL + + //fEvolutionDB.DeleteEvolutionDataCopy(); + double M0 = cZAIMass.GetMass( evolutionDB.GetIsotopicVectorAt(0.).GetActinidesComposition() ); fEvolutionDB = evolutionDB * (fHeavyMetalMass/M0); diff --git a/source/branches/BaM_Dev/src/XSModel.cxx b/source/branches/BaM_Dev/src/XSModel.cxx index 97e3f5a0c341ef0cb0e4ee0abc8a1d60296ef082..8ca202826c8b8b34052f8025dd558dd274482edc 100644 --- a/source/branches/BaM_Dev/src/XSModel.cxx +++ b/source/branches/BaM_Dev/src/XSModel.cxx @@ -19,6 +19,8 @@ using namespace std; XSModel::XSModel():CLASSObject() { XSModel::LoadKeyword(); +// freaded = false; + } @@ -26,6 +28,7 @@ XSModel::XSModel(CLASSLogger* log):CLASSObject(log) { XSModel::LoadKeyword(); +// freaded = false; }