From 4a22a80a1726d1d5584b1086d32fc5c9f8f06273 Mon Sep 17 00:00:00 2001 From: Dengda98 Date: Tue, 17 Jun 2025 17:07:34 +0800 Subject: [PATCH] REFAC: update temp var for `R_EVL` to improve code readability --- pygrt/C_extension/src/dynamic/propagate.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pygrt/C_extension/src/dynamic/propagate.c b/pygrt/C_extension/src/dynamic/propagate.c index 115fdfda..c06f3315 100755 --- a/pygrt/C_extension/src/dynamic/propagate.c +++ b/pygrt/C_extension/src/dynamic/propagate.c @@ -363,7 +363,7 @@ void kernel( source_coef(src_xa, src_xb, src_kaka, src_kbkb, k, src_coef); // 临时中转矩阵 (temperary) - MYCOMPLEX tmpR2[2][2], tmp2x2[2][2], tmpRL, tmp2x2_uiz[2][2], tmpRL_uiz; + MYCOMPLEX tmpR2[2][2], tmp2x2[2][2], tmpRL, tmp2x2_uiz[2][2], tmpRL2; MYCOMPLEX inv_2x2T[2][2], invT; // 递推RU_FA @@ -438,10 +438,11 @@ void kernel( if(calc_uiz) cmat2x2_assign(tmp2x2, tmp2x2_uiz); // 为后续计算空间导数备份 cmat2x2_mul(R_EV, tmp2x2, tmp2x2); - tmpRL = R_EVL * invT / (RONE - RDL_BL * RUL_FB); + tmpRL = invT / (RONE - RDL_BL * RUL_FB); + tmpRL2 = R_EVL * tmpRL; for(MYINT i=0; i