STYLE: use <case> instead of $FOAM_CASE expansion in more places

This commit is contained in:
Mark Olesen
2018-10-15 21:19:13 +02:00
parent c6520033c9
commit 5c8a1b746d
11 changed files with 56 additions and 56 deletions

View File

@ -25,6 +25,7 @@ License
#include "noiseModel.H"
#include "functionObject.H"
#include "stringOps.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -140,17 +141,15 @@ Foam::label Foam::noiseModel::findStartTimeIndex
Foam::fileName Foam::noiseModel::baseFileDir(const label dataseti) const
{
fileName baseDir("$FOAM_CASE");
word datasetName("input" + Foam::name(dataseti));
baseDir =
baseDir.expand()
/functionObject::outputPrefix
/"noise"
/outputPrefix_
/type()
/datasetName;
return baseDir;
return
(
stringOps::expand("<case>") // ie, globalPath()
/ functionObject::outputPrefix
/ "noise"
/ outputPrefix_
/ type()
/ ("input" + Foam::name(dataseti))
);
}

View File

@ -25,6 +25,7 @@ License
#include "pointNoise.H"
#include "noiseFFT.H"
#include "stringOps.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -240,11 +241,13 @@ void pointNoise::calculate()
{
fileName fName = inputFileNames_[filei];
fName.expand();
if (!fName.isAbsolute())
{
fName = "$FOAM_CASE"/fName;
fName.expand();
// ie, globalPath() / name
fName = stringOps::expand("<case>")/fName;
}
Function1Types::CSV<scalar> data("pressure", dict_, fName);
processData(filei, data);
}

View File

@ -28,6 +28,7 @@ License
#include "surfaceWriter.H"
#include "noiseFFT.H"
#include "graph.H"
#include "stringOps.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -464,10 +465,11 @@ void surfaceNoise::calculate()
if (!fName.isAbsolute())
{
fName = "$FOAM_CASE"/fName;
// ie, globalPath() / name
fName = stringOps::expand("<case>")/fName;
}
initialise(fName.expand());
initialise(fName);
// Container for pressure time history data per face
List<scalarField> pData;