From e26c1707eef3b23eaf4a44b911b00e53a93785ca Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Thu, 11 Aug 2022 09:25:51 -0400 Subject: [PATCH] fix NanoComp/meep#2189 --- src/maxwell/maxwell_eps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/maxwell/maxwell_eps.c b/src/maxwell/maxwell_eps.c index 145e240..e7ff93f 100644 --- a/src/maxwell/maxwell_eps.c +++ b/src/maxwell/maxwell_eps.c @@ -585,7 +585,7 @@ void set_maxwell_dielectric(maxwell_data *md, r[1] = i2 * s2; r[2] = i3 * s3; - if (mesh_prod == 1) { + if (epsilon && mesh_prod == 1) { epsilon(&eps_mean, &eps_inv_mean, r, epsilon_data); md->eps_inv[xyz_index] = eps_inv_mean; goto got_eps_inv;