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