Skip to content
Snippets Groups Projects
Commit 7719a3c1 authored by BaM's avatar BaM
Browse files

working in progress.... (need to check it :p :)

git-svn-id: svn+ssh://svn.in2p3.fr/class@614 0e7d625b-0364-4367-a6be-d5be4a48d228
parent 9c29a3ae
No related branches found
No related tags found
No related merge requests found
...@@ -38,9 +38,13 @@ IM_Matrix_Decay::IM_Matrix_Decay(IsotopicVector IVList):IrradiationModel(new CLA ...@@ -38,9 +38,13 @@ IM_Matrix_Decay::IM_Matrix_Decay(IsotopicVector IVList):IrradiationModel(new CLA
fIVList = IVList; fIVList = IVList;
cout << "Loading Decay !! Could take few minutes... Please wait !!" << endl;
NuclearDataInitialization(); NuclearDataInitialization();
fExponentialDecayMatrix.Clear();
fExponentialDecayMatrix.ResizeTo( fMatrixIndex.size(), fMatrixIndex.size() );
fExponentialDecayMatrix = ExponentialCalculation(fDecayMatrix); fExponentialDecayMatrix = ExponentialCalculation(fDecayMatrix);
} }
...@@ -54,10 +58,16 @@ IM_Matrix_Decay::IM_Matrix_Decay(CLASSLogger* log, IsotopicVector IVList):Irradi ...@@ -54,10 +58,16 @@ IM_Matrix_Decay::IM_Matrix_Decay(CLASSLogger* log, IsotopicVector IVList):Irradi
cout << "laoding Decay !! Could take fiew minutes...." << endl;
NuclearDataInitialization(); NuclearDataInitialization();
fExponentialDecayMatrix = TMatrixT<double>(fReverseMatrixIndex.size(),fReverseMatrixIndex.size());
fExponentialDecayMatrix.Clear();
fExponentialDecayMatrix.ResizeTo( fMatrixIndex.size(), fMatrixIndex.size() );
fExponentialDecayMatrix = ExponentialCalculation(fDecayMatrix); fExponentialDecayMatrix = ExponentialCalculation(fDecayMatrix);
} }
...@@ -96,6 +106,7 @@ TMatrixT<double> IM_Matrix_Decay::ExponentialCalculation(TMatrixT<double> myMatr ...@@ -96,6 +106,7 @@ TMatrixT<double> IM_Matrix_Decay::ExponentialCalculation(TMatrixT<double> myMatr
for(int n = 0; n < (int)fReverseMatrixIndex.size(); n++) for(int n = 0; n < (int)fReverseMatrixIndex.size(); n++)
NormN += MatrixDLTermN[m][n]*MatrixDLTermN[m][n]; NormN += MatrixDLTermN[m][n]*MatrixDLTermN[m][n];
j++; j++;
cout << j << " " << NormN << endl;
} while ( NormN != 0 ); } while ( NormN != 0 );
} }
...@@ -151,7 +162,7 @@ IsotopicVector IM_Matrix_Decay::GetDecay(IsotopicVector Mother_IV, double time) ...@@ -151,7 +162,7 @@ IsotopicVector IM_Matrix_Decay::GetDecay(IsotopicVector Mother_IV, double time)
for(int j = 0; j < (int)fReverseMatrixIndex.size(); j++) for(int j = 0; j < (int)fReverseMatrixIndex.size(); j++)
for(int k = 0; k < (int)fReverseMatrixIndex.size(); k++) for(int k = 0; k < (int)fReverseMatrixIndex.size(); k++)
{ {
if(k == j) exp_T_Matrix[j][k] = exp(time); if(k == j) exp_T_Matrix[j][k] = exp(time/8E-23);
else exp_T_Matrix[j][k] = 0; else exp_T_Matrix[j][k] = 0;
} }
...@@ -316,7 +327,8 @@ void IM_Matrix_Decay::LoadDecay() ...@@ -316,7 +327,8 @@ void IM_Matrix_Decay::LoadDecay()
else else
{ {
fNormalDecay.Add( ParentZAI, DaughtersIV ); // FIll the NormalDecay with the daughter IV scaled by the decay constante. fNormalDecay.Add( ParentZAI, DaughtersIV ); // FIll the NormalDecay with the daughter IV scaled by the decay constante.
fDecayConstante += ParentZAI*log(2)/HalfLife; fDecayConstante += ParentZAI*log(2)/HalfLife*8E-23;
cout << log(2)/HalfLife*8E-23 << endl;
} }
} }
...@@ -354,6 +366,7 @@ void IM_Matrix_Decay::CleanDecay() ...@@ -354,6 +366,7 @@ void IM_Matrix_Decay::CleanDecay()
DBGL DBGL
map<ZAI, IsotopicVector> InitialNucleiFiliation = fNormalDecay.GetNucleiFIliation(); //! Map of all the pathway map<ZAI, IsotopicVector> InitialNucleiFiliation = fNormalDecay.GetNucleiFIliation(); //! Map of all the pathway
map<ZAI, IsotopicVector> CleanNucleiFiliation; map<ZAI, IsotopicVector> CleanNucleiFiliation;
map<ZAI, IsotopicVector> CleanNucleiFiliation_bis;
vector<ZAI> ZAIList = fIVList.GetZAIList(); vector<ZAI> ZAIList = fIVList.GetZAIList();
...@@ -365,12 +378,12 @@ void IM_Matrix_Decay::CleanDecay() ...@@ -365,12 +378,12 @@ void IM_Matrix_Decay::CleanDecay()
CleanNucleiFiliation.insert(*it); CleanNucleiFiliation.insert(*it);
} }
cout << "cleaned size "<< CleanNucleiFiliation.size() << endl; bool insertEnded = false;
bool insertEnded = true;
while(!insertEnded) while(!insertEnded)
{ {
for(it = CleanNucleiFiliation.begin(); it!=CleanNucleiFiliation.end(); it++) CleanNucleiFiliation_bis = CleanNucleiFiliation;
for(it = CleanNucleiFiliation_bis.begin(); it!=CleanNucleiFiliation_bis.end(); it++)
{ {
ZAIList = (*it).second.GetZAIList(); ZAIList = (*it).second.GetZAIList();
map<ZAI, IsotopicVector>::iterator it2; map<ZAI, IsotopicVector>::iterator it2;
...@@ -386,7 +399,7 @@ void IM_Matrix_Decay::CleanDecay() ...@@ -386,7 +399,7 @@ void IM_Matrix_Decay::CleanDecay()
} }
fNormalDecay.SetNucleiFIliation(CleanNucleiFiliation); fNormalDecay.SetNucleiFIliation(CleanNucleiFiliation);
cout << "out" << endl;
DBGL DBGL
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment