openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
help.cc
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) NumeriCor GmbH
2 // SPDX-License-Identifier: LicenseRef-APL-1.1
3 
4 /*
5  * This file is used to print more detailed information about imp like
6  * available ionic models
7  * available plugins
8  *
9  * and model specific information like
10  *
11  * modifiable parameters of a model
12  * state variables of a model
13  *
14  * Further, output strings are created which can be directly used in bidomain par files.
15  */
16 #include "MULTI_ION_IF.h"
17 
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include "help_cmdline.h"
21 #include <time.h>
22 #include <sys/time.h>
23 #include <sys/resource.h>
24 #include <unistd.h>
25 #include <limits.h>
26 
27 void help_ims_avail( int );
28 void help_plugs_avail(int );
29 void print_IMP_parameters( void );
30 void help_modifiable_params(ION_TYPE, int );
31 void help_svs(ION_TYPE, int );
32 
33 #undef __FUNCT__
34 #define __FUNCT__ "main"
35 int main( int argc, char *argv[] )
36 {
37  struct gengetopt_args_info params;
38  int carp;
39  ION_TYPE IM_IC;
40 
41  PetscInitialize( &argc, &argv, (char *)0, "" );
42  PetscOptionsInsertString("-options_left no");
43 
44  if ( cmdline_parser(argc, argv, &params) != 0 )
45  exit(1);
46 
47  carp = params.carp_flag;
48 
49  if ( params.imps_flag )
50  help_ims_avail(carp);
51 
52  if ( params.plugs_flag )
53  help_plugs_avail(carp);
54 
55  if ( params.all_par_flag )
57 
58  if ( params.imp_par_given ) {
59  if ( get_ION_TYPE( params.imp_par_arg ) == NULL ) {
60  fprintf( stderr, "Illegal IMP specified: %s\n", params.imp_par_arg );
61  exit(1);
62  } else
63  IM_IC = get_ION_TYPE( params.imp_par_arg );
64 
65  help_modifiable_params(IM_IC,carp);
66  }
67 
68  if ( params.imp_svs_given ) {
69  if ( get_ION_TYPE( params.imp_svs_arg ) == NULL ) {
70  fprintf( stderr, "Illegal IMP specified: %s\n", params.imp_svs_arg );
71  exit(1);
72  } else
73  IM_IC = get_ION_TYPE( params.imp_svs_arg );
74 
75  help_svs(IM_IC,carp);
76  }
77 
78  CHKERRQ(PetscFinalize());
79 
80  return(0);
81 }
82 
Define multiple ionic models to be used in different regions.
int main(int argc, char *argv[])
Definition: help.cc:35
void help_ims_avail(int)
void help_svs(ION_TYPE, int)
void help_plugs_avail(int)
void help_modifiable_params(ION_TYPE, int)
void print_IMP_parameters(void)