Jspice3
indfbr.c File Reference
#include "spice.h"
#include <stdio.h>
#include "inddefs.h"
#include "util.h"
#include "sperror.h"
#include "cktext.h"
Include dependency graph for indfbr.c:

Go to the source code of this file.

Functions

int INDfindBr (CKTcircuit *ckt, GENmodel *inModel, IFuid name)
 

Function Documentation

int INDfindBr ( CKTcircuit ckt,
GENmodel inModel,
IFuid  name 
)

Definition at line 17 of file indfbr.c.

22 {
23  INDmodel *model = (INDmodel *)inModel;
24  INDinstance *here;
25  int error;
26  CKTnode *tmp;
27 
28  for ( ; model != NULL; model = model->INDnextModel) {
29  for (here = model->INDinstances; here != NULL;
30  here = here->INDnextInstance) {
31  if (here->INDname == name) {
32  if (here->INDbrEq == 0) {
33  error = CKTmkCur(ckt,&tmp,here->INDname,"branch");
34  if (error) return(error);
35  here->INDbrEq = tmp->number;
36  }
37  return(here->INDbrEq);
38  }
39  }
40  }
41  return(0);
42 }
struct sINDmodel * INDnextModel
Definition: inddefs.h:96
struct sINDinstance * INDnextInstance
Definition: inddefs.h:27
#define NULL
Definition: spdefs.h:121
INDinstance * INDinstances
Definition: inddefs.h:99
int number
Definition: cktdefs.h:39
int CKTmkCur()
static char model[32]
Definition: subckt.c:76
IFuid INDname
Definition: inddefs.h:30
int INDbrEq
Definition: inddefs.h:42