Adding check for template material availability.
This commit is contained in:
@ -151,16 +151,26 @@ int main(int argc, char *argv[])
|
||||
<< sourceDir << exit(FatalIOError);
|
||||
}
|
||||
|
||||
Info<< "\tCreating constant/" << regionName
|
||||
<< " directory with " << regionMaterial
|
||||
<< " material" << endl;
|
||||
cpFiles(constantDir/regionType, currentDir/"constant"/regionName);
|
||||
cpFiles(materialsDir/regionMaterial, currentDir/"constant"/regionName);
|
||||
const fileName matDir(materialsDir/regionMaterial);
|
||||
if (isDir(matDir))
|
||||
{
|
||||
Info<< "\tCreating constant/" << regionName
|
||||
<< " directory with " << regionMaterial
|
||||
<< " material" << endl;
|
||||
cpFiles(constantDir/regionType, currentDir/"constant"/regionName);
|
||||
cpFiles(matDir, currentDir/"constant"/regionName);
|
||||
|
||||
// system/<region>: from fluid or solid templ
|
||||
Info<< "\tCreating system/" << regionName
|
||||
<< " directory" << endl;
|
||||
cpFiles(systemDir/regionType, currentDir/"system"/regionName);
|
||||
// system/<region>: from fluid or solid templ
|
||||
Info<< "\tCreating system/" << regionName
|
||||
<< " directory" << endl;
|
||||
cpFiles(systemDir/regionType, currentDir/"system"/regionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), materialProperties)
|
||||
<< "Cannot find region material folder "
|
||||
<< regionMaterial << exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
regionProperties.add("regions", regionInfo);
|
||||
|
||||
Reference in New Issue
Block a user