using a controlled_exit
This commit is contained in:
parent
9f97f8701c
commit
b0b8624bfc
|
|
@ -25,6 +25,8 @@ static int divC(double, double, double, double, double*, double*);
|
||||||
static void update_cnv_a(TMS*, float, double, double, double, double, double, double);
|
static void update_cnv_a(TMS*, float, double, double, double, double, double, double);
|
||||||
static void copy_cp(CPLine*, CPLine*);
|
static void copy_cp(CPLine*, CPLine*);
|
||||||
|
|
||||||
|
void controlled_exit(int);
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
int
|
int
|
||||||
CPLload(GENmodel *inModel, CKTcircuit *ckt)
|
CPLload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
|
@ -759,7 +761,7 @@ get_pvs_vi(t1, t2, cp, v1_i, v2_i, i1_i, i2_i, v1_o, v2_o, i1_o, i2_o)
|
||||||
errordetect:
|
errordetect:
|
||||||
fprintf(stderr, "your maximum time step is too large for tau.\n");
|
fprintf(stderr, "your maximum time step is too large for tau.\n");
|
||||||
fprintf(stderr, "decrease max time step in .tran card and try again\n");
|
fprintf(stderr, "decrease max time step in .tran card and try again\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,8 @@ static int rotate(int, int, int);
|
||||||
#define epsi 1.0e-16
|
#define epsi 1.0e-16
|
||||||
static char *message = "tau of coupled lines is larger than max time step";
|
static char *message = "tau of coupled lines is larger than max time step";
|
||||||
|
|
||||||
|
void controlled_exit(int);
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
CPLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
CPLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
||||||
|
|
@ -541,7 +543,7 @@ static double
|
||||||
if (!v) {
|
if (!v) {
|
||||||
fprintf(stderr, "Memory Allocation Error by tmalloc in vector().\n");
|
fprintf(stderr, "Memory Allocation Error by tmalloc in vector().\n");
|
||||||
fprintf(stderr, "...now exiting to system ...\n");
|
fprintf(stderr, "...now exiting to system ...\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
return v-nl;
|
return v-nl;
|
||||||
}
|
}
|
||||||
|
|
@ -585,7 +587,7 @@ polint(double *xa, double *ya, int n, double x, double *y, double *dy)
|
||||||
if ((den=ho-hp) == 0.0) {
|
if ((den=ho-hp) == 0.0) {
|
||||||
fprintf(stderr, "(Error) in routine POLINT\n");
|
fprintf(stderr, "(Error) in routine POLINT\n");
|
||||||
fprintf(stderr, "...now exiting to system ...\n");
|
fprintf(stderr, "...now exiting to system ...\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
den = w/den;
|
den = w/den;
|
||||||
d[i] = hp * den;
|
d[i] = hp * den;
|
||||||
|
|
@ -729,7 +731,7 @@ Gaussian_Elimination2(int dims, int type)
|
||||||
}
|
}
|
||||||
if (max < epsilon) {
|
if (max < epsilon) {
|
||||||
fprintf(stderr, " can not choose a pivot (misc)\n");
|
fprintf(stderr, " can not choose a pivot (misc)\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
if (imax != i)
|
if (imax != i)
|
||||||
for (k = i; k <= dim; k++) {
|
for (k = i; k <= dim; k++) {
|
||||||
|
|
@ -932,7 +934,7 @@ static void
|
||||||
loop_ZY(int dim, double y)
|
loop_ZY(int dim, double y)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
double fmin, fmin1;
|
double fmin, fmin1=0.0;
|
||||||
|
|
||||||
for (i = 0; i < dim; i++)
|
for (i = 0; i < dim; i++)
|
||||||
for (j = 0; j < dim; j++)
|
for (j = 0; j < dim; j++)
|
||||||
|
|
@ -948,7 +950,7 @@ loop_ZY(int dim, double y)
|
||||||
fmin = D[i];
|
fmin = D[i];
|
||||||
if (fmin < 0) {
|
if (fmin < 0) {
|
||||||
fprintf(stderr, "(Error) The capacitance matrix of the multiconductor system is not positive definite.\n");
|
fprintf(stderr, "(Error) The capacitance matrix of the multiconductor system is not positive definite.\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
} else {
|
} else {
|
||||||
fmin = sqrt(fmin);
|
fmin = sqrt(fmin);
|
||||||
fmin1 = 1 / fmin;
|
fmin1 = 1 / fmin;
|
||||||
|
|
@ -1099,7 +1101,7 @@ eval_frequency(int dim, int deg_o)
|
||||||
|
|
||||||
if (min <= 0) {
|
if (min <= 0) {
|
||||||
fprintf(stderr, "A mode frequency is not positive. Abort!\n");
|
fprintf(stderr, "A mode frequency is not positive. Abort!\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Scaling_F2 = 1.0 / min;
|
Scaling_F2 = 1.0 / min;
|
||||||
|
|
@ -1658,7 +1660,7 @@ Gaussian_Elimination(int dims)
|
||||||
}
|
}
|
||||||
if (max < epsi_mult) {
|
if (max < epsi_mult) {
|
||||||
fprintf(stderr, " can not choose a pivot (mult)\n");
|
fprintf(stderr, " can not choose a pivot (mult)\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
if (imax != i)
|
if (imax != i)
|
||||||
for (k = i; k <= dim; k++) {
|
for (k = i; k <= dim; k++) {
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,8 @@ static double AA[3][4];
|
||||||
#define epsi 1.0e-16
|
#define epsi 1.0e-16
|
||||||
#define epsi2 1.0e-28
|
#define epsi2 1.0e-28
|
||||||
|
|
||||||
|
void controlled_exit(int);
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
TXLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
|
TXLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
|
||||||
|
|
@ -237,7 +239,7 @@ ReadTxL(TXLinstance *tx, CKTcircuit *ckt)
|
||||||
|
|
||||||
if (l == 0.0) {
|
if (l == 0.0) {
|
||||||
fprintf(stderr, "(Error) transmission line of zero length\n");
|
fprintf(stderr, "(Error) transmission line of zero length\n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (R / L < 5.0e+5) {
|
if (R / L < 5.0e+5) {
|
||||||
|
|
@ -514,7 +516,7 @@ Gaussian_Elimination1(int dims)
|
||||||
}
|
}
|
||||||
if (max < epsi) {
|
if (max < epsi) {
|
||||||
fprintf(stderr, " can not choose a pivot \n");
|
fprintf(stderr, " can not choose a pivot \n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
if (imax != i)
|
if (imax != i)
|
||||||
for (k = i; k <= dim; k++) {
|
for (k = i; k <= dim; k++) {
|
||||||
|
|
@ -874,7 +876,7 @@ Gaussian_Elimination2(int dims)
|
||||||
}
|
}
|
||||||
if (max < epsi2) {
|
if (max < epsi2) {
|
||||||
fprintf(stderr, " can not choose a pivot \n");
|
fprintf(stderr, " can not choose a pivot \n");
|
||||||
exit(0);
|
controlled_exit(0);
|
||||||
}
|
}
|
||||||
if (imax != i)
|
if (imax != i)
|
||||||
for (k = i; k <= dim; k++) {
|
for (k = i; k <= dim; k++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue