Niederer benchmark

Niederer benchmark#

In this example we will use the same setup as in the Niederer benchmark [LGA+15]. It is a standard convergence/cross-code benchmark for monodomain solvers: a small cuboid slab of tissue with a detailed ionic current model (the ten Tusscher–Panfilov 2006 epicardial model), a conductivity tensor \(M\) built from the “Niederer” literature conductivity values, and a stimulus \(I_{stim}\) applied in one corner. The quantity of interest is the local activation time — the first time \(v\) crosses \(0\) mV — at nine fixed points in the slab, for a range of spatial and temporal resolutions \(dx\), \(dt\). See the mathematical background page for the underlying monodomain model and notation used below.

from pathlib import Path
import json
import time
import logging
from mpi4py import MPI
import os
import dolfinx
import scifem
import numpy as np
import numpy.typing as npt
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
if os.environ.get("NO_PYVISTA", "0") == "1":
    pyvista = None
    logger.warning("Turn off pyvista")
else:
    try:
        import pyvista  # type: ignore[no-redef]
    except ImportError:
        pyvista = None  # type: ignore[no-redef]
        logger.warning("pyvista not installed, skipping visualization")
import gotranx
import matplotlib.pyplot as plt
import beat
def setup_initial_conditions() -> npt.NDArray:
    ic = {
        "V": -85.23,  # mV
        "Xr1": 0.00621,
        "Xr2": 0.4712,
        "Xs": 0.0095,
        "m": 0.00172,
        "h": 0.7444,
        "j": 0.7045,
        "d": 3.373e-05,
        "f": 0.7888,
        "f2": 0.9755,
        "fCass": 0.9953,
        "s": 0.999998,
        "r": 2.42e-08,
        "Ca_i": 0.000126,  # millimolar
        "R_prime": 0.9073,
        "Ca_SR": 3.64,  # millimolar
        "Ca_ss": 0.00036,  # millimolar
        "Na_i": 8.604,  # millimolar
        "K_i": 136.89,  # millimolar
    }
    values = model.init_state_values(**ic)
    return values
dx = 0.5
dt = 0.05
# Increase T to 100 to reproduce Niederer benchmark
T = 20.0

here = Path.cwd()

model_path = Path("tentusscher_panfilov_2006_epi_cell.py")
if not model_path.is_file():
    here = Path.cwd()
    ode = gotranx.load_ode(
        here
        / ".."
        / "odes"
        / "tentusscher_panfilov_2006"
        / "tentusscher_panfilov_2006_epi_cell.ode",
    )
    code = gotranx.cli.gotran2py.get_code(
        ode,
        scheme=[gotranx.schemes.Scheme.generalized_rush_larsen],
    )
    model_path.write_text(code)

import tentusscher_panfilov_2006_epi_cell as model

fun = model.generalized_rush_larsen
init_states = setup_initial_conditions()
parameters = model.init_parameter_values(stim_amplitude=0.0)

mesh_unit = "mm"

Lx = 20.0 * beat.units.ureg("mm").to(mesh_unit).magnitude
Ly = 7 * beat.units.ureg("mm").to(mesh_unit).magnitude
Lz = 3 * beat.units.ureg("mm").to(mesh_unit).magnitude
dx_mm = dx * beat.units.ureg("mm").to(mesh_unit).magnitude

geo = beat.geometry.get_3D_slab_geometry(
    comm=comm,
    Lx=Lx,
    Ly=Ly,
    Lz=Lz,
    dx=dx_mm,
)
ode_space = dolfinx.fem.functionspace(geo.mesh, ("Lagrange", 1))

if pyvista is not None:
    plotter = pyvista.Plotter()
    grid = pyvista.UnstructuredGrid(*dolfinx.plot.vtk_mesh(geo.mesh))
    plotter.add_mesh(grid, show_edges=True)
    plotter.show_grid()
    plotter.add_axes(line_width=5)
    plotter.show_axes()
    plotter.view_xy()

    if not pyvista.OFF_SCREEN:
        plotter.show()
    else:
        figure = plotter.screenshot("niederer_mesh.png")
2026-08-11 14:23:53.177 (   2.152s) [    7F7D144E0140]vtkXOpenGLRenderWindow.:1460  WARN| bad X server connection. DISPLAY=
INFO:trame_server.utils.namespace:Translator(prefix=None)
INFO:wslink.backends.aiohttp:awaiting runner setup
INFO:wslink.backends.aiohttp:awaiting site startup
INFO:wslink.backends.aiohttp:Print WSLINK_READY_MSG
INFO:wslink.backends.aiohttp:Schedule auto shutdown with timeout 0
INFO:wslink.backends.aiohttp:awaiting running future
# Literature values for the intracellular/extracellular conductivities and the surface to volume
# ratio $\chi$, used below to build the conductivity tensor $M$.
conductivities = beat.conductivities.default_conductivities("Niederer")
# Membrane capacitance $C_m$
C_m = 1.0 * beat.units.ureg("uF/cm**2")

time_constant = dolfinx.fem.Constant(geo.mesh, 0.0)
L = 1.5 * beat.units.ureg("mm").to(mesh_unit).magnitude
S1_marker = 1
L = 1.5


tol = 1.0e-10


def S1_subdomain(x):
    return np.logical_and(
        np.logical_and(x[0] <= L + tol, x[1] <= L + tol),
        x[2] <= L + tol,
    )


cells = dolfinx.mesh.locate_entities(geo.mesh, geo.mesh.topology.dim, S1_subdomain)
S1_markers = dolfinx.mesh.meshtags(
    geo.mesh,
    geo.mesh.topology.dim,
    cells,
    np.full(len(cells), S1_marker, dtype=np.int32),
)

# The stimulus current $I_{stim}$, applied to the S1 corner subdomain defined above.

I_s = beat.stimulation.define_stimulus(
    mesh=geo.mesh,
    chi=conductivities["chi"],
    time=time_constant,
    subdomain_data=S1_markers,
    marker=S1_marker,
    mesh_unit=mesh_unit,
    amplitude=50_000.0,
)

# The conductivity tensor $M$, built from the fibre direction `geo.f0` and the conductivities above.

assert geo.f0 is not None
M = beat.conductivities.define_conductivity_tensor(
    f0=geo.f0,
    **conductivities,
)

