From 9914c941da39b790f65effbba118e00d1284248d Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 19 Oct 2011 18:26:37 +0100 Subject: [PATCH] ENH: streamLine: 'UName' instead of 'U' --- .../field/streamLine/controlDict | 2 +- .../field/streamLine/streamLine.C | 17 ++++++++++++++++- .../simpleFoam/motorBike/system/streamLines | 2 +- .../simpleFoam/pitzDaily/system/controlDict | 2 +- .../pitzDailyExptInlet/system/controlDict | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/postProcessing/functionObjects/field/streamLine/controlDict b/src/postProcessing/functionObjects/field/streamLine/controlDict index 048b7af4f33..4d51dd82e1f 100644 --- a/src/postProcessing/functionObjects/field/streamLine/controlDict +++ b/src/postProcessing/functionObjects/field/streamLine/controlDict @@ -60,7 +60,7 @@ functions setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; // Velocity field to use for tracking. - U U; + UName U; // Interpolation method. Default is cellPoint. See sampleDict. //interpolationScheme pointMVC; diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index ae902f9c54f..03a5b8b539c 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -318,7 +318,22 @@ void Foam::streamLine::read(const dictionary& dict) { //dict_ = dict; dict.lookup("fields") >> fields_; - UName_ = dict.lookupOrDefault<word>("U", "U"); + if (dict.found("UName")) + { + dict.lookup("UName") >> UName_; + } + else + { + UName_ = "U"; + if (dict.found("U")) + { + IOWarningIn("streamLine::read(const dictionary&)", dict) + << "Using deprecated entry \"U\"." + << " Please use \"UName\" instead." + << endl; + dict.lookup("U") >> UName_; + } + } dict.lookup("trackForward") >> trackForward_; dict.lookup("lifeTime") >> lifeTime_; if (lifeTime_ < 1) diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/streamLines b/tutorials/incompressible/simpleFoam/motorBike/system/streamLines index 1f9488d8c2f..82c3f1d68c2 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/streamLines +++ b/tutorials/incompressible/simpleFoam/motorBike/system/streamLines @@ -17,7 +17,7 @@ streamLines setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; // Velocity field to use for tracking. - U U; + UName U; // Tracked forwards (+U) or backwards (-U) trackForward true; diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict index a3baf4a417f..aaedd23dab9 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict @@ -61,7 +61,7 @@ functions setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; // Velocity field to use for tracking. - U U; + UName U; // Tracked forwards (+U) or backwards (-U) trackForward true; diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/controlDict b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/controlDict index 89dd2ff19ab..c2b5d2e493f 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/controlDict +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/controlDict @@ -61,7 +61,7 @@ functions setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; // Velocity field to use for tracking. - U U; + UName U; // Tracked forwards (+U) or backwards (-U) trackForward true; -- GitLab