90 const double inf = std::numeric_limits<double>::infinity();
172 if (stimuliRef)
delete stimuliRef;
307 void update_Ta_in_active_list();
416 void translate_stim_to_eikonal();
419 void create_node_to_node_graph();
422 void load_state_file();
425 void init_diffusion_current();
525 void solve_EIKONAL();
535 void setup_stimuli();
538 void stimulate_intracellular();
544 void setup_solvers();
547 void setup_mappings();
553 void dump_matrices();
555 void checkpointing();
double SF_real
Use the general double as real type.
Basic utility structs and functions, mostly IO related.
A vector storing arbitrary data.
The abstract physics interface we can use to trigger all physics.
virtual void output_timings()
FILE_SPEC logger
The logger of the physic, each physic should have one.
const char * name
The name of the physic, each physic should have one.
std::string timer_unit(const int timer_id)
figure out units of a signal linked to a given timer
Eikonal()
Most of the initialization is done with initialize()
SF::vector< stimulus > stimuli
the electrical stimuli
parabolic_solver parab_solver
Solver for the parabolic bidomain equation.
MaterialType mtype[2]
the material types of intra_grid and extra_grid grids.
void destroy()
Currently we only need to close the file logger.
double timer_val(const int timer_id)
figure out current value of a signal linked to a given timer
sf_vec * phie_dummy
no elliptic solver needed, but we need a dummy for phie to use parabolic solver
eikonal_solver eik_solver
Solver for the eikonal equation.
LAT_detector lat
the activation time detector
gvec_data gvec
datastruct holding global IMP state variable output
generic_timing_stats IO_stats
grid_t
An electrics grid identifier to distinguish between intra and extra grids.
igb_output_manager output_manager_cycle
void initialize()
Initialize the Eikonal class.
igb_output_manager output_manager_time
class handling the igb output
SF::vector< SF_real > j_cvrest
void FIM()
Standard fast iterative method to solve eikonal equation with active list approach.
void update_repolarization_times_from_rd(sf_vec &Vmv, sf_vec &Vmv_old, double time)
Checks if Vm crosses the repolarization threshold during each time step of the parabolic solver and u...
SF::vector< SF_real > fiber_node
SF::vector< SF_real > cv_ar_t
SF::vector< SF_real > T_R
SF::vector< mesh_int_t > n2e_dsp
SF::vector< SF_real > T_A
mesh_int_t Index_currStim
SF::vector< SF_real > CVnodes
SF::vector< SF_real > k_cvrest
SF::vector< SF_real > z_coord
SF::vector< SF_real > p_cvrest
SF::vector< SF_real > TA_old
SF_real time2stop_eikonal
SF::vector< SF_real > cv_ar_n
SF::vector< SF_real > sheet_node
void set_initial_cv()
Set the initial conduction velocity (CV) parameters for the nodes in the mesh.
SF::vector< SF_real > x_coord
SF::vector< diffusion_current > diff_cur
void init()
Initialize vectors and variables in the eikonal_solver class.
SF::vector< mesh_int_t > e2n_con
bool determine_model_to_run(double &time)
Determine the next model to run in the alternation between RD and Eikonal.
SF::vector< mesh_int_t > stim_status
SF::vector< mesh_int_t > elem_start
SF::vector< mesh_int_t > StimulusPoints
void save_eikonal_state(const char *tsav_ext)
Save the current state of variables related to the Eikonal simulation to a file to initialize a futur...
void compute_bc()
Computes and updates boundary counditions in cycFIM.
void compute_diffusion_current(const double &time, sf_vec &vm)
Compute the diffusion current approximation I_diff in all activated nodes. Only converged nodes are c...
std::vector< mesh_int_t > n2n_connect
void set_stimuli(SF::vector< stimulus > &stimuli)
Simple setter for stimulus vector.
SF::vector< mesh_int_t > e2n_cnt
SF::vector< SF_real > y_coord
SF::vector< mesh_int_t > n2e_con
void clean_list()
Clean the list of nodes by resetting their status and tracking changes based on the time step of the ...
SF::vector< SF_real > D_I
SF::vector< mesh_int_t > nReadded2List
SF::vector< mesh_int_t > num_changes
std::vector< mesh_int_t > n2n_dsp
SF::vector< SF_real > l_cvrest
SF::vector< SF_real > StimulusTimes
SF::vector< mesh_int_t > n2e_cnt
void cycFIM()
Implementation of the cyclical fast iterative method used in step A of the DREAM model.
void update_repolarization_times(const Ionics &ion)
Estimates initial repolarization times (T_R) in Step D of DREAM.
eikonal_solver_stats stats
SF::vector< SF_real > CVnodes_mod
SF::vector< mesh_int_t > List
Tissue level electrics, main Electrics physics class.
Electrical ionics functions and LIMPET wrappers.
constexpr T min(T a, T b)
void f_close(FILE_SPEC &f)
Close a FILE_SPEC.
Simulator-level utility execution control functions.
Electrical stimulation functions.
description of materal properties in a mesh
for analysis of the computations done to solve the eikonal model
for analysis of the #iterations to solve CG
Struct used for debugging purposes.
const char * reasonOut
reason for list entry
SF_real T_R
repolarization time
void init_logger(const char *filename)
void log_stats(double tm, bool cflg)
SF_real D_I
diastolic interval
mesh_int_t idXNB
neighboring node index responsible for list entry
const char * reasonIn
reason for list entry
SF_real T_A_
previous activation time
SF_real T_A
current activation time
SF_real nbn_T_A
activation time of neighboring node
mesh_int_t cycle
DREAM cycle.
void update_status(enum status s, enum reason r)