Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
3a2fe034
Commit
3a2fe034
authored
Aug 01, 2012
by
Praetorius, Simon
Browse files
command line parser for petsc-parameters
parent
5c682093
Changes
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AMDiS.cc
View file @
3a2fe034
...
...
@@ -55,14 +55,22 @@ namespace AMDiS {
(
"init-file"
,
po
::
value
<
std
::
string
>
(),
"set init file"
)
(
"rs"
,
po
::
value
<
int
>
(),
"set restart parameter"
)
(
"parameters"
,
po
::
value
<
std
::
string
>
(),
"set parameter in init file
\n
syntax:
\"
key1: value1; key2: value2...
\"
"
);
po
::
options_description
hidden
(
"Hidden options"
);
hidden
.
add_options
()
(
"unknown"
,
po
::
value
<
std
::
vector
<
std
::
string
>
>
(),
"unknown options"
);
po
::
options_description
cmdline_options
;
cmdline_options
.
add
(
desc
).
add
(
hidden
);
// first argument is init-filename
po
::
positional_options_description
p
;
p
.
add
(
"init-file"
,
1
);
p
.
add
(
"unknown"
,
-
1
);
// parse comandline
po
::
variables_map
vm
;
po
::
store
(
po
::
command_line_parser
(
argc
,
argv
).
options
(
desc
).
positional
(
p
).
run
(),
vm
);
po
::
store
(
po
::
command_line_parser
(
argc
,
argv
).
options
(
cmdline_options
).
positional
(
p
).
allow_unregistered
(
).
run
(),
vm
);
po
::
notify
(
vm
);
// print help message
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment