openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
help.cc
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // openCARP is an open cardiac electrophysiology simulator.
3 //
4 // Copyright (C) 2020 openCARP project
5 //
6 // This program is licensed under the openCARP Academic Public License (APL)
7 // v1.0: You can use and redistribute it and/or modify it in non-commercial
8 // academic environments under the terms of APL as published by the openCARP
9 // project v1.0, or (at your option) any later version. Commercial use requires
10 // a commercial license (info@opencarp.org).
11 //
12 // This program is distributed without any warranty; see the openCARP APL for
13 // more details.
14 //
15 // You should have received a copy of the openCARP APL along with this program
16 // and can find it online: http://www.opencarp.org/license
17 // ----------------------------------------------------------------------------
18 
19 /*
20  * This file is used to print more detailed information about imp like
21  * available ionic models
22  * available plugins
23  *
24  * and model specific information like
25  *
26  * modifiable parameters of a model
27  * state variables of a model
28  *
29  * Further, output strings are created which can be directly used in bidomain par files.
30  */
31 #include "MULTI_ION_IF.h"
32 
33 #include <stdlib.h>
34 #include <stdio.h>
35 #include "help_cmdline.h"
36 #include <time.h>
37 #include <sys/time.h>
38 #include <sys/resource.h>
39 #include <unistd.h>
40 #include <limits.h>
41 
42 void help_ims_avail( int );
43 void help_plugs_avail(int );
44 void print_IMP_parameters( void );
45 void help_modifiable_params(ION_TYPE, int );
46 void help_svs(ION_TYPE, int );
47 
48 #undef __FUNCT__
49 #define __FUNCT__ "main"
50 int main( int argc, char *argv[] )
51 {
52  struct gengetopt_args_info params;
53  int carp;
54  ION_TYPE IM_IC;
55 
56  PetscInitialize( &argc, &argv, (char *)0, "" );
57  PetscOptionsInsertString("-options_left no");
58 
59  if ( cmdline_parser(argc, argv, &params) != 0 )
60  exit(1);
61 
62  carp = params.carp_flag;
63 
64  if ( params.imps_flag )
65  help_ims_avail(carp);
66 
67  if ( params.plugs_flag )
68  help_plugs_avail(carp);
69 
70  if ( params.all_par_flag )
72 
73  if ( params.imp_par_given ) {
74  if ( get_ION_TYPE( params.imp_par_arg ) == NULL ) {
75  fprintf( stderr, "Illegal IMP specified: %s\n", params.imp_par_arg );
76  exit(1);
77  } else
78  IM_IC = get_ION_TYPE( params.imp_par_arg );
79 
80  help_modifiable_params(IM_IC,carp);
81  }
82 
83  if ( params.imp_svs_given ) {
84  if ( get_ION_TYPE( params.imp_svs_arg ) == NULL ) {
85  fprintf( stderr, "Illegal IMP specified: %s\n", params.imp_svs_arg );
86  exit(1);
87  } else
88  IM_IC = get_ION_TYPE( params.imp_svs_arg );
89 
90  help_svs(IM_IC,carp);
91  }
92 
93  CHKERRQ(PetscFinalize());
94 
95  return(0);
96 }
97 
void print_IMP_parameters(void)
void help_svs(ION_TYPE, int)
void help_modifiable_params(ION_TYPE, int)
Define multiple ionic models to be used in different regions.
void help_ims_avail(int)
int main(int argc, char *argv[])
Definition: help.cc:50
void help_plugs_avail(int)