params = {
    "petsc_options": {
        "ksp_type": "cg",
        "pc_type": "hypre",
        "pc_hypre_type": "boomeramg",
    },
}

save_freq = int(1.0 / dt)
# Create a monitor to log the solver time and performance metrics every `save_freq` time steps
monitor = beat.PerformanceMonitor(log_frequency=save_freq)


pde = beat.MonodomainModel(
    time=time_constant,
    mesh=geo.mesh,
    M=M,
    I_s=I_s,
    params=params,
    C_m=C_m.to(f"uF/{mesh_unit}**2").magnitude,
    dx=I_s.dZ,
    monitor=monitor,
)
ode = beat.odesolver.DolfinODESolver(
    v_ode=dolfinx.fem.Function(ode_space),
    v_pde=pde.state,
    fun=fun,
    init_states=init_states,
    parameters=parameters,
    num_states=len(init_states),
    v_index=model.state_index("V"),
    monitor=monitor,
)

# Combine the PDE and ODE solver, using the default $\theta = 1$ (Godunov splitting).
INFO:beat.conductivities:Get harmonic mean conductivity: g_il=<Quantity(0.17, 'siemens / meter')> g_it=<Quantity(0.019, 'siemens / meter')> g_el=<Quantity(0.62, 'siemens / meter')> g_et=<Quantity(0.24, 'siemens / meter')> chi=<Quantity(1400.0, '1 / centimeter')>
INFO:beat.conductivities:Harmonic mean conductivities sigma_l=<Quantity(0.133417722, 'siemens / meter')> sigma_t=<Quantity(0.0176061776, 'siemens / meter')>
INFO:beat.conductivities:Scaled harmonic mean conductivities s_l=0.0009529837251356239 s_t=0.00012575841147269718
INFO:beat.conductivities:Define conductivity tensor s_l=0.0009529837251356239 s_t=0.00012575841147269718 dim=3
solver = beat.MonodomainSplittingSolver(pde=pde, ode=ode, monitor=monitor)
output_dir = Path("results-niederer-benchmark")
output_dir.mkdir(exist_ok=True)
filename = output_dir / f"results-{dt}-{dx}.xdmf"
filename.unlink(missing_ok=True)
filename.with_suffix(".h5").unlink(missing_ok=True)

vtx = dolfinx.io.VTXWriter(
    comm,
    "niederer_benchmark.bp",
    [solver.pde.state],
    engine="BP4",
)

points = {
    "P1": (0, 0, 0),
    "P2": (0.0, Ly, 0.0),
    "P3": (Lx, 0.0, 0.0),
    "P4": (Lx, Ly, 0.0),
    "P5": (0.0, 0.0, Lz),
    "P6": (0.0, Ly, Lz),
    "P7": (Lx, 0.0, Lz),
    "P8": (Lx, Ly, Lz),
    "P9": (Lx / 2, Ly / 2, Lz / 2),
}
activation_times = {p: -1.0 for p in points}
save_freq = int(1.0 / dt)

i = 0
if pyvista is not None:
    plotter_voltage = pyvista.Plotter()
    viridis = plt.get_cmap("viridis")
    grid.point_data["V"] = solver.pde.state.x.array
    grid.set_active_scalars("V")
    renderer = plotter_voltage.add_mesh(
        grid,
        show_edges=True,
        lighting=False,
        cmap=viridis,
        clim=[-90.0, 40.0],
    )
    gif_file = Path("niederer_benchmark.gif")
    gif_file.unlink(missing_ok=True)
    plotter_voltage.open_gif(gif_file.as_posix())

T = 20
# T = 100  # Change to 100 to reproduce Niederer benchmark
t = 0.0
times: list[float] = []
while t < T + 1e-12 and any(at < 0.0 for at in activation_times.values()):
    v = solver.pde.state.x.array
    if i % save_freq == 0:
        logger.info(f"Solve for {t=:.2f}, {v.max() =}, {v.min() =}")
        if len(times) > 0:
            logger.info(f"Average solver time per time step: {np.mean(times):.5f} s")
        logger.info(activation_times)
        vtx.write(t)
        if pyvista is not None:
            grid.point_data["V"] = solver.pde.state.x.array
            plotter_voltage.write_frame()
    t0 = time.perf_counter()
    solver.step((t, t + dt))
    times.append(time.perf_counter() - t0)
    for p in points:
        value = scifem.evaluate_function(solver.pde.state, [points[p]]).squeeze()
        if value > 0.0 and activation_times[p] < 0.0:
            activation_times[p] = t
    i += 1
    t += dt

if pyvista is not None:
    plotter_voltage.close()

