tmp
authoryu.dongliang <18588496441@163.com>
Thu, 16 Nov 2023 05:15:08 +0000 (13:15 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 16 Nov 2023 05:15:08 +0000 (13:15 +0800)
ses_step_va_bridge.c

index 4c83cebe113fb8ecf39eb1de1cbf08ef6d639b4c..9545d4b8933fe228d6329da1bd737a4622c8602c 100644 (file)
@@ -9,6 +9,7 @@ int __ses_flow_a_pos(ScfEfunction* f, ses_flow_t* flow, double a_bridge, double
        ScfEpin*    vip  = flow->vip;
        ScfEpin*    p0;
        ScfEpin*    p;
+       ScfEline*   el;
 
        double tr  = flow->pos_r;
        double jtr = flow->pos_jr;
@@ -46,10 +47,11 @@ int __ses_flow_a_pos(ScfEfunction* f, ses_flow_t* flow, double a_bridge, double
                        p->v  -= v;
                        p->jv -= jv;
 
-                       f->elines[p->lid]->v  = p->v;
-                       f->elines[p->lid]->jv = p->jv;
+                       el     = f->elines[p->lid];
+                       el->v  = p->v;
+                       el->jv = p->jv;
 
-                       scf_logw("c%ldp%ld->v: %lg, r: %lg\n", p->cid, p->id, p->v, r);
+                       scf_logw("c%ldp%ld->v: %lg, r: %lg, l%ld->v: %lg\n", p->cid, p->id, p->v, r, el->id, el->v);
                        break;
                }
 
@@ -66,10 +68,11 @@ int __ses_flow_a_pos(ScfEfunction* f, ses_flow_t* flow, double a_bridge, double
                vip->v  -= v;
                vip->jv -= jv;
 
-               f->elines[vip->lid]->v  = vip->v;
-               f->elines[vip->lid]->jv = vip->jv;
+               el     = f->elines[vip->lid];
+               el->v  = vip->v;
+               el->jv = vip->jv;
 
-               scf_logw("c%ldp%ld->v: %lg, r: %lg\n", vip->cid, vip->id, vip->v, tr);
+               scf_logw("c%ldp%ld->v: %lg, r: %lg, l%ld->v: %lg\n", vip->cid, vip->id, vip->v, tr, el->id, el->v);
        }
 
        return 0;
@@ -84,6 +87,7 @@ int __ses_flow_v_neg(ScfEfunction* f, ses_flow_t* flow, double dv_vip, double dj
        ScfEpin*    vip  = flow->vip;
        ScfEpin*    p0;
        ScfEpin*    p;
+       ScfEline*   el;
 
        double tr  = flow->neg_r;
        double jtr = flow->neg_jr;
@@ -129,10 +133,11 @@ int __ses_flow_v_neg(ScfEfunction* f, ses_flow_t* flow, double dv_vip, double dj
                        p->v  += v;
                        p->jv += jv;
 
-                       f->elines[p->lid]->v  = p->v;
-                       f->elines[p->lid]->jv = p->jv;
+                       el     = f->elines[p->lid];
+                       el->v  = p->v;
+                       el->jv = p->jv;
 
-                       scf_loge("c%ldp%ld->v: %lg, r: %lg, %lg\n", p->cid, p->id, p->v, r, p->sr);
+                       scf_logw("c%ldp%ld->v: %lg, r: %lg, l%ld->v: %lg\n", p->cid, p->id, p->v, r, el->id, el->v);
                }
 
                assert(p0);
@@ -151,10 +156,11 @@ int __ses_flow_v_neg(ScfEfunction* f, ses_flow_t* flow, double dv_vip, double dj
                        vip->v  += v;
                        vip->jv += jv;
 
-                       f->elines[vip->lid]->v  = vip->v;
-                       f->elines[vip->lid]->jv = vip->jv;
+                       el     = f->elines[vip->lid];
+                       el->v  = vip->v;
+                       el->jv = vip->jv;
 
-                       scf_logw("c%ldp%ld->v: %lg + j%lg, r: %lg + j%lg\n", vip->cid, vip->id, vip->v, vip->jv, tr, jtr);
+                       scf_logw("c%ldp%ld->v: %lg, r: %lg, l%ld->v: %lg\n", vip->cid, vip->id, vip->v, tr, el->id, el->v);
                }
        }
 
@@ -343,7 +349,7 @@ static int __ses_path_va_bridge(ScfEfunction* f, ses_path_t* bridge, int* change
                k++;
        } while (k < 3);
 
-       scf_logw("bridge: %d, c%ldp%ld--c%ldp%ld, v: %lg, p0->v: %lg, p1->v: %lg, n_diodes: %d, p0->a: %lg, p1->a: %lg\n",
+       scf_loge("bridge: %d, c%ldp%ld--c%ldp%ld, v: %lg, p0->v: %lg, p1->v: %lg, n_diodes: %d, p0->a: %lg, p1->a: %lg\n",
                        bridge->index, p0->cid, p0->id, p1->cid, p1->id, v, p0->v, p1->v, bridge->n_diodes, p0->a, p1->a);
 
        return 0;