no pmf, DBL_MAX

This commit is contained in:
h_vogt 2010-10-02 18:44:50 +00:00
parent 0a1a142023
commit 7c7ff52262
4 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
============================ Rework-22 ==================================
2010-09-26 Holger Vogt
2010-10-02 Holger Vogt
* mesadefs.h, mesamsak.c, mesamparam.c, mesasetup.c
jfetmask.c: remove NAN or exp -312 outputs

View File

@ -111,7 +111,7 @@ IFparm MESAmPTable[] = { /* model parameters */
IOP( "epsi", MESA_MOD_EPSI, IF_REAL,""),
IOP( "cas", MESA_MOD_CAS, IF_REAL,""),
IOP( "cbs", MESA_MOD_CBS, IF_REAL,""),
IP( "pmf", MESA_MOD_PMF, IF_FLAG,"P type MESfet model"),
IP( "pmf", MESA_MOD_PMF, IF_FLAG,"P type MESfet model"),
IP( "nmf", MESA_MOD_NMF, IF_FLAG,"N type MESfet model"),
OP( "gd", MESA_MOD_DRAINCONDUCT, IF_REAL,"Drain conductance"),
OP( "gs", MESA_MOD_SOURCECONDUCT, IF_REAL,"Source conductance"),

View File

@ -169,6 +169,12 @@ MESAmParam(int param, IFvalue *value, GENmodel *inModel)
model->MESAtype = NMF;
}
break;
case MESA_MOD_PMF:
if(value->iValue) {
fprintf(stderr, "Only nmf model type supported, set to nmf\n");
model->MESAtype = NMF;
}
break;
case MESA_MOD_TVTO:
model->MESAtvtoGiven = TRUE;
model->MESAtvto = value->rValue;

View File

@ -29,6 +29,7 @@ MESAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* loop through all the diode models */
for( ; model != NULL; model = model->MESAnextModel ) {
if( (model->MESAtype != NMF) ) {
fprintf(stderr, "Only nmf model type supported, set to nmf\n");
model->MESAtype = NMF;
}
if(!model->MESAthresholdGiven) {
@ -215,12 +216,12 @@ MESAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(model->MESAdrainResist != 0) {
model->MESAdrainConduct = 1./model->MESAdrainResist;
} else {
model->MESAdrainConduct = 0.;
model->MESAdrainConduct = DBL_MAX;
}
if(model->MESAsourceResist != 0) {
model->MESAsourceConduct = 1./model->MESAsourceResist;
} else {
model->MESAsourceConduct = 0.;
model->MESAsourceConduct = DBL_MAX;
}
model->MESAvcrit = 0.; /* until model has changed */