use a better place for model parameter defaulting

This commit is contained in:
dwarning 2019-03-21 11:02:08 +01:00
parent 0678f15dbe
commit 7405ff8e9e
2 changed files with 15 additions and 15 deletions

View File

@ -369,6 +369,21 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
model->VBICrefVersion = 0.0;
}
if(!model->VBICtnomGiven) model->VBICtnom = ckt->CKTnomTemp - CONSTCtoK;
if(model->VBICtempExpRBGiven && !model->VBICtempExpRBIGiven) {
model->VBICtempExpRBI = model->VBICtempExpRB;
}
if(model->VBICtempExpRBGiven && !model->VBICtempExpRBXGiven) {
model->VBICtempExpRBX = model->VBICtempExpRB;
}
if(model->VBICtempExpRCGiven && !model->VBICtempExpRCIGiven) {
model->VBICtempExpRCI = model->VBICtempExpRC;
}
if(model->VBICtempExpRCGiven && !model->VBICtempExpRCXGiven) {
model->VBICtempExpRCX = model->VBICtempExpRC;
}
if(!model->VBICvbeMaxGiven) {
model->VBICvbeMax = 1e99;
}

View File

@ -32,21 +32,6 @@ VBICtemp(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the bipolar models */
for( ; model != NULL; model = VBICnextModel(model)) {
if(!model->VBICtnomGiven) model->VBICtnom = ckt->CKTnomTemp - CONSTCtoK;
if(model->VBICtempExpRBGiven && !model->VBICtempExpRBIGiven) {
model->VBICtempExpRBI = model->VBICtempExpRB;
}
if(model->VBICtempExpRBGiven && !model->VBICtempExpRBXGiven) {
model->VBICtempExpRBX = model->VBICtempExpRB;
}
if(model->VBICtempExpRCGiven && !model->VBICtempExpRCIGiven) {
model->VBICtempExpRCI = model->VBICtempExpRC;
}
if(model->VBICtempExpRCGiven && !model->VBICtempExpRCXGiven) {
model->VBICtempExpRCX = model->VBICtempExpRC;
}
/* loop through all the instances of the model */
for (here = VBICinstances(model); here != NULL ;
here=VBICnextInstance(here)) {