-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.h
41 lines (34 loc) · 960 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/***********************************************************/
// context.cu is part of the Fibulator 3D atrial fibrillation
// simulation software
// copyright Shahriar Iravanian (siravan@emory.edu) 2016
//
// common.h defined Config and the base methods for the ionic models
// static inheritance via templates
//
//**********************************************************/
#pragma once
#include <stdexcept>
struct Config {
float dt;
float diff;
float apd;
float vmin;
float vmax;
int alpha;
int beta;
const float *table;
float base_apd;
float grad_apd;
float3 normal;
bool chronic;
bool cluster;
};
template <typename T>
__device__ __host__ void init_cell(float *v, float *w, int stim) {}
template <typename T>
__device__ __host__ void deriv(float *state, float *rate, const Config &cfg) {}
template <typename T>
__host__ void init_table(float *table) {
throw std::runtime_error("init_table without ionic model");
}