Added optional field choice for deformedGeom
This commit is contained in:
parent
6a3e6f878c
commit
18de725d8f
2 changed files with 14 additions and 6 deletions
|
@ -44,6 +44,7 @@ int main(int argc, char *argv[])
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("scaling factor");
|
argList::validArgs.append("scaling factor");
|
||||||
|
argList::validOptions.insert("UName", "name");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
@ -51,6 +52,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
|
|
||||||
|
word UName("U");
|
||||||
|
args.optionReadIfPresent("UName", UName);
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
pointField zeroPoints(mesh.points());
|
pointField zeroPoints(mesh.points());
|
||||||
|
@ -65,7 +69,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
IOobject Uheader
|
IOobject Uheader
|
||||||
(
|
(
|
||||||
"U",
|
UName,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
|
@ -77,7 +81,7 @@ int main(int argc, char *argv[])
|
||||||
// Check U exists
|
// Check U exists
|
||||||
if (Uheader.headerOk())
|
if (Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info<< " Reading U" << endl;
|
Info<< " Reading " << UName << endl;
|
||||||
volVectorField U(Uheader, mesh);
|
volVectorField U(Uheader, mesh);
|
||||||
|
|
||||||
pointField newPoints =
|
pointField newPoints =
|
||||||
|
@ -90,7 +94,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< " No U" << endl;
|
Info<< " No " << UName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
|
@ -49,6 +49,7 @@ int main(int argc, char *argv[])
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("scaling factor");
|
argList::validArgs.append("scaling factor");
|
||||||
|
argList::validOptions.insert("UName", "name");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
@ -56,6 +57,9 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])()));
|
scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||||
|
|
||||||
|
word UName("U");
|
||||||
|
args.optionReadIfPresent("UName", UName);
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
tetPolyMesh tetMesh(mesh);
|
tetPolyMesh tetMesh(mesh);
|
||||||
|
@ -72,7 +76,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
IOobject Uheader
|
IOobject Uheader
|
||||||
(
|
(
|
||||||
"U",
|
UName,
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ
|
IOobject::MUST_READ
|
||||||
|
@ -81,7 +85,7 @@ int main(int argc, char *argv[])
|
||||||
// Check U exists
|
// Check U exists
|
||||||
if (Uheader.headerOk())
|
if (Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info<< " Reading U" << endl;
|
Info<< " Reading " << UName << endl;
|
||||||
tetPointVectorField U(Uheader, tetMesh);
|
tetPointVectorField U(Uheader, tetMesh);
|
||||||
|
|
||||||
vectorField Uslice
|
vectorField Uslice
|
||||||
|
@ -101,7 +105,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< " No U" << endl;
|
Info<< " No " << UName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
Reference in a new issue