        HRR = 0; //initialize heat release rate [J/deg]
                
        forAll(rho, celli)//before 2012.10.19//?¬ê¸°?~\ ê³~D???~A?¹í~^~H ?~P?¤ì§„??.
        {
                if(F_total[celli] > 0)
                {
			scalarField Ytemp(Ysize, 0.0);
			
                        for(label i=0 ; i < Ysize ; i++) //reaction rate integration over an eta-space for species i
                        {
        			for(label k=0 ; k<=group ; k++)
        			{
					for(label j=0 ; j<= etamax ; j++)
					{
						pdf[j] = Peta[j][celli];
						f[j] = QiCMC[(k*(etamax+1)+j)*Ysize + i];
					}
					Ytemp[i] += Ffrac[k][celli]*integration(deltaftn[celli], MFcut, Neta, pdf, f);
                		}
        		}

                        if( Ytemp[o2index] > Y[o2index][celli] || Ytemp[fuelindex] > Y[fuelindex][celli])
                        {
                                SUMSh[celli] = 0;
                                //keep Yi value
                        }
                        else
                        {
                                scalarField ReactionRate(Ysize, 0.0);
                                scalar tShtemp(0);

                                for(label i = 0 ; i<Ysize ; i++)
                                {
                                        ReactionRate[i] = rho[celli] * (Ytemp[i] - Y[i][celli]) / runTime.deltaT().value();
                                        tShtemp -= chemistry->calculateShCMC( ReactionRate , i);
                                }
                                SUMSh[celli] = tShtemp;

                                for(label i = 0 ; i <Ysize ; i++)
                                {
                                        Y[i][celli] = Ytemp[i];
                                }

                                //Info<<SUMSh[celli]<<tab<<Ytemp[0]<<tab<<Ybackup[0][celli]<<endl;
                        }
                }
                else
                {
                        SUMSh[celli] = 0;
                }
        }
 
        //HRR = sum(SUMSh*cellVolume).value()* runTime.deltaT().value() / runTime.deltaTheta() ;//[J/m3/sec* m3 * delta sec / delta deg = J/deg ]

/*
        forAll(rho, celli)//before 2012.10.19//?¬ê¸°?~\ ê³~D???~A?¹í~^~H ?~P?¤ì§„??.
        {
                if(F_total[celli] != 0)
                {                               
                        scalarField Ytemp(Ysize, 0.0);
                        for(label i=0 ; i < Ysize ; i++) //reaction rate integration over an eta-space for species i
                        {
                                for(label k=0 ; k<nf ; k++)
                                {               
                                        for(label j=0 ; j<=etamax ; j++)
                                        {
                                                Ytemp[i]  +=  (F[k][celli]/ F_total[celli] ) * Peta[j][celli] * QiCMC[(k*(etamax+1)+j)*Ysize + i]  * deta[j] ;      
                                        }
                                }       
                        }

                        if( Ytemp[temo2] > Y[temo2][celli] || Ytemp[temhep] > Y[temhep][celli])
                        //if( Ytemp[0] > Y[0][celli])
                        {
                                SUMSh[celli] = 0;
                                //keep Yi value
                        }
                        else
                        {               
                                for(label i = 0 ; i <Ysize ; i++)
                                {
                                        Y[i][celli] = Ytemp[i];
                                }

                                scalarField ReactionRate(Ysize, 0.0);
                                scalar tShtemp(0);

                                for(label i = 0 ; i<Ysize ; i++)
                                {
                                        ReactionRate[i] = rho[celli] * (Y[i][celli] - Ybackup[i][celli]) / runTime.deltaT().value();
        
                                        tShtemp -= chemistry.ShCMC( ReactionRate , i);
                                }

                                SUMSh[celli] = tShtemp;
                                //Info<<SUMSh[celli]<<tab<<Ytemp[0]<<tab<<Ybackup[0][celli]<<endl;
                        }
                }
                else
                {
                        SUMSh[celli] = 0;
                }
                HRR += SUMSh[celli]*mesh.V()[celli]* runTime.deltaT().value() / runTime.deltaTheta() ;//[J/m3/sec* m3 * delta sec / delta deg = J/deg ]

        }
*/
