CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   argument vector (https://www.cfd-online.com/Forums/openfoam-programming-development/76518-argument-vector.html)

peterwy May 27, 2010 10:14

argument vector
 
Hello,

I've a problem with predefining two points over commandline arguments

If I use (like in transformPoints) this option:
argList::validOptions.insert("scale", "vector");
=> it is an option, the user can use it but mustn't

What I want to have is something like
argList::validArgs.append("P1z");

With this version the user has to support the point but at the end I'm not able to convert it to a vector in openfoam or at least 3 digits.

Has anybody an idea?

Thanks & best Regards,
Peter

gschaider May 27, 2010 11:15

Quote:

Originally Posted by peterwy (Post 260526)
Hello,

I've a problem with predefining two points over commandline arguments

If I use (like in transformPoints) this option:
argList::validOptions.insert("scale", "vector");
=> it is an option, the user can use it but mustn't

What I want to have is something like
argList::validArgs.append("P1z");

With this version the user has to support the point but at the end I'm not able to convert it to a vector in openfoam or at least 3 digits.

Has anybody an idea?

Thanks & best Regards,
Peter

Your on the right track. Just have a look at the source of a utility that needs additional arguments and everything should be clear (for instance rotateMesh, that even reads vector)

peterwy May 27, 2010 11:18

yeah, that IStreamString was that what I was looking for.

Thx and have a good evening
Peter


All times are GMT -4. The time now is 08:57.