Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions finitewave/core/model/cardiac_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def compute_weights(self):

self.weights = self.stencil.compute_weights(self, self.cardiac_tissue)

def run(self, initialize=True, num_of_theads=None):
def run(self, initialize=True, num_of_threads=None):
"""
Runs the simulation loop. Handles stimuli, diffusion, ionic kernel
updates, and tracking.
Expand All @@ -143,13 +143,13 @@ def run(self, initialize=True, num_of_theads=None):

numba.set_num_threads(numba.config.NUMBA_NUM_THREADS)

if num_of_theads is not None:
if num_of_theads > numba.config.NUMBA_NUM_THREADS:
if num_of_threads is not None:
if num_of_threads > numba.config.NUMBA_NUM_THREADS:
warnings.warn(
f"Selected number of threads ({num_of_theads}) exceeds the available threads ({numba.config.NUMBA_NUM_THREADS}). "
f"Selected number of threads ({num_of_threads}) exceeds the available threads ({numba.config.NUMBA_NUM_THREADS}). "
f"Using the maximum available threads instead."
)
num_of_theads = min(num_of_theads, numba.config.NUMBA_NUM_THREADS)
num_of_theads = min(num_of_threads, numba.config.NUMBA_NUM_THREADS)
numba.set_num_threads(num_of_theads)

if self.t_max < self.t:
Expand Down
Loading