mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
adjust solvers and utilities to use new argList methods
- also drop various unused time options from src/OpenFOAM/include
This commit is contained in:
@ -144,7 +144,7 @@ int main(int argc, char *argv[])
|
||||
argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)");
|
||||
argList::validOptions.insert("rotateFields", "");
|
||||
argList::validOptions.insert("scale", "vector");
|
||||
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -171,18 +171,18 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if (args.options().found("translate"))
|
||||
if (args.optionFound("translate"))
|
||||
{
|
||||
vector transVector(IStringStream(args.options()["translate"])());
|
||||
vector transVector(args.optionLookup("translate")());
|
||||
|
||||
Info<< "Translating points by " << transVector << endl;
|
||||
|
||||
points += transVector;
|
||||
}
|
||||
|
||||
if (args.options().found("rotate"))
|
||||
if (args.optionFound("rotate"))
|
||||
{
|
||||
Pair<vector> n1n2(IStringStream(args.options()["rotate"])());
|
||||
Pair<vector> n1n2(args.optionLookup("rotate")());
|
||||
n1n2[0] /= mag(n1n2[0]);
|
||||
n1n2[1] /= mag(n1n2[1]);
|
||||
tensor T = rotationTensor(n1n2[0], n1n2[1]);
|
||||
@ -191,14 +191,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
points = transform(T, points);
|
||||
|
||||
if (args.options().found("rotateFields"))
|
||||
if (args.optionFound("rotateFields"))
|
||||
{
|
||||
rotateFields(runTime, T);
|
||||
}
|
||||
}
|
||||
else if (args.options().found("rollPitchYaw"))
|
||||
else if (args.optionFound("rollPitchYaw"))
|
||||
{
|
||||
vector v(IStringStream(args.options()["rollPitchYaw"])());
|
||||
vector v(args.optionLookup("rollPitchYaw")());
|
||||
|
||||
Info<< "Rotating points by" << nl
|
||||
<< " roll " << v.x() << nl
|
||||
@ -214,14 +214,14 @@ int main(int argc, char *argv[])
|
||||
Info<< "Rotating points by quaternion " << R << endl;
|
||||
points = transform(R, points);
|
||||
|
||||
if (args.options().found("rotateFields"))
|
||||
if (args.optionFound("rotateFields"))
|
||||
{
|
||||
rotateFields(runTime, R.R());
|
||||
}
|
||||
}
|
||||
else if (args.options().found("yawPitchRoll"))
|
||||
else if (args.optionFound("yawPitchRoll"))
|
||||
{
|
||||
vector v(IStringStream(args.options()["yawPitchRoll"])());
|
||||
vector v(args.optionLookup("yawPitchRoll")());
|
||||
|
||||
Info<< "Rotating points by" << nl
|
||||
<< " yaw " << v.x() << nl
|
||||
@ -243,15 +243,15 @@ int main(int argc, char *argv[])
|
||||
Info<< "Rotating points by quaternion " << R << endl;
|
||||
points = transform(R, points);
|
||||
|
||||
if (args.options().found("rotateFields"))
|
||||
if (args.optionFound("rotateFields"))
|
||||
{
|
||||
rotateFields(runTime, R.R());
|
||||
}
|
||||
}
|
||||
|
||||
if (args.options().found("scale"))
|
||||
if (args.optionFound("scale"))
|
||||
{
|
||||
vector scaleVector(IStringStream(args.options()["scale"])());
|
||||
vector scaleVector(args.optionLookup("scale")());
|
||||
|
||||
Info<< "Scaling points by " << scaleVector << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user