diff --git a/src/spicelib/devices/vbic/vbicsetup.c b/src/spicelib/devices/vbic/vbicsetup.c index bbb90f7ae..e679fcf74 100644 --- a/src/spicelib/devices/vbic/vbicsetup.c +++ b/src/spicelib/devices/vbic/vbicsetup.c @@ -487,11 +487,16 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) } } - if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0) - && model->VBICselftGiven && model->VBICselft == 1) - here->VBIC_selfheat = 1; + if(model->VBICselftGiven) + if(model->VBICselft == 1) + here->VBIC_selfheat = 1; + else + here->VBIC_selfheat = 0; else - here->VBIC_selfheat = 0; + if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0)) + here->VBIC_selfheat = 1; + else + here->VBIC_selfheat = 0; if((model->VBICthermalResistGiven) && (model->VBICthermalCapacitance < 1e-12)) model->VBICthermalCapacitance = 1e-12;