scalar eta_garbage;
word garbage;

IFstream restartFile
(
	latestCMCresults
);

word target_word = CMCresults_Time + " FG";
int find_target = -1;
while(find_target == -1)
{
	restartFile.getLine(garbage);
	find_target = garbage.find(target_word);
}

if(previousnf == nf)
{
	for(label k=0 ; k<nf ; k++)
	{

		for(label j=0 ; j<=etamax ; j++)
		{
			restartFile>>eta_garbage;
	
			for(label i=0 ; i<Ysize ; i++)
			{		
				restartFile>>QiCMC[(k*(etamax+1)+j)*Ysize+i];
			}
			restartFile>>QhCMC[j+k*(etamax+1)]>>TCMC[j+k*(etamax+1)]>>rhoCMC[j+k*(etamax+1)]>>SDRCMC[j+k*(etamax+1)];
		}
		restartFile.getLine(garbage);
		if(previousnf>1.5)
		{
			restartFile.getLine(garbage);	
		}
	}
	
	group = previousnf - 1;
}
if(previousnf != nf)
{
	//set initial flame structure by adiabatic mixing

	#include "QCMC_init.H"

	//read and replace flame structure of the previous flame group
	for(label k=0; k<previousnf ; k++)
	{

	        for(label j=0 ; j<=etamax ; j++)
	        {
	        	restartFile>>eta_garbage;
	                for(label i=0 ; i<Ysize ; i++)
	                {
		                restartFile>>QiCMC[(k*(etamax+1)+j)*Ysize+i];
	                }
	                restartFile>>QhCMC[j+k*(etamax+1)]>>TCMC[j+k*(etamax+1)]>>rhoCMC[j+k*(etamax+1)]>>SDRCMC[j+k*(etamax+1)];
	        }
		restartFile.getLine(garbage);
                if(previousnf>1.5)
                {
                        restartFile.getLine(garbage);
                }
	}
        group = previousnf - 1;
}

