carputils
Doxygen code documentation for the python framework controlling openCARP
All Classes Namespaces Files Functions Variables Properties Pages
Functions
carputils.model.induceReentry Namespace Reference

Functions

def converge_to_EB (args, job, meshname, cmd_ref, stim_index, simid, nodes_to_check_str, startstatef, start_S2, upper_bound, lower_bound)
 
def PEERP (args, job, cmd_ref, meshname, sinus, stim_points, steady_state_dir)
 Pacing at the End of the Effective Refractory Period: More...
 
def stimulation (args, start, start_bcl, end_bcl, step, n_beats, stim_index)
 
def RP_E (args, job, cmd_ref, meshname, stim_points, steady_state_dir)
 Rapid Pacing with reentry check at the End: More...
 
def check_propagation (args, job, meshname, cmd_ref, stim_index, simid, nodes_to_check_str, startstatef, start_S2)
 
def RP_B (args, job, cmd_ref, meshname, stim_points, steady_state_dir)
 Rapid Pacing with reentry check after every Beat: More...
 
def assignRandomCoord (points, sing_points)
 
def assignDirection (coordinates)
 
def makeCircle3D (startCoord, radius, seedNum, normV, point1, point2, nodes)
 
def assignPhaseValues (seeds, originalCoord, directions, normV, point1, point2, nodes)
 
def planeInfo (coordinate, nodes, triangles)
 
def deflate (x)
 
def csr_row_set_nz_to_val (csr, row, value=0)
 Set all nonzero elements (elements currently in the sparsity pattern) to the given value. More...
 
def eikonal_solver (nodes, triangles, knownNodes, phi0)
 
def assignWallValues (surfacePoints, allPoints, surfaceValues)
 
def PSD (args, job, cmd, meshname, xyz, triangles, centre)
 Phase Singularity Distribution: More...
 

Function Documentation

◆ assignDirection()

def carputils.model.induceReentry.assignDirection (   coordinates)

◆ assignPhaseValues()

def carputils.model.induceReentry.assignPhaseValues (   seeds,
  originalCoord,
  directions,
  normV,
  point1,
  point2,
  nodes 
)

◆ assignRandomCoord()

def carputils.model.induceReentry.assignRandomCoord (   points,
  sing_points 
)

◆ assignWallValues()

def carputils.model.induceReentry.assignWallValues (   surfacePoints,
  allPoints,
  surfaceValues 
)

◆ check_propagation()

def carputils.model.induceReentry.check_propagation (   args,
  job,
  meshname,
  cmd_ref,
  stim_index,
  simid,
  nodes_to_check_str,
  startstatef,
  start_S2 
)

◆ converge_to_EB()

def carputils.model.induceReentry.converge_to_EB (   args,
  job,
  meshname,
  cmd_ref,
  stim_index,
  simid,
  nodes_to_check_str,
  startstatef,
  start_S2,
  upper_bound,
  lower_bound 
)

◆ csr_row_set_nz_to_val()

def carputils.model.induceReentry.csr_row_set_nz_to_val (   csr,
  row,
  value = 0 
)

Set all nonzero elements (elements currently in the sparsity pattern) to the given value.

Useful to set to 0 mostly.

◆ deflate()

def carputils.model.induceReentry.deflate (   x)

◆ eikonal_solver()

def carputils.model.induceReentry.eikonal_solver (   nodes,
  triangles,
  knownNodes,
  phi0 
)

◆ makeCircle3D()

def carputils.model.induceReentry.makeCircle3D (   startCoord,
  radius,
  seedNum,
  normV,
  point1,
  point2,
  nodes 
)

◆ PEERP()

def carputils.model.induceReentry.PEERP (   args,
  job,
  cmd_ref,
  meshname,
  sinus,
  stim_points,
  steady_state_dir 
)

Pacing at the End of the Effective Refractory Period:

It triggers ectopic beats at the end of the effective refractory period, computed as the minimum coupling interval at which the action potential could propagate in the tissue.

Input parser arguments (args), output directory (job.ID), struct containing imp_regions and gregions (cmd_ref), meshname, sinus node location (sinus), stimulation point location (x,y,z) and prepacing directory (steady_state_dir)

'--M_lump',
type=int,
default='1',
help='set 1 for mass lumping, 0 otherwise. Mass lumping will speed up the simulation. Use with regular meshes.'
'--stim_size',
type=str,
default='2000.0',
help='stimulation edge square size in micrometers'
'--max_n_beats_PEERP',
type=int,
default=2,
help='Max number of beats for the PEERP'
'--APD_percent',
type=float, default=94.0,
help='action potential duration percentage to set as first guess to find the end of the effective refractory period'
'--tol',
type=float, default=1.0,
help='tolerance to compute the end of the effective refractory period'

