Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-copasi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COPASI
dune-copasi
Commits
d6e8dea4
Commit
d6e8dea4
authored
4 years ago
by
Santiago Ospina De Los Ríos
Browse files
Options
Downloads
Patches
Plain Diff
Add help functions to executables
parent
b89f990a
No related branches found
No related tags found
1 merge request
!49
Resolve "Finish installation and usage instruction on the documentation"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dune_copasi_md.cc
+5
-5
5 additions, 5 deletions
src/dune_copasi_md.cc
src/dune_copasi_sd.cc
+19
-6
19 additions, 6 deletions
src/dune_copasi_sd.cc
with
24 additions
and
11 deletions
src/dune_copasi_md.cc
+
5
−
5
View file @
d6e8dea4
...
...
@@ -25,20 +25,20 @@
#include
<dune/common/parametertreeparser.hh>
#include
<ctime>
#include
<vector>
stat
u
c
std
::
string
string_help
=
stat
i
c
std
::
string
string_help
=
"Usage: dune-copasi-md CONFIG_FILE
\n
"
"
\n
"
"Execute numerical simulation of reaction-diffusion systems on multiple
\n
"
"compartments. The CONFIG_FILE
follows
is a DUNE INI file with the
\n
"
"parameters to perform the simulation.
\n
"
"compartments. The CONFIG_FILE is a DUNE INI file with the
\n
"
"parameters to perform the simulation.
\n
"
;
int
main
(
int
argc
,
char
**
argv
)
{
std
::
vector
<
std
::
string
>
cmd_line_args
(
argv
,
argv
+
argc
);
// Read and parse ini file
if
(
cmd_line_args
.
size
()
!=
2
)
{
std
::
cerr
<<
string_help
;
return
1
;
...
...
@@ -53,8 +53,8 @@ main(int argc, char** argv)
// initialize mpi
auto
&
mpi_helper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
// Read and parse ini file
const
std
::
string
config_filename
=
cmd_line_args
[
0
];
Dune
::
ParameterTree
config
;
Dune
::
ParameterTreeParser
::
readINITree
(
config_filename
,
config
);
...
...
This diff is collapsed.
Click to expand it.
src/dune_copasi_sd.cc
+
19
−
6
View file @
d6e8dea4
...
...
@@ -25,10 +25,28 @@
#include
<dune/common/parametertreeparser.hh>
#include
<ctime>
#include
<vector>
static
std
::
string
string_help
=
"Usage: dune-copasi-sd CONFIG_FILE
\n
"
"
\n
"
"Execute numerical simulation of reaction-diffusion systems on single
\n
"
"compartments. The CONFIG_FILE is a DUNE INI file with the
\n
"
"parameters to perform the simulation.
\n
"
;
int
main
(
int
argc
,
char
**
argv
)
{
std
::
vector
<
std
::
string
>
cmd_line_args
(
argv
,
argv
+
argc
);
if
(
cmd_line_args
.
size
()
!=
2
)
{
std
::
cerr
<<
string_help
;
return
1
;
}
else
if
(
cmd_line_args
[
0
]
==
"--help"
or
cmd_line_args
[
0
]
==
"-h"
)
{
std
::
cout
<<
string_help
;
return
0
;
}
auto
stime_c
=
std
::
chrono
::
system_clock
::
now
();
int
end_code
=
0
;
...
...
@@ -36,12 +54,7 @@ main(int argc, char** argv)
auto
&
mpi_helper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
// Read and parse ini file
if
(
argc
!=
2
)
DUNE_THROW
(
Dune
::
IOError
,
"Wrong number of arguments"
);
const
std
::
string
config_filename
=
argv
[
1
];
Dune
::
ParameterTree
config
;
Dune
::
ParameterTreeParser
::
readINITree
(
config_filename
,
config
);
const
std
::
string
config_filename
=
cmd_line_args
[
0
];
// initialize loggers
auto
comm
=
mpi_helper
.
getCollectiveCommunication
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment