From: Jiaqi Zhang Date: Wed, 1 Jun 2022 19:56:43 +0000 (-0400) Subject: fix step-81 warnings X-Git-Tag: v9.4.0-rc1~80^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5fd97948486c6cdedfd0a800cef7edf2dd7cf59;p=dealii.git fix step-81 warnings --- 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 {