mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
correct choice for both r model types
This commit is contained in:
@@ -51,11 +51,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mytype < 0) {
|
if (mytype < 0) {
|
||||||
if ((mytype = INPtypelook("Resistor")) < 0
|
if ((mytype = INPtypelook("Resistor")) < 0) {
|
||||||
#ifdef ADMS
|
|
||||||
|| (mytype = INPtypelook("r2_cmc")) < 0
|
|
||||||
#endif
|
|
||||||
){
|
|
||||||
LITERR("Device type Resistor not supported by this binary\n");
|
LITERR("Device type Resistor not supported by this binary\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -153,7 +149,11 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||||||
INPinsert(&model, tab);
|
INPinsert(&model, tab);
|
||||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||||
if (thismodel != NULL) {
|
if (thismodel != NULL) {
|
||||||
if (mytype != thismodel->INPmodType) {
|
if ((INPtypelook("Resistor") != thismodel->INPmodType)
|
||||||
|
#ifdef ADMS
|
||||||
|
&& (INPtypelook("r2_cmc") != thismodel->INPmodType)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
LITERR("incorrect model type for resistor");
|
LITERR("incorrect model type for resistor");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user