From c61ae8516aecd9697bc8636ea67ec942cdb057e6 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 10 Sep 2023 13:42:54 +0800 Subject: [PATCH] __ses_path_split_i() --- ses_step_va_diode.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ses_step_va_diode.c b/ses_step_va_diode.c index a98d1a4..cdd57be 100644 --- a/ses_step_va_diode.c +++ b/ses_step_va_diode.c @@ -27,21 +27,25 @@ void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, double la, d *a -= child->a; *ja -= child->ja; - cp0->a = child->a; - cp0->ja = child->ja; cp1->a = child->a; cp1->ja = child->ja; + if (child->childs) + __ses_path_split_i(child, cp0, cp1, child->a, child->ja, &cp1->a, &cp1->ja); + + cp0->a = cp1->a; + cp0->ja = cp1->ja; + double cr; double jcr; - ses_ui_r(&cp1->dr, &cp1->jdr, v, jv, child->a, child->ja); + ses_ui_r(&cp1->dr, &cp1->jdr, v, jv, cp1->a, cp1->ja); - cp1->dr -= child->r; - cp1->jdr -= child->jr; + cp1->dr -= cp1->sr; + cp1->jdr -= cp1->jsr; - scf_loge("j: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, child->r: %lg + j%lg, child->a: %lg + j%lg, el->a: %lg + j%lg, cp1->dr: %lg + j%lg\n", - j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, jv, child->r, child->jr, child->a, child->ja, la, jla, cp1->dr, cp1->jdr); + scf_loge("j: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, child->r: %lg + j%lg, cp1->a: %lg + j%lg, el->a: %lg + j%lg, cp1->dr: %lg + j%lg\n", + j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, jv, child->r, child->jr, cp1->a, cp1->ja, la, jla, cp1->dr, cp1->jdr); } } -- 2.25.1