34 #define MY_TSTALLOC(ptr,first,second) \ 35 if((here->ptr = spGetElement(matrix,here->first,((CKTnode*)(second))->number))\ 81 radians = here->SRCacPhase *
M_PI / 180.0;
88 if (here->SRCfuncTGiven) {
90 "%s: no DC value, transient time 0 value used",
95 "%s: has no value, DC 0 assumed",
131 "%s: unknown controlling source %s",namarray);
137 TSTALLOC(SRCposIbrptr, SRCposNode, SRCbranch)
138 TSTALLOC(SRCnegIbrptr, SRCnegNode, SRCbranch)
139 TSTALLOC(SRCibrNegptr, SRCbranch, SRCnegNode)
140 TSTALLOC(SRCibrPosptr, SRCbranch, SRCposNode)
146 TSTALLOC(SRCibrIbrptr, SRCbranch, SRCbranch)
162 TSTALLOC(SRCibrContBrptr, SRCbranch, SRCcontBranch)
168 TSTALLOC(SRCibrContPosptr, SRCbranch, SRCcontPosNode)
169 TSTALLOC(SRCibrContNegptr, SRCbranch, SRCcontNegNode)
178 TSTALLOC(SRCposContBrptr,SRCposNode,SRCcontBranch)
179 TSTALLOC(SRCnegContBrptr,SRCnegNode,SRCcontBranch)
185 TSTALLOC(SRCposContPosptr, SRCposNode, SRCcontPosNode)
186 TSTALLOC(SRCposContNegptr, SRCposNode, SRCcontNegNode)
187 TSTALLOC(SRCnegContPosptr, SRCnegNode, SRCcontPosNode)
188 TSTALLOC(SRCnegContNegptr, SRCnegNode, SRCcontNegNode)
234 "%s: unknown controlling source %s",namarray);
239 TSTALLOC(SRCposptr[j++],SRCbranch,SRCcontBranch);
242 TSTALLOC(SRCposptr[j++],SRCposNode,SRCcontBranch);
243 TSTALLOC(SRCposptr[j++],SRCnegNode,SRCcontBranch);
331 double rhs = ckt->CKTsrcFact * here->
SRCdcValue;
356 else if ((*(here->
SRCtree->IFeval))
358 NULL,&ckt->CKTtime) ==
OK) {
395 *(ckt->CKTrhsOld + here->
SRCeqns[i]);
399 double *
d = ckt->CKTpred;
402 *(ckt->CKTstate1 + here->
SRCstate + i)*d[0] +
403 *(ckt->CKTstate2 + here->
SRCstate + i)*d[1] +
404 *(ckt->CKTstate3 + here->
SRCstate + i)*d[2] +
405 *(ckt->CKTstate0 + here->
SRCstate + i)*d[3];
416 *(ckt->CKTstate1 + here->
SRCstate + i);
421 *(ckt->CKTstate0 + here->
SRCstate + i) =
struct sSRCinstance * SRCnextInstance
double * SRCibrContPosptr
#define TSTALLOC(ptr, first, second)
SRCinstance * SRCinstances
double * SRCposContPosptr
double * SRCposContNegptr
int SRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
#define MY_TSTALLOC(ptr, first, second)
double * SRCibrContNegptr
double * SRCnegContNegptr
double * SRCnegContPosptr
struct sSRCmodel * SRCnextModel