rewrite-rw, drop some comments

This commit is contained in:
rlar 2018-03-07 18:59:31 +01:00
parent 510caa32c1
commit e9478027a3
18 changed files with 0 additions and 88 deletions

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
@ -14,19 +12,13 @@ Author: 1985 Gordon Jacobs
int
CSWacLoad(GENmodel *inModel, CKTcircuit *ckt)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis
*/
{
CSWmodel *model = (CSWmodel *) inModel;
CSWinstance *here;
double g_now;
int current_state;
/* loop through all the switch models */
for (; model; model = CSWnextModel(model))
/* loop through all the instances of the model */
for (here = CSWinstances(model); here; here = CSWnextInstance(here)) {
current_state = (int) ckt->CKTstates[0][here->CSWstate + 0];

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1987 Thomas L. Quarles
**********/
/*
*/
/*
* This routine gives access to the internal device parameters
@ -19,7 +17,6 @@ Author: 1987 Thomas L. Quarles
#include "ngspice/suffix.h"
/* ARGSUSED */
int
CSWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
@ -69,5 +66,4 @@ CSWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *s
default:
return E_BADPARM;
}
/* NOTREACHED */
}

View File

@ -15,9 +15,6 @@ Modified: 2001 Jon Engelbert
int
CSWload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current values into the
* sparse matrix previously provided
*/
{
CSWmodel *model = (CSWmodel *) inModel;
CSWinstance *here;
@ -30,9 +27,7 @@ CSWload(GENmodel *inModel, CKTcircuit *ckt)
double HYST_OFF = 2, HYST_ON = 3;
/* switch is on or off while control value is in hysteresis region. */
/* loop through all the switch models */
for (; model; model = CSWnextModel(model))
/* loop through all the instances of the model */
for (here = CSWinstances(model); here; here = CSWnextInstance(here)) {
old_current_state = ckt->CKTstates[0][here->CSWstate + 0];

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1987 Thomas L. Quarles
**********/
/*
*/
/*
* This routine gives access to the internal model parameters
@ -19,7 +17,6 @@ Author: 1987 Thomas L. Quarles
#include "ngspice/suffix.h"
/* ARGSUSED */
int
CSWmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
{
@ -49,5 +46,4 @@ CSWmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
default:
return E_BADPARM;
}
/* NOTREACHED */
}

View File

@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
Modified: 2001 Jon Englebert
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "cswdefs.h"
@ -12,7 +10,6 @@ Author: 1985 Gordon Jacobs
#include "ngspice/suffix.h"
/* ARGSUSED */
int
CSWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
@ -13,13 +11,8 @@ Author: 1985 Gordon Jacobs
#include "ngspice/suffix.h"
/* ARGSUSED */
int
CSWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis
*/
{
CSWmodel *model = (CSWmodel *) inModel;
CSWinstance *here;
@ -28,9 +21,7 @@ CSWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
NG_IGNORE(s);
/* loop through all the switch models */
for (; model; model = CSWnextModel(model))
/* loop through all the instances of the model */
for (here = CSWinstances(model); here; here = CSWnextInstance(here)) {
current_state = (int) ckt->CKTstates[0][here->CSWstate + 0];

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
@ -20,14 +18,10 @@ Author: 1985 Gordon Jacobs
int
CSWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the switch conductance with those pointers needed later
* for fast matrix loading
*/
{
CSWmodel *model = (CSWmodel *) inModel;
CSWinstance *here;
/* loop through all the current source models */
for (; model; model = CSWnextModel(model)) {
/* Default Value Processing for Switch Model */
@ -44,7 +38,6 @@ CSWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
model->CSWoffResistance = 1.0 / model->CSWoffConduct;
}
/* loop through all the instances of the model */
for (here = CSWinstances(model); here; here = CSWnextInstance(here)) {
/* Default Value Processing for Switch Instance */

View File

@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
@ -14,19 +12,13 @@ Author: 1985 Gordon Jacobs
int
SWacLoad(GENmodel *inModel, CKTcircuit *ckt)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis.
*/
{
SWmodel *model = (SWmodel *) inModel;
SWinstance *here;
double g_now;
int current_state;
/* loop through all the switch models */
for (; model; model = SWnextModel(model))
/* loop through all the instances of the model */
for (here = SWinstances(model); here; here = SWnextInstance(here)) {
/* In AC analysis, just propogate the state... */

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1987 Thomas L. Quarles
**********/
/*
*/
/*
* This routine gives access to the internal device parameters
@ -19,7 +17,6 @@ Author: 1987 Thomas L. Quarles
#include "ngspice/suffix.h"
/* ARGSUSED */
int
SWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
{
@ -72,5 +69,4 @@ SWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *se
default:
return E_BADPARM;
}
/* NOTREACHED */
}

View File

@ -15,9 +15,6 @@ Modified: 2001 Jon Engelbert
int
SWload(GENmodel *inModel, CKTcircuit *ckt)
/* actually load the current values into the
* sparse matrix previously provided
*/
{
SWmodel *model = (SWmodel *) inModel;
SWinstance *here;
@ -31,9 +28,7 @@ SWload(GENmodel *inModel, CKTcircuit *ckt)
// double previous_region = -1;
// double current_region = -1;
/* loop through all the switch models */
for (; model; model = SWnextModel(model))
/* loop through all the instances of the model */
for (here = SWinstances(model); here; here = SWnextInstance(here)) {
old_current_state = ckt->CKTstates[0][here->SWstate + 0];

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1987 Thomas L. Quarles
**********/
/*
*/
/*
* This routine gives access to the internal model parameter
@ -19,7 +17,6 @@ Author: 1987 Thomas L. Quarles
#include "ngspice/suffix.h"
/* ARGSUSED */
int
SWmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
{
@ -49,5 +46,4 @@ SWmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
default:
return E_BADPARM;
}
/* NOTREACHED */
}

View File

@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
Modified: 2001 Jon Engelbert
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "swdefs.h"

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "swdefs.h"
@ -12,7 +10,6 @@ Author: 1985 Gordon Jacobs
#include "ngspice/suffix.h"
/*ARGSUSED*/
int
SWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
@ -13,13 +11,8 @@ Author: 1985 Gordon Jacobs
#include "ngspice/suffix.h"
/* ARGSUSED */
int
SWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* load the current values into the
* sparse matrix previously provided
* during AC analysis.
*/
{
SWmodel *model = (SWmodel *) inModel;
SWinstance *here;
@ -28,9 +21,7 @@ SWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
NG_IGNORE(s);
/* loop through all the switch models */
for (; model; model = SWnextModel(model))
/* loop through all the instances of the model */
for (here = SWinstances(model); here; here = SWnextInstance(here)) {
/* In AC analysis, just propogate the state... */

View File

@ -2,8 +2,6 @@
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Gordon Jacobs
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/smpdefs.h"
@ -21,14 +19,10 @@ Author: 1985 Gordon Jacobs
int
SWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* load the switch conductance with those pointers needed later
* for fast matrix loading
*/
{
SWmodel *model = (SWmodel *) inModel;
SWinstance *here;
/* loop through all the current source models */
for (; model; model = SWnextModel(model)) {
/* Default Value Processing for Switch Model */
@ -45,7 +39,6 @@ SWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
model->SWoffResistance = 1.0 / model->SWoffConduct;
}
/* loop through all the instances of the model */
for (here = SWinstances(model); here; here = SWnextInstance(here)) {
here->SWstate = *states;

View File

@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
Modified: 2000 AlansFixes
**********/
/*
*/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"