devices/asrc, cleanup #3/9, polish comments
This commit is contained in:
parent
2cb727476f
commit
03ef81785a
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1988 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -13,16 +10,15 @@ Author: 1988 Kanwar Jit Singh
|
|||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
/*
|
||||
* Actually load the current voltage value into the
|
||||
* sparse matrix previously provided. The values have
|
||||
* been precomputed and stored with the instance model.
|
||||
*/
|
||||
|
||||
int
|
||||
ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
/*
|
||||
* Actually load the current voltage value into the
|
||||
* sparse matrix previously provided. The values have
|
||||
* been precomputed and stored with the instance model.
|
||||
*/
|
||||
|
||||
ASRCmodel *model = (ASRCmodel*) inModel;
|
||||
ASRCinstance *here;
|
||||
int i, j;
|
||||
|
|
@ -32,9 +28,7 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
/* loop through all the Arbitrary source models */
|
||||
for (; model != NULL; model = model->ASRCnextModel) {
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->ASRCinstances; here != NULL;
|
||||
here = here->ASRCnextInstance) {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
/*
|
||||
* This routine gives access to the internal device parameters
|
||||
* of Current Controlled Voltage Source
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -20,7 +12,11 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
/*
|
||||
* This routine gives access to the internal device parameters
|
||||
* of Current Controlled Voltage Source
|
||||
*/
|
||||
|
||||
int
|
||||
ASRCask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select)
|
||||
{
|
||||
|
|
@ -68,5 +64,4 @@ ASRCask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu
|
|||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "asrcdefs.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -17,14 +14,13 @@ double *asrc_vals, *asrc_derivs;
|
|||
int asrc_nvals;
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
/* actually load the current voltage value into the
|
||||
* sparse matrix previously provided
|
||||
*/
|
||||
|
||||
int
|
||||
ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
/* actually load the current voltage value into the
|
||||
* sparse matrix previously provided
|
||||
*/
|
||||
|
||||
ASRCmodel *model = (ASRCmodel*) inModel;
|
||||
ASRCinstance *here;
|
||||
int i, j;
|
||||
|
|
@ -32,9 +28,7 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double difference;
|
||||
double factor;
|
||||
|
||||
/* loop through all the Arbitrary source models */
|
||||
for (; model != NULL; model = model->ASRCnextModel) {
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->ASRCinstances; here != NULL;
|
||||
here=here->ASRCnextInstance)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "asrcdefs.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/ifsim.h"
|
||||
|
|
@ -13,7 +10,6 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
ASRCparam(int param, IFvalue *value, GENinstance *fast, IFvalue *select)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/complex.h"
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
||||
/* actually load the current voltage value into the
|
||||
* sparse matrix previously provided
|
||||
*/
|
||||
|
||||
int
|
||||
ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
||||
{
|
||||
ASRCmodel *model = (ASRCmodel*) inModel;
|
||||
ASRCinstance *here;
|
||||
|
|
@ -27,9 +27,7 @@ ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
NG_IGNORE(s);
|
||||
|
||||
/* loop through all the Arbitrary source models */
|
||||
for (; model != NULL; model = model->ASRCnextModel) {
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->ASRCinstances; here != NULL;
|
||||
here = here->ASRCnextInstance)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kanwar Jit Singh
|
||||
**********/
|
||||
/*
|
||||
* singh@ic.Berkeley.edu
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/cktdefs.h"
|
||||
|
|
@ -13,12 +10,12 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
||||
/* load the voltage source structure with those
|
||||
* pointers needed later for fast matrix loading
|
||||
*/
|
||||
|
||||
int
|
||||
ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
||||
{
|
||||
ASRCinstance *here;
|
||||
ASRCmodel *model = (ASRCmodel*) inModel;
|
||||
|
|
@ -28,9 +25,7 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
NG_IGNORE(states);
|
||||
|
||||
/* loop through all the user models*/
|
||||
for (; model != NULL; model = model->ASRCnextModel) {
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->ASRCinstances; here != NULL;
|
||||
here=here->ASRCnextInstance) {
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ASRCmodel *model = (ASRCmodel *) inModel;
|
||||
ASRCinstance *here;
|
||||
|
||||
/* loop through all the source models */
|
||||
for (; model != NULL; model = model->ASRCnextModel) {
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->ASRCinstances; here != NULL;
|
||||
here = here->ASRCnextInstance) {
|
||||
|
||||
|
|
@ -26,7 +24,7 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
if (!here->ASRCtempGiven) {
|
||||
here->ASRCtemp = ckt->CKTtemp;
|
||||
if (!here->ASRCdtempGiven) here->ASRCdtemp = 0.0;
|
||||
} else { /* ASRCtempGiven */
|
||||
} else {
|
||||
here->ASRCdtemp = 0.0;
|
||||
if (here->ASRCdtempGiven)
|
||||
printf("%s: Instance temperature specified, dtemp ignored\n", here->ASRCname);
|
||||
|
|
|
|||
Loading…
Reference in New Issue