From 87cfb91d42dd474851123a2139a8774423f8e58a Mon Sep 17 00:00:00 2001 From: Alisa Galishnikova <55898700+alisagk@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:25:36 -0500 Subject: [PATCH] switched to "no grad" condition for Dr at the axis --- src/kernels/ampere_gr.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/kernels/ampere_gr.hpp b/src/kernels/ampere_gr.hpp index 1d7e4f87..24a2eb35 100644 --- a/src/kernels/ampere_gr.hpp +++ b/src/kernels/ampere_gr.hpp @@ -76,18 +76,14 @@ namespace kernel::gr { if ((i2 == i2min) && is_axis_i2min) { // theta = 0 - const real_t inv_polar_area_pH { ONE / metric.polar_area(i1_ + HALF) }; const real_t inv_sqrt_detH_0pH { ONE / metric.sqrt_det_h({ i1_, HALF }) }; - Dout(i1, i2, em::dx1) = Din(i1, i2, em::dx1) + - inv_polar_area_pH * coeff * H(i1, i2, em::hx3); + Dout(i1, i2, em::dx1) = Din(i1, i2 + 1, em::dx1); Dout(i1, i2, em::dx2) = Din(i1, i2, em::dx2) + coeff * inv_sqrt_detH_0pH * (H(i1 - 1, i2, em::hx3) - H(i1, i2, em::hx3)); } else if ((i2 == i2max) && is_axis_i2max) { // theta = pi - const real_t inv_polar_area_pH { ONE / metric.polar_area(i1_ + HALF) }; - Dout(i1, i2, em::dx1) = Din(i1, i2, em::dx1) - inv_polar_area_pH * coeff * - H(i1, i2 - 1, em::hx3); + Dout(i1, i2, em::dx1) = Din(i1, i2 - 1, em::dx1); } else { const real_t inv_sqrt_detH_00 { ONE / metric.sqrt_det_h({ i1_, i2_ }) }; const real_t inv_sqrt_detH_pH0 { ONE / metric.sqrt_det_h(