openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
clamp.h
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 #ifndef CLAMP_H
20 #define CLAMP_H
21 
22 #include "trace.h"
23 #include "timer_utils.h"
24 #include "sf_interface.h"
25 
26 namespace limpet {
27 
28 struct Clamp {
29  double val_pre;
30  double val;
31  double val_post;
32  double start;
33  double dur;
34  double tau;
35  char *file;
37  int transient;
38  char *sv;
39  int impDataID;
40 };
41 
42 
43 bool initialize_clamp(Clamp *cl, double ini_val, double cl_val, double dur, double start, const char *f,int,float*);
44 void clamp_signal(MULTI_IF *pMIIF, Clamp *cl, opencarp::timer_manager *tm );
45 void initialize_sv_clamp(Clamp *cl, const char *sv, char *f, double);
46 void sv_clamp( Clamp *cl, opencarp::timer_manager *tm, MULTI_IF*, bool trigger );
47 void initialize_AP_clamp(Clamp *cl, char *f, double);
48 void AP_clamp( Clamp *cl, opencarp::timer_manager *tm, opencarp::sf_vec *v, bool trigger );
49 int process_sv_clamps( char *SVs, char *files, Clamp **clamps, double dt );
50 
51 } // namespace limpet
52 
53 #endif
double dur
Definition: clamp.h:33
trace tr
Definition: clamp.h:36
double val_pre
Definition: clamp.h:29
void sv_clamp(Clamp *cl, timer_manager *tm, MULTI_IF *miif, bool trigger)
Definition: clamp.cc:138
bool initialize_clamp(Clamp *cl, double cl_val, double ini_val, double start, double dur, const char *f, int trans, float *duration)
Definition: clamp.cc:45
double val_post
Definition: clamp.h:31
double start
Definition: clamp.h:32
char * sv
Definition: clamp.h:38
Timers and timer manager.
double tau
Definition: clamp.h:34
void initialize_AP_clamp(Clamp *cl, char *f, double)
void clamp_signal(MULTI_IF *pMIIF, Clamp *cl, timer_manager *tm)
Definition: clamp.cc:69
int impDataID
Definition: clamp.h:39
Interface to SlimFem.
double val
Definition: clamp.h:30
char * file
Definition: clamp.h:35
void AP_clamp(Clamp *cl, timer_manager *tm, sf_vec *v, bool trigger)
Definition: clamp.cc:178
void initialize_sv_clamp(Clamp *cl, const char *sv, char *file, double dt)
Definition: clamp.cc:117
int process_sv_clamps(char *SVs, char *files, Clamp **clamps, double dt)
Definition: clamp.cc:197
manage input, output, resampling of traces
Definition: trace.h:25
centralize time managment and output triggering
Definition: timer_utils.h:73