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(); baseDir.expand();
// read the solver // read the solver
const word& solverName = controlDict.lookup("application"); const word& solverName = controlDict.lookup("application");
// generate solver template // generate solver template
const solverTemplate solver(runTime, solverName); const solverTemplate solver(baseDir, runTime, solverName);
// read the boundary condition templates // read the boundary condition templates
const boundaryTemplates bcTemplates const boundaryTemplates bcTemplates

View File

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

View File

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