Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
3a2fe034
Commit
3a2fe034
authored
Aug 01, 2012
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command line parser for petsc-parameters
parent
5c682093
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
AMDiS/src/AMDiS.cc
AMDiS/src/AMDiS.cc
+9
-1
No files found.
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
Markdown
is supported
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