add 'option norefvalue' to suppress printing the reference value.

This commit is contained in:
Holger Vogt 2019-01-12 13:26:03 +01:00
parent 5cd23fae72
commit be6eca1dbb
5 changed files with 27 additions and 18 deletions

View File

@ -26,6 +26,7 @@ static void setdb(char *str);
bool ft_acctprint = FALSE, ft_noacctprint = FALSE, ft_listprint = FALSE;
bool ft_nodesprint = FALSE, ft_optsprint = FALSE, ft_noinitprint = FALSE;
bool ft_norefprint = FALSE;
bool ft_ngdebug = FALSE, ft_stricterror = FALSE;
@ -237,6 +238,8 @@ cp_usrset(struct variable *var, bool isset)
ft_ngdebug = isset;
} else if (eq(var->va_name, "noinit")) {
ft_noinitprint = isset;
} else if (eq(var->va_name, "norefvalue")) {
ft_norefprint = isset;
} else if (eq(var->va_name, "list")) {
ft_listprint = isset;
} else if (eq(var->va_name, "nopage")) {

View File

@ -591,7 +591,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
every quarter of a second, to give some feedback without using
too much CPU time */
#ifndef HAS_WINGUI
if (!orflag) {
if (!orflag && !ft_norefprint) {
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",
@ -606,7 +606,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
fileAddRealValue(run->fp, run->binary, refValue->rValue);
#ifndef HAS_WINGUI
if (!orflag) {
if (!orflag && !ft_norefprint) {
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",
@ -691,7 +691,7 @@ OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr)
variable just the same */
#ifndef HAS_WINGUI
if (!orflag) {
if (!orflag && !ft_norefprint) {
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
if (run->isComplex) {
@ -1434,7 +1434,7 @@ InterpFileAdd(runDesc *run, IFvalue *refValue, IFvalue *valuePtr)
interpolatenow = FALSE;
}
#ifndef HAS_WINGUI
if (!orflag) {
if (!orflag && !ft_norefprint) {
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",
@ -1598,7 +1598,7 @@ InterpPlotAdd(runDesc *run, IFvalue *refValue, IFvalue *valuePtr)
#endif
#ifndef HAS_WINGUI
if (!orflag) {
if (!orflag && !ft_norefprint) {
currclock = clock();
if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) {
fprintf(stderr, " Reference value : % 12.5e\r",

View File

@ -406,6 +406,9 @@ if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value)
} else if (eq(name, "noinit")) {
ft_noinitprint = TRUE;
return 0;
} else if (eq(name, "norefvalue")) {
ft_norefprint = TRUE;
return 0;
} else if (eq(name, "list")) {
ft_listprint = TRUE;
return 0;

View File

@ -140,6 +140,7 @@ extern void com_inventory(wordlist *wl);
extern bool ft_acctprint;
extern bool ft_noacctprint;
extern bool ft_noinitprint;
extern bool ft_norefprint;
extern bool ft_listprint;
extern bool ft_nopage;
extern bool ft_nomod;

View File

@ -863,30 +863,32 @@ resume:
UPDATE_STATS(DOING_TRAN);
return(error);
}
if(newdelta > .9 * ckt->CKTdelta) {
if((ckt->CKTorder == 1) && (ckt->CKTmaxOrder > 1)) { /* don't rise the order for backward Euler */
if (newdelta > .9 * ckt->CKTdelta) {
if ((ckt->CKTorder == 1) && (ckt->CKTmaxOrder > 1)) { /* don't rise the order for backward Euler */
newdelta = ckt->CKTdelta;
ckt->CKTorder = 2;
error = CKTtrunc(ckt,&newdelta);
if(error) {
error = CKTtrunc(ckt, &newdelta);
if (error) {
UPDATE_STATS(DOING_TRAN);
return(error);
}
if(newdelta <= 1.05 * ckt->CKTdelta) {
if (newdelta <= 1.05 * ckt->CKTdelta) {
ckt->CKTorder = 1;
}
}
/* time point OK - 630 */
ckt->CKTdelta = newdelta;
#ifdef NDEV
/* show a time process indicator, by Gong Ding, gdiso@ustc.edu */
if(ckt->CKTtime/ckt->CKTfinalTime*100<10.0)
printf("%%%3.2lf\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100);
else if(ckt->CKTtime/ckt->CKTfinalTime*100<100.0)
printf("%%%4.2lf\b\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100);
else
printf("%%%5.2lf\b\b\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100);
fflush(stdout);
if (!ft_norefprint) {
/* show a time process indicator, by Gong Ding, gdiso@ustc.edu */
if (ckt->CKTtime / ckt->CKTfinalTime * 100 < 10.0)
printf("%%%3.2lf\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100);
else if (ckt->CKTtime / ckt->CKTfinalTime * 100 < 100.0)
printf("%%%4.2lf\b\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100);
else
printf("%%%5.2lf\b\b\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100);
fflush(stdout);
}
#endif
#ifdef STEPDEBUG