From a1936ae38c162bce9d4fdd0d3ece6620b622022c Mon Sep 17 00:00:00 2001
From: marc ernoult <ernoult@ipno.in2p3.fr>
Date: Thu, 6 Jun 2013 13:13:37 +0000
Subject: [PATCH] Modifiing the Power calculation, so when a reactor doesn't
 start because it cna't find the needed fuel, the power is reduce adequatly

by Marc


git-svn-id: svn+ssh://svn.in2p3.fr/class@92 0e7d625b-0364-4367-a6be-d5be4a48d228
---
 source/trunk/src/Reactor.cxx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/source/trunk/src/Reactor.cxx b/source/trunk/src/Reactor.cxx
index 0a899f9e2..74153ca56 100755
--- a/source/trunk/src/Reactor.cxx
+++ b/source/trunk/src/Reactor.cxx
@@ -335,8 +335,15 @@ void Reactor::Evolution(cSecond t)
 	if( fShutDown == true || t < fCreationTime ) return; // Reactor stop or not started...
 
 #pragma omp critical(ParcPowerUpdate)
-	{fParc->AddToPower(fPower);}
-	
+	if(Norme(fIVReactor)!=0){
+		fParc->AddToPower(fPower);
+	}
+	else if(fIsStarted==true){
+	fLog->fLog << "!!Warning!! !!!Reactor!!!"
+		   << " Reactor should be working but there is no Heavy Nucleus Inside. It's not working so have a zero power..."
+		   << " Time : "<< t/365.25/3600/24 << " years" << endl;	
+	}
+
 	
 	if( t == fInternalTime && t!=0 ) return
 	DBGL;
-- 
GitLab