mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add transformPoints -time option (issue #1510)
This commit is contained in:
committed by
Andrew Heather
parent
2e57f329f2
commit
241dee29b2
@ -37,6 +37,10 @@ Description
|
||||
Usage
|
||||
Options are:
|
||||
|
||||
-time value
|
||||
Specify the time to search from and apply the transformation
|
||||
(default is latest)
|
||||
|
||||
-translate vector
|
||||
Translates the points by the given vector before rotations
|
||||
|
||||
@ -155,6 +159,13 @@ int main(int argc, char *argv[])
|
||||
"Note: roll=rotate about x, pitch=rotate about y, yaw=rotate about z"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"time",
|
||||
"time",
|
||||
"Specify the time to search from and apply the transformation"
|
||||
" (default is latest)"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"translate",
|
||||
"vector",
|
||||
@ -248,6 +259,19 @@ int main(int argc, char *argv[])
|
||||
meshDir = regionName/polyMesh::meshSubDir;
|
||||
}
|
||||
|
||||
if (args.found("time"))
|
||||
{
|
||||
if (args.opt("time") == "constant")
|
||||
{
|
||||
runTime.setTime(instant(0, "constant"), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
scalar timeValue = args.opt<scalar>("time");
|
||||
runTime.setTime(instant(timeValue), 0);
|
||||
}
|
||||
}
|
||||
|
||||
pointIOField points
|
||||
(
|
||||
IOobject
|
||||
|
||||
Reference in New Issue
Block a user