Cast sigma0 to float so that a numpy scalar cannot promote the float32 loop
1 changed file+1−1
src/cymsim/simulate.pymodified+1−1View file
@@ -311,7 +311,7 @@ class Simulator:
311311 # ---- one sub-step and its block loop
312312 def _build_step(self):
313313 sh, sched, rad = self.shell, self.schedule, self.radiation
314- dt, sigma0 = self.dt, self.config.material.sigma0
314+ dt, sigma0 = self.dt, float(self.config.material.sigma0) # a numpy scalar would promote float32
315315 m, W, N = self.substeps, self.span, self.mesh.n_nodes
316316 spb = self.config.numerics.steps_per_block
317317 tri, normal = sh.tri_j, sh.normal_j