◆ planeInfo()

def carputils.model.induceReentry.planeInfo (   coordinate,
  nodes,
  triangles 
)

◆ PSD()

def carputils.model.induceReentry.PSD (   args,
  job,
  cmd,
  meshname,
  xyz,
  triangles,
  centre 
)

Phase Singularity Distribution:

It consists of manually placing phase singularities on the geometrical model and then solving the Eikonal equation to estimate the activation time map. Based on this initial state, you can simulate electrical wave propagation by solving the monodomain equation.

Input parser arguments (args), output directory (job.ID), struct containing imp_regions and gregions (cmd_ref), meshname, stimulation point location (x,y,z) and prepacing directory (steady_state_dir)

'--M_lump',
type=int,
default='1',
help='set 1 for mass lumping, 0 otherwise. Mass lumping will speed up the simulation. Use with regular meshes.'
'--cv',
type=float,
default=0.3,
help='conduction velocity in m/s'
'--PSD_bcl',
type=float,
default=160,
help='BCL in ms'
'--radius',
type=float,
default=10000.0,
help='radius of circles in which to set the phase from -pi to +pi'
'--seeds',
type=int,
default=50,
help='# of initial seeds in which to set the phase from -pi to +pi'
'--chirality',
type=int,
default=-1,
help='Chirality of the rotation: -1 for counterclockwise, 1 for clockwise'

◆ RP_B()

def carputils.model.induceReentry.RP_B (   args,
  job,
  cmd_ref,
  meshname,
  stim_points,
  steady_state_dir 
)

Rapid Pacing with reentry check after every Beat:

It consists of a train of electrical stimulations with decreasing coupling interval (args.step) between args.start_bcl and args.end_bcl. It can give multiple beats with the same cycle length (args.max_n_beats_RP) and it checks for arrhythmia induction after every beat.

Input parser arguments (args), output directory (job.ID), struct containing imp_regions and gregions (cmd_ref), meshname, stimulation point location (x,y,z) and prepacing directory (steady_state_dir)

'--M_lump',
type=int,
default='1',
help='set 1 for mass lumping, 0 otherwise. Mass lumping will speed up the simulation. Use with regular meshes.'
'--stim_size',
type=str,
default='2000.0',
help='stimulation edge square size in micrometers'
'--step',
type=float,
default=10,
help='Step to decrease bcl in ms'
'--max_n_beats_RP',
type=int,
default=1,
help='Max number of beats for th RP'
'--start',
type=float, default=2000.0,
help='initial basic cycle lenght in [ms]'
'--start_bcl',
type=float, default=200.0,
help='initial basic cycle lenght in [ms]'
'--end_bcl',
type=float, default=130.0,
help='last basic cycle lenght in [ms]'

◆ RP_E()

def carputils.model.induceReentry.RP_E (   args,
  job,
  cmd_ref,
  meshname,
  stim_points,
  steady_state_dir 
)

Rapid Pacing with reentry check at the End:

It consists of a train of electrical stimulations with decreasing coupling interval (args.step) between args.start_bcl and args.end_bcl. It can give multiple beats with the same cycle length (args.max_n_beats_RP) and it checks for arrhythmia induction at the end of the protocol

Input parser arguments (args), output directory (job.ID), struct containing imp_regions and gregions (cmd_ref), meshname, stimulation point location (x,y,z) and prepacing directory (steady_state_dir)

'--M_lump',
type=int,
default='1',
help='set 1 for mass lumping, 0 otherwise. Mass lumping will speed up the simulation. Use with regular meshes.'
'--stim_size',
type=str,
default='2000.0',
help='stimulation edge square size in micrometers'
'--step',
type=float,
default=10,
help='Step to decrease bcl in ms'
'--max_n_beats_RP',
type=int,
default=1,
help='Max number of beats for th RP'
'--start',
type=float, default=2000.0,
help='initial basic cycle lenght in [ms]'
'--start_bcl',
type=float, default=200.0,
help='initial basic cycle lenght in [ms]'
'--end_bcl',
type=float, default=130.0,
help='last basic cycle lenght in [ms]'

◆ stimulation()

def carputils.model.induceReentry.stimulation (   args,
  start,
  start_bcl,
  end_bcl,
  step,
  n_beats,
  stim_index 
)