Browse Source

Allow resetting the limit for warning mesaages, when a new run is started.

pre-master-46
Holger Vogt 3 years ago
parent
commit
27fb6cd0a6
  1. 3
      src/frontend/runcoms.c
  2. 1
      src/include/ngspice/cktdefs.h
  3. 9
      src/maths/ni/niiter.c

3
src/frontend/runcoms.c

@ -34,6 +34,7 @@ Modified: 2000 AlansFixes
static int dosim(char *what, wordlist *wl);
extern struct INPmodel *modtab;
extern struct dbcomm *dbs;
extern void NIresetwarnmsg(void);
/* Routines for the commands op, tran, ac, dc, listing, device, state,
* resume, stop, trace, run, end. Op, tran, ac, and dc cause the action
@ -261,6 +262,8 @@ static int dosim(
return 0;
}
NIresetwarnmsg();
/* From now on until the next prompt, an interrupt will just
* set a flag and let spice finish up, then control will be
* passed back to the user.

1
src/include/ngspice/cktdefs.h

@ -480,6 +480,7 @@ extern void NIdestroy(CKTcircuit *);
extern int NIinit(CKTcircuit *);
extern int NIintegrate(CKTcircuit *, double *, double *, double , int);
extern int NIiter(CKTcircuit * , int);
extern void NIresetwarnmsg(void);
extern int NIpzMuller(PZtrial **, PZtrial *);
extern int NIpzComplex(PZtrial **, PZtrial *);
extern int NIpzSym(PZtrial **, PZtrial *);

9
src/maths/ni/niiter.c

@ -20,6 +20,9 @@ Modified: 2001 AlansFixes
#include "ngspice/sperror.h"
#include "ngspice/fteext.h"
/* Limit the number of 'singular matrix' warnings */
static int msgcount = 0;
void NIresetwarnmsg(void);
/* NIiter() - return value is non-zero for convergence failure */
@ -32,8 +35,6 @@ NIiter(CKTcircuit *ckt, int maxIter)
int iterno = 0;
int ipass = 0;
static int msgcount = 0;
/* some convergence issues that get resolved by increasing max iter */
if (maxIter < 100)
maxIter = 100;
@ -283,3 +284,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
}
/*NOTREACHED*/
}
void NIresetwarnmsg(void) {
msgcount = 0;
};
Loading…
Cancel
Save