ENH: createZeroFolder - updated to use central file path

This commit is contained in:
andy
2014-01-23 13:15:32 +00:00
parent e20845b31a
commit cb3a7eaecc
3 changed files with 14 additions and 7 deletions

View File

@ -213,14 +213,14 @@ int main(int argc, char *argv[])
)
);
fileName baseDir("${WM_PROJECT_USER_DIR}/etc/templates");
fileName baseDir("${WM_PROJECT_DIR}/etc/templates");
baseDir.expand();
// read the solver
const word& solverName = controlDict.lookup("application");
// generate solver template
const solverTemplate solver(runTime, solverName);
const solverTemplate solver(baseDir, runTime, solverName);
// read the boundary condition templates
const boundaryTemplates bcTemplates

View File

@ -186,11 +186,15 @@ Foam::dictionary Foam::solverTemplate::readFluidFieldTemplates
"const Time&"
") const"
)
<< "Unhandled turbulence model option"
<< "Unhandled turbulence model option. Valid options are "
<< "turbulenceModel, RASModel, LESModel"
<< abort(FatalError);
}
}
Info<< " Selecting " << turbulenceType << ": " << turbulenceModel
<< endl;
IOdictionary turbModelDict
(
IOobject
@ -271,6 +275,7 @@ void Foam::solverTemplate::setRegionProperties
Foam::solverTemplate::solverTemplate
(
const fileName& baseDir,
const Time& runTime,
const word& solverName
)
@ -282,9 +287,6 @@ Foam::solverTemplate::solverTemplate
fieldTypes_(),
fieldDimensions_()
{
fileName baseDir("${WM_PROJECT_USER_DIR}/etc/templates");
baseDir.expand();
IOdictionary solverDict
(
IOobject

View File

@ -135,7 +135,12 @@ private:
public:
//- Constructor
solverTemplate(const Time& runTime, const word& regionName);
solverTemplate
(
const fileName& baseDir,
const Time& runTime,
const word& regionName
);
// Public member functions