From 3a100bdc64f730ca8bb38ab19c12ddc7999b96b2 Mon Sep 17 00:00:00 2001 From: stefanjones Date: Mon, 14 Jul 2003 16:34:04 +0000 Subject: [PATCH] Modified Files: Tag: TCLSPICE ChangeLog src/include/enh.h src/include/optdefs.h src/spicelib/analysis/acan.c src/spicelib/analysis/cktload.c src/spicelib/analysis/cktsetup.c src/spicelib/analysis/cktsopt.c src/spicelib/devices/cktinit.c Removed XSPICE rshunt option, use gshunt from ngspice instead --- ChangeLog | 7 ++++++ src/include/enh.h | 12 ---------- src/include/optdefs.h | 1 - src/spicelib/analysis/acan.c | 14 ------------ src/spicelib/analysis/cktload.c | 22 ------------------ src/spicelib/analysis/cktsetup.c | 38 -------------------------------- src/spicelib/analysis/cktsopt.c | 10 --------- src/spicelib/devices/cktinit.c | 1 - 8 files changed, 7 insertions(+), 98 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a09ee930..88b5ddfe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ +2003-07-14 Stefan Jones + + * src/include/enh.h src/spicelib/analysis/{acan.c,cktload.c,cktsetup.c,cktsopt.c} + src/spicelib/devices/cktinit.c src/include/optdefs.h : + Removed XSPICE rshunt option, use gshunt from ngspice instead. + 2003-07-09 Stefan Jones + * configure.in : Add extra check for tclreadline and headers 2003-04-14 Stefan Jones diff --git a/src/include/enh.h b/src/include/enh.h index 18108d4be..8616191b2 100755 --- a/src/include/enh.h +++ b/src/include/enh.h @@ -83,25 +83,13 @@ typedef struct { double step; /* Fractional step amount */ } Enh_Conv_Limit_t; - -typedef struct { - Mif_Boolean_t enabled; /* True if rshunt option used */ - double gshunt; /* 1.0 / rshunt */ - int num_nodes; /* Number of nodes in matrix */ - double **diag; /* Pointers to matrix diagonals */ -} Enh_Rshunt_t; - - typedef struct { Enh_Bkpt_t breakpoint; /* Data used by dynamic breakpoints */ Enh_Ramp_t ramp; /* New options added to simulator */ Enh_Conv_Debug_t conv_debug; /* Convergence debug info dumping data */ Enh_Conv_Limit_t conv_limit; /* Convergence limiting info */ - Enh_Rshunt_t rshunt_data; /* Shunt conductance from nodes to ground */ } Enh_Ckt_Data_t; - - void ENHreport_conv_prob(Enh_Conv_Source_t type, char *name, char *msg); struct line *ENHtranslate_poly(struct line *deck); diff --git a/src/include/optdefs.h b/src/include/optdefs.h index 5df48e853..d2f14fb95 100644 --- a/src/include/optdefs.h +++ b/src/include/optdefs.h @@ -126,7 +126,6 @@ typedef struct { #define OPT_ENH_CONV_ABS_STEP 105 #define OPT_ENH_CONV_STEP 106 #define OPT_MIF_AUTO_PARTIAL 107 -#define OPT_ENH_RSHUNT 108 /* gtri - end - wbk - add new options */ #endif diff --git a/src/spicelib/analysis/acan.c b/src/spicelib/analysis/acan.c index 02ea0cf51..cce782bca 100644 --- a/src/spicelib/analysis/acan.c +++ b/src/spicelib/analysis/acan.c @@ -365,20 +365,6 @@ CKTacLoad(CKTcircuit *ckt) } #ifdef XSPICE - /* gtri - begin - Put resistors to ground at all nodes. */ - /* Value of resistor is set by new "rshunt" option. */ - - if(ckt->enh->rshunt_data.enabled) { - for(i = 0; i < ckt->enh->rshunt_data.num_nodes; i++) { - *(ckt->enh->rshunt_data.diag[i]) += - ckt->enh->rshunt_data.gshunt; - } - } - - /* gtri - end - Put resistors to ground at all nodes */ - - - /* gtri - add - wbk - 11/26/90 - reset the MIF init flags */ /* init is set by CKTinit and should be true only for first load call */ diff --git a/src/spicelib/analysis/cktload.c b/src/spicelib/analysis/cktload.c index e86bec724..dbe383845 100644 --- a/src/spicelib/analysis/cktload.c +++ b/src/spicelib/analysis/cktload.c @@ -44,16 +44,6 @@ CKTload(CKTcircuit *ckt) int noncon; #endif /* STEPDEBUG */ -#ifdef XSPICE - /* gtri - begin - Put resistors to ground at all nodes */ - /* SMPmatrix *matrix; maschmann : deleted , because unused */ - - double gshunt; - int num_nodes; - - /* gtri - begin - Put resistors to ground at all nodes */ -#endif - startTime = (*(SPfrontEnd->IFseconds))(); size = SMPmatSize(ckt->CKTmatrix); for (i=0;i<=size;i++) { @@ -95,19 +85,7 @@ CKTload(CKTcircuit *ckt) /* gtri - end - wbk - 11/26/90 */ - /* gtri - begin - Put resistors to ground at all nodes. */ - /* Value of resistor is set by new "rshunt" option. */ - - if(ckt->enh->rshunt_data.enabled) { - gshunt = ckt->enh->rshunt_data.gshunt; - num_nodes = ckt->enh->rshunt_data.num_nodes; - for(i = 0; i < num_nodes; i++) { - *(ckt->enh->rshunt_data.diag[i]) += gshunt; - } - } #endif - /* gtri - end - Put resistors to ground at all nodes */ - if(ckt->CKTmode & MODEDC) { /* consider doing nodeset & ic assignments */ diff --git a/src/spicelib/analysis/cktsetup.c b/src/spicelib/analysis/cktsetup.c index d5f05c021..964f35b26 100644 --- a/src/spicelib/analysis/cktsetup.c +++ b/src/spicelib/analysis/cktsetup.c @@ -31,12 +31,6 @@ CKTsetup(CKTcircuit *ckt) { int i; int error; -#ifdef XSPICE - /* gtri - begin - Setup for adding rshunt option resistors */ - CKTnode *node; - int num_nodes; - /* gtri - end - Setup for adding rshunt option resistors */ -#endif SMPmatrix *matrix; ckt->CKTnumStates=0; @@ -80,38 +74,6 @@ CKTsetup(CKTcircuit *ckt) error = NIreinit(ckt); if(error) return(error); } -#ifdef XSPICE - /* gtri - begin - Setup for adding rshunt option resistors */ - - if(ckt->enh->rshunt_data.enabled) { - - /* Count number of voltage nodes in circuit */ - for(num_nodes = 0, node = ckt->CKTnodes; node; node = node->next) - if((node->type == NODE_VOLTAGE) && (node->number != 0)) - num_nodes++; - - /* Allocate space for the matrix diagonal data */ - if(num_nodes > 0) { - ckt->enh->rshunt_data.diag = - (double **) MALLOC(num_nodes * sizeof(double *)); - } - - /* Set the number of nodes in the rshunt data */ - ckt->enh->rshunt_data.num_nodes = num_nodes; - - /* Get/create matrix diagonal entry following what RESsetup does */ - for(i = 0, node = ckt->CKTnodes; node; node = node->next) { - if((node->type == NODE_VOLTAGE) && (node->number != 0)) { - ckt->enh->rshunt_data.diag[i] = - SMPmakeElt(matrix,node->number,node->number); - i++; - } - } - - } - - /* gtri - end - Setup for adding rshunt option resistors */ -#endif return(OK); } diff --git a/src/spicelib/analysis/cktsopt.c b/src/spicelib/analysis/cktsopt.c index 3a963bf53..344af45c0 100644 --- a/src/spicelib/analysis/cktsopt.c +++ b/src/spicelib/analysis/cktsopt.c @@ -184,15 +184,6 @@ CKTsetOpt(void *ckt, void *anal, int opt, IFvalue *val) g_mif_info.auto_partial.global = MIF_TRUE; break; - case OPT_ENH_RSHUNT: - if(val->rValue > 1.0e-30) { - ((CKTcircuit *) ckt)->enh->rshunt_data.enabled = MIF_TRUE; - ((CKTcircuit *) ckt)->enh->rshunt_data.gshunt = 1.0 / val->rValue; - } - else { - printf("WARNING - Rshunt option too small. Ignored.\n"); - } - break; #endif /* gtri - end - wbk - add new options */ default: @@ -211,7 +202,6 @@ static IFparm OPTtbl[] = { { "convstep", OPT_ENH_CONV_STEP, IF_SET|IF_REAL, "Fractional step allowed by code model inputs between iterations" }, { "convabsstep", OPT_ENH_CONV_ABS_STEP, IF_SET|IF_REAL, "Absolute step allowed by code model inputs between iterations" }, { "autopartial", OPT_MIF_AUTO_PARTIAL, IF_SET|IF_FLAG, "Use auto-partial computation for all models" }, - { "rshunt", OPT_ENH_RSHUNT, IF_SET|IF_REAL, "Shunt resistance from analog nodes to ground" }, /* gtri - end - wbk - add new options */ #endif { "noopiter", OPT_NOOPITER,IF_SET|IF_FLAG,"Go directly to gmin stepping" }, diff --git a/src/spicelib/devices/cktinit.c b/src/spicelib/devices/cktinit.c index bfd7d966a..9448ace1f 100644 --- a/src/spicelib/devices/cktinit.c +++ b/src/spicelib/devices/cktinit.c @@ -107,7 +107,6 @@ CKTinit(void **ckt) /* new circuit to create */ (sckt)->enh->conv_limit.enabled = MIF_TRUE; (sckt)->enh->conv_limit.step = 0.25; (sckt)->enh->conv_limit.abs_step = 0.1; - (sckt)->enh->rshunt_data.enabled = MIF_FALSE; /* gtri - end - wbk - allocate/initialize substructs */