⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 niniter.c

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 C
字号:
/**********Copyright 1990 Regents of the University of California.  All rights reserved.Author: 1987 Gary W. Ng**********/#include "spice.h"#include "cktdefs.h"#include "suffix.h"/* * NInzIter (ckt, posDrive, negDrive) * * This routine solves the adjoint system.  It assumes that the matrix has * already been loaded by a call to NIacIter, so it only alters the right * hand side vector.  The unit-valued current excitation is applied * between nodes posDrive and negDrive. */extern void SMPcaSolve();voidNInzIter(ckt, posDrive, negDrive)    CKTcircuit *ckt;    int posDrive;    int negDrive;{    int i;    /* clear out the right hand side vector */    for (i=0; i<= SMPmatSize((SMPmatrix *)ckt->CKTmatrix); i++) {	*((ckt->CKTrhs) + i) = 0.0;	*((ckt->CKTirhs) + i) = 0.0;    }    *((ckt->CKTrhs) + posDrive) = 1.0;     /* apply unit current excitation */    *((ckt->CKTrhs) + negDrive) = -1.0;    SMPcaSolve(ckt->CKTmatrix, ckt->CKTrhs, ckt->CKTirhs, ckt->CKTrhsSpare,	    ckt->CKTirhsSpare);    *ckt->CKTrhs = 0.0;    *ckt->CKTirhs = 0.0;}

⌨️ 快捷键说明

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