monitor.display_summary()
monitor.save_summary(output_dir / "performance_summary.json")
INFO:__main__:Solve for t=0.00, v.max() =np.float64(-85.23), v.min() =np.float64(-85.23)
INFO:__main__:{'P1': -1.0, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=20, t=(0.45000, 0.50000), ksp_iterations=5, ksp_residual_norm=6.221912e-03, ksp_converged_reason=2, ode_function_call=0.034203s, ode_state_update=0.000226s, ode_total_step=0.034554s, ode_step=0.034615s, ode_to_dolfin=0.000130s, ode_to_pde=0.000121s, pde_assign_previous_before=0.000080s, pde_set_time=0.000086s, pde_update_matrices=0.009269s, pde_update_rhs=0.021559s, pde_linear_solve=0.010109s, pde_scatter_forward=0.000018s, pde_total_step=0.041303s, pde_step=0.041355s, pde_to_ode=0.000149s, ode_from_dolfin=0.000046s, pde_assign_previous_after=0.000059s, total_step=0.077370s
INFO:beat.telemetry:PDE step timing step=40, t=(0.95000, 1.00000), ksp_iterations=5, ksp_residual_norm=6.202217e-03, ksp_converged_reason=2, ode_function_call=0.068417s, ode_state_update=0.000454s, ode_total_step=0.069103s, ode_step=0.069221s, ode_to_dolfin=0.000251s, ode_to_pde=0.000232s, pde_assign_previous_before=0.000156s, pde_set_time=0.000156s, pde_update_matrices=0.009269s, pde_update_rhs=0.043047s, pde_linear_solve=0.019315s, pde_scatter_forward=0.000035s, pde_total_step=0.072326s, pde_step=0.072423s, pde_to_ode=0.000297s, ode_from_dolfin=0.000090s, pde_assign_previous_after=0.000115s, total_step=0.144409s
INFO:__main__:Solve for t=1.00, v.max() =np.float64(-27.367299529535245), v.min() =np.float64(-88.12556417635007)
INFO:__main__:Average solver time per time step: 0.00732 s
INFO:__main__:{'P1': -1.0, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=60, t=(1.45000, 1.50000), ksp_iterations=5, ksp_residual_norm=6.206490e-03, ksp_converged_reason=2, ode_function_call=0.102862s, ode_state_update=0.000679s, ode_total_step=0.103887s, ode_step=0.104059s, ode_to_dolfin=0.000382s, ode_to_pde=0.000351s, pde_assign_previous_before=0.000235s, pde_set_time=0.000228s, pde_update_matrices=0.009269s, pde_update_rhs=0.064541s, pde_linear_solve=0.028514s, pde_scatter_forward=0.000053s, pde_total_step=0.103346s, pde_step=0.103509s, pde_to_ode=0.000444s, ode_from_dolfin=0.000134s, pde_assign_previous_after=0.000175s, total_step=0.211734s
INFO:beat.telemetry:PDE step timing step=80, t=(1.95000, 2.00000), ksp_iterations=5, ksp_residual_norm=6.215415e-03, ksp_converged_reason=2, ode_function_call=0.136862s, ode_state_update=0.000924s, ode_total_step=0.138244s, ode_step=0.138470s, ode_to_dolfin=0.000511s, ode_to_pde=0.000469s, pde_assign_previous_before=0.000318s, pde_set_time=0.000299s, pde_update_matrices=0.009269s, pde_update_rhs=0.086058s, pde_linear_solve=0.037712s, pde_scatter_forward=0.000069s, pde_total_step=0.134384s, pde_step=0.134596s, pde_to_ode=0.000583s, ode_from_dolfin=0.000180s, pde_assign_previous_after=0.000234s, total_step=0.278634s
INFO:__main__:Solve for t=2.00, v.max() =np.float64(61.82255037565199), v.min() =np.float64(-88.88024699043358)
INFO:__main__:Average solver time per time step: 0.00706 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=100, t=(2.45000, 2.50000), ksp_iterations=5, ksp_residual_norm=6.200855e-03, ksp_converged_reason=2, ode_function_call=0.171325s, ode_state_update=0.001150s, ode_total_step=0.173048s, ode_step=0.173345s, ode_to_dolfin=0.000647s, ode_to_pde=0.000588s, pde_assign_previous_before=0.000397s, pde_set_time=0.000383s, pde_update_matrices=0.009269s, pde_update_rhs=0.107564s, pde_linear_solve=0.046994s, pde_scatter_forward=0.000087s, pde_total_step=0.165512s, pde_step=0.165772s, pde_to_ode=0.000733s, ode_from_dolfin=0.000225s, pde_assign_previous_after=0.000293s, total_step=0.346070s
INFO:beat.telemetry:PDE step timing step=120, t=(2.95000, 3.00000), ksp_iterations=5, ksp_residual_norm=6.200800e-03, ksp_converged_reason=2, ode_function_call=0.205910s, ode_state_update=0.001375s, ode_total_step=0.207964s, ode_step=0.208315s, ode_to_dolfin=0.000774s, ode_to_pde=0.000703s, pde_assign_previous_before=0.000471s, pde_set_time=0.000454s, pde_update_matrices=0.009269s, pde_update_rhs=0.129033s, pde_linear_solve=0.056246s, pde_scatter_forward=0.000102s, pde_total_step=0.196555s, pde_step=0.196864s, pde_to_ode=0.000867s, ode_from_dolfin=0.000267s, pde_assign_previous_after=0.000348s, total_step=0.413443s
INFO:__main__:Solve for t=3.00, v.max() =np.float64(41.35117666823548), v.min() =np.float64(-89.73650574752942)
INFO:__main__:Average solver time per time step: 0.00699 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=140, t=(3.45000, 3.50000), ksp_iterations=5, ksp_residual_norm=6.206833e-03, ksp_converged_reason=2, ode_function_call=0.240220s, ode_state_update=0.001630s, ode_total_step=0.242650s, ode_step=0.243058s, ode_to_dolfin=0.000901s, ode_to_pde=0.000817s, pde_assign_previous_before=0.000548s, pde_set_time=0.000526s, pde_update_matrices=0.009269s, pde_update_rhs=0.150584s, pde_linear_solve=0.065471s, pde_scatter_forward=0.000119s, pde_total_step=0.227655s, pde_step=0.228010s, pde_to_ode=0.001023s, ode_from_dolfin=0.000311s, pde_assign_previous_after=0.000406s, total_step=0.480690s
INFO:beat.telemetry:PDE step timing step=160, t=(3.95000, 4.00000), ksp_iterations=5, ksp_residual_norm=6.206215e-03, ksp_converged_reason=2, ode_function_call=0.274618s, ode_state_update=0.001868s, ode_total_step=0.277420s, ode_step=0.277883s, ode_to_dolfin=0.001020s, ode_to_pde=0.000933s, pde_assign_previous_before=0.000628s, pde_set_time=0.000598s, pde_update_matrices=0.009269s, pde_update_rhs=0.172102s, pde_linear_solve=0.074721s, pde_scatter_forward=0.000137s, pde_total_step=0.258777s, pde_step=0.259180s, pde_to_ode=0.001162s, ode_from_dolfin=0.000357s, pde_assign_previous_after=0.000477s, total_step=0.548050s
INFO:__main__:Solve for t=4.00, v.max() =np.float64(30.167118262039594), v.min() =np.float64(-89.80755776358377)
INFO:__main__:Average solver time per time step: 0.00695 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=180, t=(4.45000, 4.50000), ksp_iterations=5, ksp_residual_norm=6.204411e-03, ksp_converged_reason=2, ode_function_call=0.309103s, ode_state_update=0.002095s, ode_total_step=0.312242s, ode_step=0.312760s, ode_to_dolfin=0.001149s, ode_to_pde=0.001051s, pde_assign_previous_before=0.000703s, pde_set_time=0.000670s, pde_update_matrices=0.009269s, pde_update_rhs=0.193616s, pde_linear_solve=0.083988s, pde_scatter_forward=0.000156s, pde_total_step=0.289888s, pde_step=0.290339s, pde_to_ode=0.001308s, ode_from_dolfin=0.000400s, pde_assign_previous_after=0.000534s, total_step=0.615450s
INFO:beat.telemetry:PDE step timing step=200, t=(4.95000, 5.00000), ksp_iterations=5, ksp_residual_norm=6.196909e-03, ksp_converged_reason=2, ode_function_call=0.343445s, ode_state_update=0.002337s, ode_total_step=0.346949s, ode_step=0.347522s, ode_to_dolfin=0.001268s, ode_to_pde=0.001165s, pde_assign_previous_before=0.000779s, pde_set_time=0.000742s, pde_update_matrices=0.009269s, pde_update_rhs=0.215175s, pde_linear_solve=0.093191s, pde_scatter_forward=0.000174s, pde_total_step=0.320989s, pde_step=0.321488s, pde_to_ode=0.001445s, ode_from_dolfin=0.000444s, pde_assign_previous_after=0.000593s, total_step=0.682696s
INFO:__main__:Solve for t=5.00, v.max() =np.float64(32.41230789520775), v.min() =np.float64(-89.61147777787832)
INFO:__main__:Average solver time per time step: 0.00692 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=220, t=(5.45000, 5.50000), ksp_iterations=5, ksp_residual_norm=6.203506e-03, ksp_converged_reason=2, ode_function_call=0.377924s, ode_state_update=0.002563s, ode_total_step=0.381766s, ode_step=0.382393s, ode_to_dolfin=0.001402s, ode_to_pde=0.001283s, pde_assign_previous_before=0.000855s, pde_set_time=0.000819s, pde_update_matrices=0.009269s, pde_update_rhs=0.237030s, pde_linear_solve=0.102413s, pde_scatter_forward=0.000192s, pde_total_step=0.352410s, pde_step=0.352959s, pde_to_ode=0.001584s, ode_from_dolfin=0.000488s, pde_assign_previous_after=0.000653s, total_step=0.750409s
INFO:beat.telemetry:PDE step timing step=240, t=(5.95000, 6.00000), ksp_iterations=5, ksp_residual_norm=6.187767e-03, ksp_converged_reason=2, ode_function_call=0.412275s, ode_state_update=0.002788s, ode_total_step=0.416455s, ode_step=0.417136s, ode_to_dolfin=0.001533s, ode_to_pde=0.001397s, pde_assign_previous_before=0.000937s, pde_set_time=0.000892s, pde_update_matrices=0.009269s, pde_update_rhs=0.258599s, pde_linear_solve=0.111623s, pde_scatter_forward=0.000210s, pde_total_step=0.383533s, pde_step=0.384133s, pde_to_ode=0.001729s, ode_from_dolfin=0.000531s, pde_assign_previous_after=0.000712s, total_step=0.817721s
INFO:__main__:Solve for t=6.00, v.max() =np.float64(31.193337037560713), v.min() =np.float64(-88.8449338472062)
INFO:__main__:Average solver time per time step: 0.00691 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=260, t=(6.45000, 6.50000), ksp_iterations=5, ksp_residual_norm=6.195794e-03, ksp_converged_reason=2, ode_function_call=0.446904s, ode_state_update=0.003030s, ode_total_step=0.451444s, ode_step=0.452181s, ode_to_dolfin=0.001672s, ode_to_pde=0.001517s, pde_assign_previous_before=0.001028s, pde_set_time=0.000966s, pde_update_matrices=0.009269s, pde_update_rhs=0.280139s, pde_linear_solve=0.120836s, pde_scatter_forward=0.000229s, pde_total_step=0.414638s, pde_step=0.415286s, pde_to_ode=0.001880s, ode_from_dolfin=0.000576s, pde_assign_previous_after=0.000771s, total_step=0.885327s
INFO:beat.telemetry:PDE step timing step=280, t=(6.95000, 7.00000), ksp_iterations=5, ksp_residual_norm=6.187793e-03, ksp_converged_reason=2, ode_function_call=0.481252s, ode_state_update=0.003258s, ode_total_step=0.486131s, ode_step=0.486922s, ode_to_dolfin=0.001797s, ode_to_pde=0.001647s, pde_assign_previous_before=0.001112s, pde_set_time=0.001039s, pde_update_matrices=0.009269s, pde_update_rhs=0.301639s, pde_linear_solve=0.130067s, pde_scatter_forward=0.000246s, pde_total_step=0.445706s, pde_step=0.446403s, pde_to_ode=0.002015s, ode_from_dolfin=0.000621s, pde_assign_previous_after=0.000830s, total_step=0.952556s
INFO:__main__:Solve for t=7.00, v.max() =np.float64(29.43358324261444), v.min() =np.float64(-89.14390384354888)
INFO:__main__:Average solver time per time step: 0.00690 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=300, t=(7.45000, 7.50000), ksp_iterations=5, ksp_residual_norm=6.193262e-03, ksp_converged_reason=2, ode_function_call=0.515739s, ode_state_update=0.003502s, ode_total_step=0.520983s, ode_step=0.521832s, ode_to_dolfin=0.001932s, ode_to_pde=0.001766s, pde_assign_previous_before=0.001192s, pde_set_time=0.001114s, pde_update_matrices=0.009269s, pde_update_rhs=0.323161s, pde_linear_solve=0.139258s, pde_scatter_forward=0.000266s, pde_total_step=0.476770s, pde_step=0.477515s, pde_to_ode=0.002152s, ode_from_dolfin=0.000665s, pde_assign_previous_after=0.000887s, total_step=1.019957s
INFO:beat.telemetry:PDE step timing step=320, t=(7.95000, 8.00000), ksp_iterations=5, ksp_residual_norm=6.295497e-03, ksp_converged_reason=2, ode_function_call=0.550033s, ode_state_update=0.003726s, ode_total_step=0.555619s, ode_step=0.556523s, ode_to_dolfin=0.002054s, ode_to_pde=0.001883s, pde_assign_previous_before=0.001271s, pde_set_time=0.001185s, pde_update_matrices=0.009269s, pde_update_rhs=0.344672s, pde_linear_solve=0.148466s, pde_scatter_forward=0.000283s, pde_total_step=0.507816s, pde_step=0.508609s, pde_to_ode=0.002283s, ode_from_dolfin=0.000708s, pde_assign_previous_after=0.000943s, total_step=1.087073s
INFO:__main__:Solve for t=8.00, v.max() =np.float64(33.994512114006135), v.min() =np.float64(-89.02144281862137)
INFO:__main__:Average solver time per time step: 0.00689 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=340, t=(8.45000, 8.50000), ksp_iterations=5, ksp_residual_norm=6.376745e-03, ksp_converged_reason=2, ode_function_call=0.584366s, ode_state_update=0.003951s, ode_total_step=0.590287s, ode_step=0.591247s, ode_to_dolfin=0.002185s, ode_to_pde=0.002000s, pde_assign_previous_before=0.001350s, pde_set_time=0.001259s, pde_update_matrices=0.009269s, pde_update_rhs=0.366107s, pde_linear_solve=0.157712s, pde_scatter_forward=0.000301s, pde_total_step=0.538846s, pde_step=0.539688s, pde_to_ode=0.002418s, ode_from_dolfin=0.000766s, pde_assign_previous_after=0.001000s, total_step=1.154248s
INFO:beat.telemetry:PDE step timing step=360, t=(8.95000, 9.00000), ksp_iterations=5, ksp_residual_norm=6.393849e-03, ksp_converged_reason=2, ode_function_call=0.618965s, ode_state_update=0.004205s, ode_total_step=0.625256s, ode_step=0.626272s, ode_to_dolfin=0.002313s, ode_to_pde=0.002118s, pde_assign_previous_before=0.001428s, pde_set_time=0.001331s, pde_update_matrices=0.009269s, pde_update_rhs=0.387541s, pde_linear_solve=0.166945s, pde_scatter_forward=0.000317s, pde_total_step=0.569843s, pde_step=0.570753s, pde_to_ode=0.002563s, ode_from_dolfin=0.000811s, pde_assign_previous_after=0.001075s, total_step=1.221735s
INFO:__main__:Solve for t=9.00, v.max() =np.float64(28.775193432878318), v.min() =np.float64(-89.58069101983232)
INFO:__main__:Average solver time per time step: 0.00688 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=380, t=(9.45000, 9.50000), ksp_iterations=5, ksp_residual_norm=6.408088e-03, ksp_converged_reason=2, ode_function_call=0.653334s, ode_state_update=0.004433s, ode_total_step=0.659960s, ode_step=0.661046s, ode_to_dolfin=0.002442s, ode_to_pde=0.002235s, pde_assign_previous_before=0.001507s, pde_set_time=0.001403s, pde_update_matrices=0.009269s, pde_update_rhs=0.409001s, pde_linear_solve=0.176136s, pde_scatter_forward=0.000335s, pde_total_step=0.600824s, pde_step=0.601793s, pde_to_ode=0.002704s, ode_from_dolfin=0.000856s, pde_assign_previous_after=0.001137s, total_step=1.288909s
INFO:beat.telemetry:PDE step timing step=400, t=(9.95000, 10.00000), ksp_iterations=5, ksp_residual_norm=6.446121e-03, ksp_converged_reason=2, ode_function_call=0.687669s, ode_state_update=0.004667s, ode_total_step=0.694644s, ode_step=0.695788s, ode_to_dolfin=0.002564s, ode_to_pde=0.002351s, pde_assign_previous_before=0.001584s, pde_set_time=0.001473s, pde_update_matrices=0.009269s, pde_update_rhs=0.430465s, pde_linear_solve=0.185341s, pde_scatter_forward=0.000351s, pde_total_step=0.631811s, pde_step=0.632825s, pde_to_ode=0.002839s, ode_from_dolfin=0.000899s, pde_assign_previous_after=0.001199s, total_step=1.356022s
INFO:__main__:Solve for t=10.00, v.max() =np.float64(31.616118199460043), v.min() =np.float64(-89.63423719278785)
INFO:__main__:Average solver time per time step: 0.00688 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=420, t=(10.45000, 10.50000), ksp_iterations=5, ksp_residual_norm=6.451066e-03, ksp_converged_reason=2, ode_function_call=0.722262s, ode_state_update=0.004901s, ode_total_step=0.729607s, ode_step=0.730806s, ode_to_dolfin=0.002705s, ode_to_pde=0.002471s, pde_assign_previous_before=0.001666s, pde_set_time=0.001552s, pde_update_matrices=0.009269s, pde_update_rhs=0.451923s, pde_linear_solve=0.194575s, pde_scatter_forward=0.000373s, pde_total_step=0.662847s, pde_step=0.663909s, pde_to_ode=0.002984s, ode_from_dolfin=0.000947s, pde_assign_previous_after=0.001260s, total_step=1.423542s
INFO:beat.telemetry:PDE step timing step=440, t=(10.95000, 11.00000), ksp_iterations=5, ksp_residual_norm=6.450708e-03, ksp_converged_reason=2, ode_function_call=0.757070s, ode_state_update=0.005132s, ode_total_step=0.764765s, ode_step=0.766019s, ode_to_dolfin=0.002836s, ode_to_pde=0.002590s, pde_assign_previous_before=0.001744s, pde_set_time=0.001628s, pde_update_matrices=0.009269s, pde_update_rhs=0.473452s, pde_linear_solve=0.203780s, pde_scatter_forward=0.000392s, pde_total_step=0.693917s, pde_step=0.695029s, pde_to_ode=0.003125s, ode_from_dolfin=0.000992s, pde_assign_previous_after=0.001322s, total_step=1.491272s
INFO:__main__:Solve for t=11.00, v.max() =np.float64(30.54381536064954), v.min() =np.float64(-89.71610451246843)
INFO:__main__:Average solver time per time step: 0.00688 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=460, t=(11.45000, 11.50000), ksp_iterations=5, ksp_residual_norm=6.448697e-03, ksp_converged_reason=2, ode_function_call=0.791435s, ode_state_update=0.005358s, ode_total_step=0.799468s, ode_step=0.800792s, ode_to_dolfin=0.002969s, ode_to_pde=0.002707s, pde_assign_previous_before=0.001821s, pde_set_time=0.001699s, pde_update_matrices=0.009269s, pde_update_rhs=0.494985s, pde_linear_solve=0.212994s, pde_scatter_forward=0.000408s, pde_total_step=0.724984s, pde_step=0.726144s, pde_to_ode=0.003273s, ode_from_dolfin=0.001036s, pde_assign_previous_after=0.001380s, total_step=1.558525s
INFO:beat.telemetry:PDE step timing step=480, t=(11.95000, 12.00000), ksp_iterations=5, ksp_residual_norm=6.436803e-03, ksp_converged_reason=2, ode_function_call=0.825751s, ode_state_update=0.005600s, ode_total_step=0.834139s, ode_step=0.835518s, ode_to_dolfin=0.003087s, ode_to_pde=0.002823s, pde_assign_previous_before=0.001895s, pde_set_time=0.001772s, pde_update_matrices=0.009269s, pde_update_rhs=0.516514s, pde_linear_solve=0.222216s, pde_scatter_forward=0.000425s, pde_total_step=0.756066s, pde_step=0.757273s, pde_to_ode=0.003410s, ode_from_dolfin=0.001080s, pde_assign_previous_after=0.001440s, total_step=1.625756s
INFO:__main__:Solve for t=12.00, v.max() =np.float64(27.892413772752153), v.min() =np.float64(-90.14739056664547)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=500, t=(12.45000, 12.50000), ksp_iterations=5, ksp_residual_norm=6.430657e-03, ksp_converged_reason=2, ode_function_call=0.860137s, ode_state_update=0.005829s, ode_total_step=0.868866s, ode_step=0.870302s, ode_to_dolfin=0.003223s, ode_to_pde=0.002941s, pde_assign_previous_before=0.001974s, pde_set_time=0.001846s, pde_update_matrices=0.009269s, pde_update_rhs=0.538071s, pde_linear_solve=0.231446s, pde_scatter_forward=0.000440s, pde_total_step=0.787181s, pde_step=0.788433s, pde_to_ode=0.003551s, ode_from_dolfin=0.001137s, pde_assign_previous_after=0.001499s, total_step=1.693077s
INFO:beat.telemetry:PDE step timing step=520, t=(12.95000, 13.00000), ksp_iterations=5, ksp_residual_norm=6.441329e-03, ksp_converged_reason=2, ode_function_call=0.894492s, ode_state_update=0.006054s, ode_total_step=0.903560s, ode_step=0.905052s, ode_to_dolfin=0.003351s, ode_to_pde=0.003069s, pde_assign_previous_before=0.002051s, pde_set_time=0.001918s, pde_update_matrices=0.009269s, pde_update_rhs=0.559571s, pde_linear_solve=0.240650s, pde_scatter_forward=0.000458s, pde_total_step=0.818214s, pde_step=0.819514s, pde_to_ode=0.003685s, ode_from_dolfin=0.001181s, pde_assign_previous_after=0.001562s, total_step=1.760281s
INFO:__main__:Solve for t=13.00, v.max() =np.float64(36.21403307193282), v.min() =np.float64(-90.23100099821878)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=540, t=(13.45000, 13.50000), ksp_iterations=5, ksp_residual_norm=6.448284e-03, ksp_converged_reason=2, ode_function_call=0.929315s, ode_state_update=0.006353s, ode_total_step=0.938808s, ode_step=0.940359s, ode_to_dolfin=0.003497s, ode_to_pde=0.003191s, pde_assign_previous_before=0.002134s, pde_set_time=0.002012s, pde_update_matrices=0.009269s, pde_update_rhs=0.581665s, pde_linear_solve=0.250348s, pde_scatter_forward=0.000474s, pde_total_step=0.850368s, pde_step=0.851717s, pde_to_ode=0.003837s, ode_from_dolfin=0.001227s, pde_assign_previous_after=0.001620s, total_step=1.829205s
INFO:beat.telemetry:PDE step timing step=560, t=(13.95000, 14.00000), ksp_iterations=5, ksp_residual_norm=6.424363e-03, ksp_converged_reason=2, ode_function_call=0.964151s, ode_state_update=0.006631s, ode_total_step=0.974054s, ode_step=0.975662s, ode_to_dolfin=0.003633s, ode_to_pde=0.003307s, pde_assign_previous_before=0.002217s, pde_set_time=0.002090s, pde_update_matrices=0.009269s, pde_update_rhs=0.603275s, pde_linear_solve=0.259585s, pde_scatter_forward=0.000497s, pde_total_step=0.881568s, pde_step=0.882969s, pde_to_ode=0.004000s, ode_from_dolfin=0.001272s, pde_assign_previous_after=0.001694s, total_step=1.897237s
INFO:__main__:Solve for t=14.00, v.max() =np.float64(38.73591052468942), v.min() =np.float64(-91.02768068126953)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': -1.0, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=580, t=(14.45000, 14.50000), ksp_iterations=5, ksp_residual_norm=6.394441e-03, ksp_converged_reason=2, ode_function_call=0.998643s, ode_state_update=0.006857s, ode_total_step=1.008883s, ode_step=1.010547s, ode_to_dolfin=0.003767s, ode_to_pde=0.003426s, pde_assign_previous_before=0.002295s, pde_set_time=0.002164s, pde_update_matrices=0.009269s, pde_update_rhs=0.625320s, pde_linear_solve=0.268771s, pde_scatter_forward=0.000517s, pde_total_step=0.913135s, pde_step=0.914583s, pde_to_ode=0.004152s, ode_from_dolfin=0.001317s, pde_assign_previous_after=0.001754s, total_step=1.965129s
INFO:beat.telemetry:PDE step timing step=600, t=(14.95000, 15.00000), ksp_iterations=5, ksp_residual_norm=6.348886e-03, ksp_converged_reason=2, ode_function_call=1.033203s, ode_state_update=0.007087s, ode_total_step=1.043794s, ode_step=1.045510s, ode_to_dolfin=0.003899s, ode_to_pde=0.003544s, pde_assign_previous_before=0.002373s, pde_set_time=0.002239s, pde_update_matrices=0.009269s, pde_update_rhs=0.647460s, pde_linear_solve=0.278035s, pde_scatter_forward=0.000537s, pde_total_step=0.944883s, pde_step=0.946379s, pde_to_ode=0.004304s, ode_from_dolfin=0.001363s, pde_assign_previous_after=0.001814s, total_step=2.033313s
INFO:__main__:Solve for t=15.00, v.max() =np.float64(36.357581644055266), v.min() =np.float64(-91.23898576258237)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=620, t=(15.45000, 15.50000), ksp_iterations=5, ksp_residual_norm=6.314005e-03, ksp_converged_reason=2, ode_function_call=1.067544s, ode_state_update=0.007317s, ode_total_step=1.078476s, ode_step=1.080246s, ode_to_dolfin=0.004033s, ode_to_pde=0.003663s, pde_assign_previous_before=0.002453s, pde_set_time=0.002315s, pde_update_matrices=0.009269s, pde_update_rhs=0.668954s, pde_linear_solve=0.287291s, pde_scatter_forward=0.000555s, pde_total_step=0.975965s, pde_step=0.977511s, pde_to_ode=0.004445s, ode_from_dolfin=0.001411s, pde_assign_previous_after=0.001874s, total_step=2.100570s
INFO:beat.telemetry:PDE step timing step=640, t=(15.95000, 16.00000), ksp_iterations=5, ksp_residual_norm=6.278104e-03, ksp_converged_reason=2, ode_function_call=1.101833s, ode_state_update=0.007542s, ode_total_step=1.113101s, ode_step=1.114926s, ode_to_dolfin=0.004152s, ode_to_pde=0.003790s, pde_assign_previous_before=0.002529s, pde_set_time=0.002384s, pde_update_matrices=0.009269s, pde_update_rhs=0.690396s, pde_linear_solve=0.296495s, pde_scatter_forward=0.000569s, pde_total_step=1.006925s, pde_step=1.008518s, pde_to_ode=0.004576s, ode_from_dolfin=0.001456s, pde_assign_previous_after=0.001931s, total_step=2.167597s
INFO:__main__:Solve for t=16.00, v.max() =np.float64(39.55295851776965), v.min() =np.float64(-91.811500367793)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=660, t=(16.45000, 16.50000), ksp_iterations=5, ksp_residual_norm=6.243014e-03, ksp_converged_reason=2, ode_function_call=1.136548s, ode_state_update=0.007770s, ode_total_step=1.148168s, ode_step=1.150049s, ode_to_dolfin=0.004309s, ode_to_pde=0.003914s, pde_assign_previous_before=0.002607s, pde_set_time=0.002465s, pde_update_matrices=0.009269s, pde_update_rhs=0.711934s, pde_linear_solve=0.305736s, pde_scatter_forward=0.000590s, pde_total_step=1.038044s, pde_step=1.039687s, pde_to_ode=0.004718s, ode_from_dolfin=0.001500s, pde_assign_previous_after=0.001991s, total_step=2.235304s
INFO:beat.telemetry:PDE step timing step=680, t=(16.95000, 17.00000), ksp_iterations=5, ksp_residual_norm=6.229820e-03, ksp_converged_reason=2, ode_function_call=1.171009s, ode_state_update=0.007997s, ode_total_step=1.182988s, ode_step=1.184924s, ode_to_dolfin=0.004436s, ode_to_pde=0.004030s, pde_assign_previous_before=0.002685s, pde_set_time=0.002563s, pde_update_matrices=0.009269s, pde_update_rhs=0.733442s, pde_linear_solve=0.314995s, pde_scatter_forward=0.000608s, pde_total_step=1.069180s, pde_step=1.070883s, pde_to_ode=0.004860s, ode_from_dolfin=0.001545s, pde_assign_previous_after=0.002048s, total_step=2.302726s
INFO:__main__:Solve for t=17.00, v.max() =np.float64(35.001446691610845), v.min() =np.float64(-91.8433983931623)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=700, t=(17.45000, 17.50000), ksp_iterations=5, ksp_residual_norm=6.226787e-03, ksp_converged_reason=2, ode_function_call=1.205678s, ode_state_update=0.008227s, ode_total_step=1.218008s, ode_step=1.220001s, ode_to_dolfin=0.004581s, ode_to_pde=0.004151s, pde_assign_previous_before=0.002768s, pde_set_time=0.002639s, pde_update_matrices=0.009269s, pde_update_rhs=0.755056s, pde_linear_solve=0.324259s, pde_scatter_forward=0.000629s, pde_total_step=1.100406s, pde_step=1.102158s, pde_to_ode=0.005017s, ode_from_dolfin=0.001594s, pde_assign_previous_after=0.002109s, total_step=2.370579s
INFO:beat.telemetry:PDE step timing step=720, t=(17.95000, 18.00000), ksp_iterations=5, ksp_residual_norm=6.237986e-03, ksp_converged_reason=2, ode_function_call=1.240004s, ode_state_update=0.008452s, ode_total_step=1.252679s, ode_step=1.254727s, ode_to_dolfin=0.004702s, ode_to_pde=0.004267s, pde_assign_previous_before=0.002859s, pde_set_time=0.002711s, pde_update_matrices=0.009269s, pde_update_rhs=0.776567s, pde_linear_solve=0.333482s, pde_scatter_forward=0.000645s, pde_total_step=1.131463s, pde_step=1.133263s, pde_to_ode=0.005156s, ode_from_dolfin=0.001640s, pde_assign_previous_after=0.002167s, total_step=2.437784s
INFO:__main__:Solve for t=18.00, v.max() =np.float64(34.65196141502749), v.min() =np.float64(-92.23417103103628)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=740, t=(18.45000, 18.50000), ksp_iterations=5, ksp_residual_norm=6.192738e-03, ksp_converged_reason=2, ode_function_call=1.274605s, ode_state_update=0.008680s, ode_total_step=1.287623s, ode_step=1.289725s, ode_to_dolfin=0.004837s, ode_to_pde=0.004384s, pde_assign_previous_before=0.002937s, pde_set_time=0.002785s, pde_update_matrices=0.009269s, pde_update_rhs=0.798017s, pde_linear_solve=0.342684s, pde_scatter_forward=0.000662s, pde_total_step=1.162439s, pde_step=1.164287s, pde_to_ode=0.005290s, ode_from_dolfin=0.001683s, pde_assign_previous_after=0.002229s, total_step=2.505177s
INFO:beat.telemetry:PDE step timing step=760, t=(18.95000, 19.00000), ksp_iterations=5, ksp_residual_norm=6.157724e-03, ksp_converged_reason=2, ode_function_call=1.309218s, ode_state_update=0.008923s, ode_total_step=1.322600s, ode_step=1.324759s, ode_to_dolfin=0.004979s, ode_to_pde=0.004504s, pde_assign_previous_before=0.003021s, pde_set_time=0.002860s, pde_update_matrices=0.009269s, pde_update_rhs=0.819592s, pde_linear_solve=0.352002s, pde_scatter_forward=0.000682s, pde_total_step=1.193670s, pde_step=1.195569s, pde_to_ode=0.005434s, ode_from_dolfin=0.001729s, pde_assign_previous_after=0.002289s, total_step=2.572910s
INFO:__main__:Solve for t=19.00, v.max() =np.float64(32.354750762747045), v.min() =np.float64(-92.73790063918632)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:PDE step timing step=780, t=(19.45000, 19.50000), ksp_iterations=5, ksp_residual_norm=6.123312e-03, ksp_converged_reason=2, ode_function_call=1.344676s, ode_state_update=0.009162s, ode_total_step=1.358430s, ode_step=1.360647s, ode_to_dolfin=0.005134s, ode_to_pde=0.004632s, pde_assign_previous_before=0.003104s, pde_set_time=0.002944s, pde_update_matrices=0.009269s, pde_update_rhs=0.841209s, pde_linear_solve=0.361248s, pde_scatter_forward=0.000712s, pde_total_step=1.224905s, pde_step=1.226858s, pde_to_ode=0.005602s, ode_from_dolfin=0.001775s, pde_assign_previous_after=0.002371s, total_step=2.641607s
INFO:beat.telemetry:PDE step timing step=800, t=(19.95000, 20.00000), ksp_iterations=5, ksp_residual_norm=6.087515e-03, ksp_converged_reason=2, ode_function_call=1.379150s, ode_state_update=0.009397s, ode_total_step=1.393249s, ode_step=1.395521s, ode_to_dolfin=0.005257s, ode_to_pde=0.004748s, pde_assign_previous_before=0.003181s, pde_set_time=0.003018s, pde_update_matrices=0.009269s, pde_update_rhs=0.862685s, pde_linear_solve=0.370515s, pde_scatter_forward=0.000731s, pde_total_step=1.255986s, pde_step=1.257986s, pde_to_ode=0.005744s, ode_from_dolfin=0.001820s, pde_assign_previous_after=0.002431s, total_step=2.708953s
INFO:__main__:Solve for t=20.00, v.max() =np.float64(32.56449196104626), v.min() =np.float64(-92.8468358247903)
INFO:__main__:Average solver time per time step: 0.00687 s
INFO:__main__:{'P1': 1.2500000000000004, 'P2': -1.0, 'P3': -1.0, 'P4': -1.0, 'P5': 14.000000000000064, 'P6': -1.0, 'P7': -1.0, 'P8': -1.0, 'P9': -1.0}
INFO:beat.telemetry:
==================================================
               PERFORMANCE SUMMARY                
==================================================
Total Steps:           802
KSP Total Iterations:  2005
KSP Max Iterations:    5
--------------------------------------------------
Metric                              |   Time (s)
--------------------------------------------------
total_step                          |     2.7158
ode_step                            |     1.3991
ode_total_step                      |     1.3968
ode_function_call                   |     1.3827
pde_step                            |     1.2611
pde_total_step                      |     1.2591
pde_update_rhs                      |     0.8648
pde_linear_solve                    |     0.3714
ode_state_update                    |     0.0094
pde_update_matrices                 |     0.0093
pde_to_ode                          |     0.0058
ode_to_dolfin                       |     0.0053
ode_to_pde                          |     0.0048
pde_assign_previous_before          |     0.0032
pde_set_time                        |     0.0030
pde_assign_previous_after           |     0.0024
ode_from_dolfin                     |     0.0018
pde_scatter_forward                 |     0.0007
==================================================
INFO:beat.telemetry:Performance summary saved to results-niederer-benchmark/performance_summary.json

_

# Save activation times
activation_times["dx"] = dx
activation_times["dt"] = dt
at_file_name = output_dir / "activation_times.json"
if at_file_name.is_file():
    all_at = json.loads(at_file_name.read_text())
else:
    all_at = []
all_at.append(activation_times)
at_file_name.write_text(json.dumps(all_at, indent=2))
213

The activation times are saved in the file output-niederer-benchmark/activation_times.json. The file contains a list of dictionaries, each dictionary contains the activation times for a specific dx and dt. Here are the activation times for the different dx and dt:

dx

dt

P1

P2

P3

P4

P5

P6

P7

P8

P9

0

0.5

0.05

1.25

51.1

34.9

58.9

14.1

49.5

34

56.65

26.05

1

0.5

0.01

1.22

50.85

33.96

58.05

13.98

49.36

33.07

55.91

25.64

2

0.5

0.005

1.215

50.775

33.825

57.96

13.97

49.345

32.945

55.825

25.595

3

0.2

0.05

1.25

29.7

32.9

40.2

9.55

30

32.95

39.9

18.9

4

0.2

0.01

1.24

29.09

31.25

38.66

9.34

29.4

31.29

38.42

18.14

5

0.2

0.005

1.235

29.015

31.05

38.475

9.315

29.32

31.08

38.235

18.045

6

0.1

0.05

1.25

26.85

33.3

40.35

8.4

27.5

33.85

40.55

18.95

7

0.1

0.01

1.23

25.64

31.46

38.08

8.03

26.24

31.94

38.21

17.95

8

0.1

0.005

1.225

25.5

31.26

37.81

7.99

26.09

31.72

37.93

17.835

[LGA+15]

Sander Land, Viatcheslav Gurev, Sander Arens, Christoph M Augustin, Lukas Baron, Robert Blake, Chris Bradley, Sebastian Castro, Andrew Crozier, Marco Favino, and others. Verification of cardiac mechanics software: benchmark problems and solutions for testing active and passive material behavior. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 471(2184):20150641, 2015.

[SLC+07]

Joakim Sundnes, Glenn Terje Lines, Xing Cai, Bjørn Frederik Nielsen, Kent-Andre Mardal, and Aslak Tveito. Computing the electrical activity in the heart. Volume 1. Springer Science & Business Media, 2007.

[ZLH+21]

Zhaoyang Zhang, Michael B Liu, Xiaodong Huang, Zhen Song, and Zhilin Qu. Mechanisms of premature ventricular complexes caused by qt prolongation. Biophysical journal, 120(2):352–369, 2021.