From b5fd97948486c6cdedfd0a800cef7edf2dd7cf59 Mon Sep 17 00:00:00 2001 From: Jiaqi Zhang Date: Wed, 1 Jun 2022 15:56:43 -0400 Subject: [PATCH] fix step-81 warnings --- examples/step-81/step-81.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/step-81/step-81.cc b/examples/step-81/step-81.cc index d6bb85848b..c47b790e24 100644 --- a/examples/step-81/step-81.cc +++ b/examples/step-81/step-81.cc @@ -174,8 +174,8 @@ namespace Step81 mu_inv_2, "inverse of relative permeability of material 2"); - sigma_tensor[0][0] = 0.001 + 0.2i; - sigma_tensor[1][1] = 0.001 + 0.2i; + sigma_tensor[0][0] = std::complex(0.001, 0.2); + sigma_tensor[1][1] = std::complex(0.001, 0.2); add_parameter("sigma", sigma_tensor, "surface conductivity between material 1 and material 2"); @@ -318,7 +318,7 @@ namespace Step81 const double s = strength * ((radius - inner_radius) * (radius - inner_radius)) / ((outer_radius - inner_radius) * (outer_radius - inner_radius)); - return 1.0 + 1.0i * s; + return std::complex(1.0, s); } else { @@ -340,7 +340,7 @@ namespace Step81 (radius - inner_radius)) / (radius * (outer_radius - inner_radius) * (outer_radius - inner_radius)); - return 1.0 + 1.0i * s_bar; + return std::complex(1.0, s_bar); } else { -- 2.39.5