#include "spice.h"
#include <stdio.h>
#include <math.h>
#include "ltradefs.h"
#include "sperror.h"
#include "util.h"
Go to the source code of this file.
Definition at line 17 of file ltratrun.c.
30 double x, y, change, deriv, deriv_delta;
34 int maxiter = 2, iterations = 0;
42 time_step = *timeStep;
44 time_step = sqrt(*timeStep);
46 time_step = exp(log(*timeStep)/ckt->
CKTorder);
63 time_step =
MIN(time_step,tmp);
95 time_step =
MIN(time_step,tmp);
128 time_step =
MIN(time_step,tmp);
178 if (current_lte >= tolerance) {
189 if (deriv_delta <= 0.0)
191 "LTRAtrunc: error: timestep is now less than zero\n");
196 x + deriv_delta) - y;
197 deriv /= deriv_delta;
198 change = (tolerance - y)/deriv;
201 if (
FABS(change) <=
FABS(deriv_delta))
206 if (iterations >= maxiter)
break;
214 time_step =
MIN(time_step,tmp);
232 if (time_step >= model->
LTRAtd) {
234 "LTRAtrunc: Warning: Timestep bigger than delay of line %s\n",
243 for (i = ckt->
CKTorder - 1; i > 0; i--)
unsigned LTRAtruncDontCut
struct sLTRAinstance * LTRAnextInstance
LTRAinstance * LTRAinstances
double LTRAlteCalculate()
#define LTRA_MOD_NOCONTROL
struct sLTRAmodel * LTRAnextModel
#define LTRA_MOD_STEPLIMIT