|
|
@ -41,17 +41,17 @@ VSRCtemp(GENmodel *inModel, CKTcircuit *ckt) |
|
|
if(here->VSRCacGiven && !here->VSRCacPGiven) { |
|
|
if(here->VSRCacGiven && !here->VSRCacPGiven) { |
|
|
here->VSRCacPhase = 0; |
|
|
here->VSRCacPhase = 0; |
|
|
} |
|
|
} |
|
|
if(!here->VSRCdcGiven) { |
|
|
|
|
|
/* no DC value - either have a transient value, or none */ |
|
|
|
|
|
if(here->VSRCfuncTGiven) { |
|
|
|
|
|
SPfrontEnd->IFerrorf (ERR_WARNING, |
|
|
|
|
|
"%s: no DC value, transient time 0 value used", |
|
|
|
|
|
here->VSRCname); |
|
|
|
|
|
} else { |
|
|
|
|
|
SPfrontEnd->IFerrorf (ERR_WARNING, |
|
|
|
|
|
"%s: has no value, DC 0 assumed", |
|
|
|
|
|
here->VSRCname); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!here->VSRCdcGiven && !here->VSRCfuncTGiven) { |
|
|
|
|
|
/* no DC value, no transient value */ |
|
|
|
|
|
SPfrontEnd->IFerrorf(ERR_INFO, |
|
|
|
|
|
"%s: has no value, DC 0 assumed", |
|
|
|
|
|
here->VSRCname); |
|
|
|
|
|
} |
|
|
|
|
|
else if (here->VSRCdcGiven && here->VSRCfuncTGiven) { |
|
|
|
|
|
/* no DC value, no transient value */ |
|
|
|
|
|
SPfrontEnd->IFerrorf(ERR_INFO, |
|
|
|
|
|
"%s: dc value used for op instead of transient time 0 value.", |
|
|
|
|
|
here->VSRCname); |
|
|
} |
|
|
} |
|
|
radians = here->VSRCacPhase * M_PI / 180.0; |
|
|
radians = here->VSRCacPhase * M_PI / 180.0; |
|
|
here->VSRCacReal = here->VSRCacMag * cos(radians); |
|
|
here->VSRCacReal = here->VSRCacMag * cos(radians); |
|
|
|