vbicgetic.c

来自「ngspice又一个电子CAD仿真软件代码.功能更全」· C语言 代码 · 共 50 行

C
50
字号
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1985 Thomas L. QuarlesModel Author: 1995 Colin McAndrew MotorolaSpice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH**********//* * This routine gets the device initial conditions for the VBICs * from the RHS vector */#include "ngspice.h"#include "cktdefs.h"#include "vbicdefs.h"#include "sperror.h"#include "suffix.h"intVBICgetic(GENmodel *inModel, CKTcircuit *ckt){    VBICmodel *model = (VBICmodel*)inModel;    VBICinstance *here;    /*     * grab initial conditions out of rhs array.   User specified, so use     * external nodes to get values     */    for( ; model ; model = model->VBICnextModel) {        for(here = model->VBICinstances; here ; here = here->VBICnextInstance) {            if (here->VBICowner != ARCHme) continue;            if(!here->VBICicVBEGiven) {                here->VBICicVBE =                         *(ckt->CKTrhs + here->VBICbaseNode) -                         *(ckt->CKTrhs + here->VBICemitNode);            }            if(!here->VBICicVCEGiven) {                here->VBICicVCE =                         *(ckt->CKTrhs + here->VBICcollNode) -                         *(ckt->CKTrhs + here->VBICemitNode);            }        }    }    return(OK);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?