Ejemplo n.º 1
0
def GOSSparams():
    params = GOSSplittingSolver.default_parameters()
    params["pde_solver"] = "monodomain"
    params["MonodomainSolver"]["linear_solver_type"] = "iterative"
    params["MonodomainSolver"]["theta"] = 1.0
    params["ode_solver"]["scheme"] = "RL1"
    params["apply_stimulus_current_to_pde"] = False
    return params
Ejemplo n.º 2
0
def GOSSparams():
    params = GOSSplittingSolver.default_parameters()
    params["pde_solver"] = "monodomain"
    params["MonodomainSolver"]["linear_solver_type"] = "iterative"
    params["MonodomainSolver"]["theta"] = 1.0
    params["ode_solver"]["scheme"] = "RL1"
    params["apply_stimulus_current_to_pde"] = False
    return params
Ejemplo n.º 3
0
tstop = 25.0
a = Constant(1.)
V_init = -85.
V_amp = 85.
t = Constant(0.)

# Domain and solution space
do_plot = False
L = 100.
N = 1024
#N = 128
domain = RectangleMesh(-L, -L, L, L, N, N)
cellmodel = dolfin_jit(load_ode("tentusscher_panfilov_2006_M_cell.ode"),
                       field_states=["V"])
heart = CardiacModel(domain, t, D, None, cellmodel)
ps = GOSSplittingSolver.default_parameters()
ps["pde_solver"] = "monodomain"

ps["MonodomainSolver"]["linear_solver_type"] = "iterative"
ps["MonodomainSolver"]["theta"] = 1.0
ps["ode_solver"]["solver"] = "RL1"
ps["ode_solver"]["num_threads"] = 8 / MPI.size(domain.mpi_comm())

# If cuda
ps["ode_solver"]["use_cuda"] = True
ps["ode_solver"]["cuda_params"]["float_precision"] = "double"
ps["ode_solver"]["cuda_params"]["solver"] = "rush_larsen"

ps["apply_stimulus_current_to_pde"] = True
solver = GOSSplittingSolver(heart, ps)