Jspice3
ressetup.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1985 Thomas L. Quarles
5  1992 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #include "spice.h"
9 #include <stdio.h>
10 #include "resdefs.h"
11 #include "sperror.h"
12 #include "util.h"
13 
14 
15 /* ARGSUSED */
16 int
17 RESsetup(matrix,inModel,ckt,state)
18 
19 /* load the resistor structure with those pointers needed later
20  * for fast matrix loading
21  */
22 SMPmatrix *matrix;
23 GENmodel *inModel;
24 CKTcircuit*ckt;
25 int *state;
26 {
27  RESmodel *model = (RESmodel *)inModel;
28  RESinstance *here;
29 
30  /* loop through all the resistor models */
31  for ( ; model != NULL; model = model->RESnextModel) {
32 
33  /* loop through all the instances of the model */
34  for (here = model->RESinstances; here != NULL;
35  here = here->RESnextInstance) {
36 
37  TSTALLOC(RESposPosptr, RESposNode, RESposNode);
38  TSTALLOC(RESnegNegptr, RESnegNode, RESnegNode);
39  TSTALLOC(RESposNegptr, RESposNode, RESnegNode);
40  TSTALLOC(RESnegPosptr, RESnegNode, RESposNode);
41  }
42  }
43  return(OK);
44 }
struct sRESmodel * RESnextModel
Definition: resdefs.h:56
int RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
Definition: ressetup.c:17
#define TSTALLOC(ptr, first, second)
Definition: devdefs.h:124
#define OK
Definition: iferrmsg.h:17
#define NULL
Definition: spdefs.h:121
static char model[32]
Definition: subckt.c:76
RESinstance * RESinstances
Definition: resdefs.h:58
struct sRESinstance * RESnextInstance
Definition: resdefs.h:20
#define SMPmatrix
Definition: smpdefs.h:11