diff --git a/source/trunk/include/CLASSBackEnd.hxx b/source/trunk/include/CLASSBackEnd.hxx index 451866eca913b10fd6b5efbea137364a30514690..334e95ecd40d5bb0ff54e737d857871e793bdba7 100644 --- a/source/trunk/include/CLASSBackEnd.hxx +++ b/source/trunk/include/CLASSBackEnd.hxx @@ -120,6 +120,8 @@ class CLASSBackEnd : public CLASSFacility \name BackEndFacility specific Method */ //@{ + virtual void ApplyZAIThreshold(int z = 90); //!< Put all nuclei below the threshold in -2 -2 -2 ZAI... + virtual void AddIV(IsotopicVector isotopicvector); //!< Add an Isotopicvector to the IVArray void ClearIVArray(); //!< Empty the IVArray removing all fuel stored diff --git a/source/trunk/include/CLASSFacility.hxx b/source/trunk/include/CLASSFacility.hxx index 9897e97b29f524b3ae61106853ef8e73a46f5378..8950b40a20ea16961799d840e181e074bd0c5a17 100644 --- a/source/trunk/include/CLASSFacility.hxx +++ b/source/trunk/include/CLASSFacility.hxx @@ -172,7 +172,7 @@ public : \name Evolution Method */ //@{ - + virtual void ApplyZAIThreshold(int z = 90); //!< Put all nuclei below the threshold in -2 -2 -2 ZAI... void AddCumulativeIVIn(IsotopicVector IV) { fCumulativeIVIn += IV;} //!< Add the Input IsotopicVector in the cumulative IV IN void AddCumulativeIVOut(IsotopicVector IV) { fCumulativeIVOut += IV;} //!< Add the Input IsotopicVector in the cumulative IV OUT virtual void Evolution(cSecond t) = 0; //!< Performs the Evolution to time t diff --git a/source/trunk/include/IsotopicVector.hxx b/source/trunk/include/IsotopicVector.hxx index 908bd938172ec4b7e367a816bfb9fb05842cfb92..ca84b3f90a3bf58fa4fb603507915d8ea69d7fc0 100755 --- a/source/trunk/include/IsotopicVector.hxx +++ b/source/trunk/include/IsotopicVector.hxx @@ -119,6 +119,7 @@ public : void Multiply(double factor); //!< Multiply the IV by a Factor + void ApplyZAIThreshold(int z = 90); //!< Put all nuclei below the threshold in -2 -2 -2 ZAI... IsotopicVector& operator+=(IsotopicVector const& IVb); //!< Operator += definition IsotopicVector& operator-=(IsotopicVector const& IVb); //!< Operator -= definition diff --git a/source/trunk/include/Scenario.hxx b/source/trunk/include/Scenario.hxx index c2d2603d6281270f89da1e1fe82c953b1e42d2f7..42b15471c007f5dc834d05ed3f7913646f0272a4 100755 --- a/source/trunk/include/Scenario.hxx +++ b/source/trunk/include/Scenario.hxx @@ -159,7 +159,11 @@ class Scenario : public CLASSObject //} //@} - void SetLogTimeStep(bool val = true) {fLogTimeStep = true;} + void SetLogTimeStep(bool val = true) { fLogTimeStep = true; } + + + void SetZAIThreshold(int z = 90) { fZAIThreshold = z;} + //********* Add Method *********// /*! @@ -225,6 +229,8 @@ class Scenario : public CLASSObject void AddWaste(IsotopicVector isotopicvector) { fWaste.Add(isotopicvector); } //!< Add a isotopicVector to Waste void AddToPower(double power) { fParcPower += power;} //!< Add power to the installed power in the Parc + + void ApplyZAIThreshold(); //@} @@ -269,6 +275,8 @@ class Scenario : public CLASSObject /// \li 16 fuel Fabrication + int fZAIThreshold; ///< + vector<Storage*> fStorage; ///< Vector of Storages vector<Pool*> fPool; ///< Vector of Pool vector<Reactor*> fReactor; ///< Vector of Reactor diff --git a/source/trunk/src/CLASSBackEnd.cxx b/source/trunk/src/CLASSBackEnd.cxx index faf588e856e6850a32a33351c188a62d6935efeb..37c5659f23b61eea7d2f26903417434428a69f2c 100644 --- a/source/trunk/src/CLASSBackEnd.cxx +++ b/source/trunk/src/CLASSBackEnd.cxx @@ -94,6 +94,18 @@ IsotopicVector CLASSBackEnd::GetDecay(IsotopicVector isotopicvector, cSecond t) } +void CLASSBackEnd::ApplyZAIThreshold(int z) +{ + fInsideIV.ApplyZAIThreshold(z); + fCumulativeIVIn.ApplyZAIThreshold(z); + fCumulativeIVOut.ApplyZAIThreshold(z); + + for(int i = 0; i < (int)fIVArray.size(); i++) + fIVArray[i].ApplyZAIThreshold(z); + +} + + map<cSecond,int> CLASSBackEnd::GetTheBackEndTimePath() { DBGL diff --git a/source/trunk/src/CLASSFacility.cxx b/source/trunk/src/CLASSFacility.cxx index 8ced5b7dadba4edefd3f2738bd40c243f59e4478..eca60a50e3083689fb8de31defa0509e88d362fc 100644 --- a/source/trunk/src/CLASSFacility.cxx +++ b/source/trunk/src/CLASSFacility.cxx @@ -78,4 +78,14 @@ CLASSFacility::CLASSFacility(CLASSLogger* log, cSecond creationtime, cSecond lif fCreationTime = creationtime; fLifeTime = lifetime; +} + + + +void CLASSFacility::ApplyZAIThreshold(int z) +{ + fInsideIV.ApplyZAIThreshold(z); + fCumulativeIVIn.ApplyZAIThreshold(z); + fCumulativeIVOut.ApplyZAIThreshold(z); + } \ No newline at end of file diff --git a/source/trunk/src/IsotopicVector.cxx b/source/trunk/src/IsotopicVector.cxx index 0dd045e76fe50e65a997ea9b8383eb9df88f7ea8..cbf0cb568813d6d79413556bd9ea004c2b4bac3f 100755 --- a/source/trunk/src/IsotopicVector.cxx +++ b/source/trunk/src/IsotopicVector.cxx @@ -432,6 +432,31 @@ void IsotopicVector::Remove(const IsotopicVector& isotopicvector) } +//________________________________________________________________________ + +void IsotopicVector::ApplyZAIThreshold(int z) +{ + map<ZAI ,double> cleanedIsotopicQuantity; + cleanedIsotopicQuantity.insert( pair<ZAI ,double>(ZAI(-2,-2,-2), 0)); + + map<ZAI ,double> isotopicquantity = (*this).GetIsotopicQuantity(); + map<ZAI ,double >::iterator it; + for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++) + { + if( (*it).first.Z() < z) + cleanedIsotopicQuantity[ZAI(-2,-2,-2)] += (*it).second; + else + cleanedIsotopicQuantity.insert(*it); + + } + + fIsotopicQuantity = cleanedIsotopicQuantity; + +} + + + + //________________________________________________________________________ void IsotopicVector::Need(const ZAI& zai, double quantity) { diff --git a/source/trunk/src/Scenario.cxx b/source/trunk/src/Scenario.cxx index 7c6b1c327ffc6f51fd2ff49348c485ab67ec065d..42449cc84d3a3e293bdc5517f8753b3ce7a86c7d 100755 --- a/source/trunk/src/Scenario.cxx +++ b/source/trunk/src/Scenario.cxx @@ -64,6 +64,7 @@ Scenario::Scenario(CLASSLogger* log, cSecond abstime):CLASSObject(log) fParcPower = 0; + fZAIThreshold = -1; // Warning @@ -99,6 +100,7 @@ Scenario::Scenario( cSecond abstime, CLASSLogger* log):CLASSObject(log) fParcPower = 0; + fZAIThreshold = -1; // Warning @@ -133,6 +135,7 @@ Scenario::Scenario( cSecond abstime ):CLASSObject(new CLASSLogger("CLASS_OUTPUT. fParcPower = 0; + fZAIThreshold = -1; // Warning @@ -670,6 +673,9 @@ void Scenario::Evolution(cSecond t) { #pragma omp single { + if(fZAIThreshold != -1) + ApplyZAIThreshold(); + UpdateParc(); fOutT->Fill(); ProgressPrintout( (cSecond)t); @@ -715,6 +721,30 @@ void Scenario::ProgressPrintout(cSecond t) //________________________________________________________________________ //______________________________ Out Method ______________________________ //________________________________________________________________________ + +void Scenario::ApplyZAIThreshold() +{ + for(int i =0; i < (int)fFabricationPlant.size(); i++) + fFabricationPlant[i]->ApplyZAIThreshold(fZAIThreshold); + + for(int i = 0; i < (int) fPool.size();i++) + fPool[i]->ApplyZAIThreshold(fZAIThreshold); + + for(int i = 0; i < (int)fStorage.size(); i++) + fStorage[i]->ApplyZAIThreshold(fZAIThreshold); + + for(int i = 0; i < (int)fReactor.size(); i++) + fReactor[i]->ApplyZAIThreshold(fZAIThreshold); + + + fWaste.ApplyZAIThreshold(fZAIThreshold); + + +} + + + + void Scenario::UpdateParc() {