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

Go to the source code of this file.

Functions

int RESsetup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
 

Function Documentation

int RESsetup ( SMPmatrix matrix,
GENmodel inModel,
CKTcircuit ckt,
int *  state 
)

Definition at line 17 of file ressetup.c.

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
#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