cleanup (checked for code invariance)
This commit is contained in:
parent
177964b4a6
commit
be183407cd
|
|
@ -31,27 +31,27 @@ Author: 1985 Wayne A. Christopher
|
||||||
#include "com_let.h"
|
#include "com_let.h"
|
||||||
|
|
||||||
#ifdef XSPICE
|
#ifdef XSPICE
|
||||||
/* include new stuff */
|
|
||||||
#include "ngspice/ipctiein.h"
|
#include "ngspice/ipctiein.h"
|
||||||
#include "ngspice/enh.h"
|
#include "ngspice/enh.h"
|
||||||
/* */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "numparam/numpaif.h"
|
#include "numparam/numpaif.h"
|
||||||
|
|
||||||
#define line_free(line,flag) { line_free_x(line,flag); line = NULL; }
|
|
||||||
|
|
||||||
/* static declarations */
|
#define line_free(line, flag) { line_free_x(line, flag); line = NULL; }
|
||||||
static char * upper(register char *string);
|
|
||||||
|
static char *upper(register char *string);
|
||||||
static bool doedit(char *filename);
|
static bool doedit(char *filename);
|
||||||
static struct line *com_options = NULL;
|
static struct line *com_options = NULL;
|
||||||
|
|
||||||
void line_free_x(struct line * deck, bool recurse);
|
void line_free_x(struct line *deck, bool recurse);
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAS_WINDOWS
|
#ifdef HAS_WINDOWS
|
||||||
void SetAnalyse( char * Analyse, int Percent);
|
void SetAnalyse(char *Analyse, int Percent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Do a listing. Use is listing [expanded] [logical] [physical] [deck] */
|
/* Do a listing. Use is listing [expanded] [logical] [physical] [deck] */
|
||||||
void
|
void
|
||||||
com_listing(wordlist *wl)
|
com_listing(wordlist *wl)
|
||||||
|
|
@ -63,7 +63,7 @@ com_listing(wordlist *wl)
|
||||||
if (ft_curckt) { /* if there is a current circuit . . . . */
|
if (ft_curckt) { /* if there is a current circuit . . . . */
|
||||||
while (wl) {
|
while (wl) {
|
||||||
s = wl->wl_word;
|
s = wl->wl_word;
|
||||||
if ( strcmp( s, "param" ) == 0 ) {
|
if (strcmp(s, "param") == 0) {
|
||||||
do_param_listing = TRUE;
|
do_param_listing = TRUE;
|
||||||
} else {
|
} else {
|
||||||
switch (*s) {
|
switch (*s) {
|
||||||
|
|
@ -84,26 +84,28 @@ com_listing(wordlist *wl)
|
||||||
expand = TRUE;
|
expand = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(cp_err,
|
fprintf(cp_err, "Error: bad listing type %s\n", s);
|
||||||
"Error: bad listing type %s\n", s);
|
|
||||||
return; /* SJB - don't go on after an error */
|
return; /* SJB - don't go on after an error */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
}
|
}
|
||||||
if ( do_param_listing ) {
|
|
||||||
|
if (do_param_listing) {
|
||||||
nupa_list_params(cp_out);
|
nupa_list_params(cp_out);
|
||||||
} else {
|
} else {
|
||||||
if (type != LS_DECK)
|
if (type != LS_DECK)
|
||||||
fprintf(cp_out, "\t%s\n\n", ft_curckt->ci_name);
|
fprintf(cp_out, "\t%s\n\n", ft_curckt->ci_name);
|
||||||
inp_list(cp_out, expand ? ft_curckt->ci_deck :
|
inp_list(cp_out,
|
||||||
ft_curckt->ci_origdeck, ft_curckt->ci_options,
|
expand ? ft_curckt->ci_deck : ft_curckt->ci_origdeck,
|
||||||
type);
|
ft_curckt->ci_options, type);
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
fprintf(cp_err, "Error: no circuit loaded.\n");
|
fprintf(cp_err, "Error: no circuit loaded.\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* returns inp_casefix() or NULL */
|
/* returns inp_casefix() or NULL */
|
||||||
static char *
|
static char *
|
||||||
upper(char *string)
|
upper(char *string)
|
||||||
|
|
@ -132,122 +134,113 @@ inp_list(FILE *file, struct line *deck, struct line *extras, int type)
|
||||||
bool renumber;
|
bool renumber;
|
||||||
bool useout = (file == cp_out);
|
bool useout = (file == cp_out);
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
/* gtri - wbk - 03/07/91 - Don't use 'more' type output if ipc enabled */
|
/* gtri - wbk - 03/07/91 - Don't use 'more' type output if ipc enabled */
|
||||||
#ifdef XSPICE
|
#ifdef XSPICE
|
||||||
if(g_ipc.enabled) {
|
if (g_ipc.enabled)
|
||||||
useout = FALSE;
|
useout = FALSE;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
/* gtri - end - 03/07/91 */
|
/* gtri - end - 03/07/91 */
|
||||||
|
|
||||||
if (useout)
|
if (useout)
|
||||||
out_init();
|
out_init();
|
||||||
|
|
||||||
renumber = cp_getvar("renumber", CP_BOOL, NULL);
|
renumber = cp_getvar("renumber", CP_BOOL, NULL);
|
||||||
|
|
||||||
if (type == LS_LOGICAL) {
|
if (type == LS_LOGICAL) {
|
||||||
top1:
|
top1:
|
||||||
for (here = deck; here; here = here->li_next) {
|
for (here = deck; here; here = here->li_next) {
|
||||||
if (renumber)
|
if (renumber)
|
||||||
here->li_linenum = i;
|
here->li_linenum = i;
|
||||||
if (ciprefix(".end", here->li_line) &&
|
if (ciprefix(".end", here->li_line) && !isalpha(here->li_line[4]))
|
||||||
!isalpha(here->li_line[4]))
|
|
||||||
continue;
|
continue;
|
||||||
if (*here->li_line != '*') {
|
if (*here->li_line != '*') {
|
||||||
if (useout) {
|
if (useout) {
|
||||||
sprintf(out_pbuf, "%6d : %s\n",
|
sprintf(out_pbuf, "%6d : %s\n",
|
||||||
here->li_linenum,
|
here->li_linenum, upper(here->li_line));
|
||||||
upper(here->li_line));
|
|
||||||
out_send(out_pbuf);
|
out_send(out_pbuf);
|
||||||
} else
|
} else {
|
||||||
fprintf(file, "%6d : %s\n",
|
fprintf(file, "%6d : %s\n",
|
||||||
here->li_linenum,
|
here->li_linenum, upper(here->li_line));
|
||||||
upper(here->li_line));
|
}
|
||||||
if (here->li_error) {
|
if (here->li_error) {
|
||||||
if (useout) {
|
if (useout)
|
||||||
out_printf("%s\n", here->li_error);
|
out_printf("%s\n", here->li_error);
|
||||||
} else
|
else
|
||||||
fprintf(file, "%s\n", here->li_error);
|
fprintf(file, "%s\n", here->li_error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extras) {
|
if (extras) {
|
||||||
deck = extras;
|
deck = extras;
|
||||||
extras = NULL;
|
extras = NULL;
|
||||||
goto top1;
|
goto top1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useout) {
|
if (useout) {
|
||||||
sprintf(out_pbuf, "%6d : .end\n", i);
|
sprintf(out_pbuf, "%6d : .end\n", i);
|
||||||
out_send(out_pbuf);
|
out_send(out_pbuf);
|
||||||
} else
|
} else {
|
||||||
fprintf(file, "%6d : .end\n", i);
|
fprintf(file, "%6d : .end\n", i);
|
||||||
|
}
|
||||||
|
|
||||||
} else if ((type == LS_PHYSICAL) || (type == LS_DECK)) {
|
} else if ((type == LS_PHYSICAL) || (type == LS_DECK)) {
|
||||||
top2:
|
|
||||||
|
top2:
|
||||||
for (here = deck; here; here = here->li_next) {
|
for (here = deck; here; here = here->li_next) {
|
||||||
if ((here->li_actual == NULL) || (here == deck)) {
|
if ((here->li_actual == NULL) || (here == deck)) {
|
||||||
if (renumber)
|
if (renumber)
|
||||||
here->li_linenum = i;
|
here->li_linenum = i;
|
||||||
if (ciprefix(".end", here->li_line) &&
|
if (ciprefix(".end", here->li_line) && !isalpha(here->li_line[4]))
|
||||||
!isalpha(here->li_line[4]))
|
|
||||||
continue;
|
continue;
|
||||||
if (type == LS_PHYSICAL) {
|
if (type == LS_PHYSICAL) {
|
||||||
if (useout) {
|
if (useout) {
|
||||||
sprintf(out_pbuf, "%6d : %s\n",
|
sprintf(out_pbuf, "%6d : %s\n",
|
||||||
here->li_linenum,
|
here->li_linenum, upper(here->li_line));
|
||||||
upper(here->li_line));
|
|
||||||
out_send(out_pbuf);
|
out_send(out_pbuf);
|
||||||
} else
|
} else {
|
||||||
fprintf(file, "%6d : %s\n",
|
fprintf(file, "%6d : %s\n",
|
||||||
here->li_linenum,
|
here->li_linenum, upper(here->li_line));
|
||||||
upper(here->li_line));
|
}
|
||||||
} else {
|
} else {
|
||||||
if (useout)
|
if (useout)
|
||||||
out_printf("%s\n",
|
out_printf("%s\n", upper(here->li_line));
|
||||||
upper(here->li_line));
|
|
||||||
else
|
else
|
||||||
fprintf(file, "%s\n",
|
fprintf(file, "%s\n", upper(here->li_line));
|
||||||
upper(here->li_line));
|
|
||||||
}
|
}
|
||||||
if (here->li_error && (type == LS_PHYSICAL)) {
|
if (here->li_error && (type == LS_PHYSICAL)) {
|
||||||
if (useout)
|
if (useout)
|
||||||
out_printf("%s\n",
|
out_printf("%s\n", here->li_error);
|
||||||
here->li_error);
|
|
||||||
else
|
else
|
||||||
fprintf(file, "%s\n",
|
fprintf(file, "%s\n", here->li_error);
|
||||||
here->li_error);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (there = here->li_actual; there;
|
for (there = here->li_actual; there; there = there->li_next) {
|
||||||
there = there->li_next) {
|
|
||||||
there->li_linenum = i++;
|
there->li_linenum = i++;
|
||||||
if (ciprefix(".end", here->li_line) &&
|
if (ciprefix(".end", here->li_line) && isalpha(here->li_line[4]))
|
||||||
isalpha(here->li_line[4]))
|
|
||||||
continue;
|
continue;
|
||||||
if (type == LS_PHYSICAL) {
|
if (type == LS_PHYSICAL) {
|
||||||
if (useout) {
|
if (useout) {
|
||||||
sprintf(out_pbuf, "%6d : %s\n",
|
sprintf(out_pbuf, "%6d : %s\n",
|
||||||
there->li_linenum,
|
there->li_linenum, upper(there->li_line));
|
||||||
upper(there->li_line));
|
|
||||||
out_send(out_pbuf);
|
out_send(out_pbuf);
|
||||||
} else
|
} else {
|
||||||
fprintf(file, "%6d : %s\n",
|
fprintf(file, "%6d : %s\n",
|
||||||
there->li_linenum,
|
there->li_linenum, upper(there->li_line));
|
||||||
upper(there->li_line));
|
}
|
||||||
} else {
|
} else {
|
||||||
if (useout)
|
if (useout)
|
||||||
out_printf("%s\n",
|
out_printf("%s\n", upper(there->li_line));
|
||||||
upper(there->li_line));
|
|
||||||
else
|
else
|
||||||
fprintf(file, "%s\n",
|
fprintf(file, "%s\n", upper(there->li_line));
|
||||||
upper(there->li_line));
|
|
||||||
}
|
}
|
||||||
if (there->li_error &&
|
if (there->li_error && (type == LS_PHYSICAL)) {
|
||||||
(type == LS_PHYSICAL)) {
|
|
||||||
if (useout)
|
if (useout)
|
||||||
out_printf("%s\n",
|
out_printf("%s\n", there->li_error);
|
||||||
there->li_error);
|
|
||||||
else
|
else
|
||||||
fprintf(file, "%s\n",
|
fprintf(file, "%s\n", there->li_error);
|
||||||
there->li_error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
here->li_linenum = i;
|
here->li_linenum = i;
|
||||||
|
|
@ -263,19 +256,21 @@ top2:
|
||||||
if (useout) {
|
if (useout) {
|
||||||
sprintf(out_pbuf, "%6d : .end\n", i);
|
sprintf(out_pbuf, "%6d : .end\n", i);
|
||||||
out_send(out_pbuf);
|
out_send(out_pbuf);
|
||||||
} else
|
} else {
|
||||||
fprintf(file, "%6d : .end\n", i);
|
fprintf(file, "%6d : .end\n", i);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (useout)
|
if (useout)
|
||||||
out_printf(".end\n");
|
out_printf(".end\n");
|
||||||
else
|
else
|
||||||
fprintf(file, ".end\n");
|
fprintf(file, ".end\n");
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
fprintf(cp_err, "inp_list: Internal Error: bad type %d\n",
|
fprintf(cp_err, "inp_list: Internal Error: bad type %d\n", type);
|
||||||
type);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free memory used by a line.
|
* Free memory used by a line.
|
||||||
* If recurse is TRUE then recursively free all lines linked via the li_next field.
|
* If recurse is TRUE then recursively free all lines linked via the li_next field.
|
||||||
|
|
@ -284,15 +279,15 @@ top2:
|
||||||
* SJB - 22nd May 2001
|
* SJB - 22nd May 2001
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
line_free_x(struct line * deck, bool recurse)
|
line_free_x(struct line *deck, bool recurse)
|
||||||
{
|
{
|
||||||
if(!deck)
|
if (!deck)
|
||||||
return;
|
return;
|
||||||
tfree(deck->li_line);
|
tfree(deck->li_line);
|
||||||
tfree(deck->li_error);
|
tfree(deck->li_error);
|
||||||
if(recurse)
|
if (recurse)
|
||||||
line_free(deck->li_next,TRUE);
|
line_free(deck->li_next, TRUE);
|
||||||
line_free(deck->li_actual,TRUE);
|
line_free(deck->li_actual, TRUE);
|
||||||
tfree(deck);
|
tfree(deck);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -323,7 +318,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
double startTime, endTime;
|
double startTime, endTime;
|
||||||
|
|
||||||
/* read in the deck from a file */
|
/* read in the deck from a file */
|
||||||
char *filename_dup = ( filename == NULL ) ? strdup(".") : strdup(filename);
|
char *filename_dup = (filename == NULL) ? strdup(".") : strdup(filename);
|
||||||
|
|
||||||
startTime = seconds();
|
startTime = seconds();
|
||||||
inp_readall(fp, &deck, 0, ngdirname(filename_dup), comfile);
|
inp_readall(fp, &deck, 0, ngdirname(filename_dup), comfile);
|
||||||
|
|
@ -331,7 +326,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
tfree(filename_dup);
|
tfree(filename_dup);
|
||||||
|
|
||||||
/* if nothing came back from inp_readall, just close fp and return to caller */
|
/* if nothing came back from inp_readall, just close fp and return to caller */
|
||||||
if (!deck) { /* MW. We must close fp always when returning */
|
if (!deck) { /* MW. We must close fp always when returning */
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -378,39 +373,40 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
if (dd->li_line[0] == '*')
|
if (dd->li_line[0] == '*')
|
||||||
cp_evloop(dd->li_line + 2);
|
cp_evloop(dd->li_line + 2);
|
||||||
/* option line stored but not processed */
|
/* option line stored but not processed */
|
||||||
else if (ciprefix("option", dd->li_line)) {
|
else if (ciprefix("option", dd->li_line))
|
||||||
com_options = inp_getoptsc(dd->li_line, com_options);
|
com_options = inp_getoptsc(dd->li_line, com_options);
|
||||||
} else
|
else
|
||||||
cp_evloop(dd->li_line);
|
cp_evloop(dd->li_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* free the control deck */
|
/* free the control deck */
|
||||||
line_free(deck,TRUE);
|
line_free(deck, TRUE);
|
||||||
/* printf("Command deck freed\n"); */
|
/* printf("Command deck freed\n"); */
|
||||||
} /* end if(comfile) */
|
} /* end if (comfile) */
|
||||||
|
|
||||||
else { /* must be regular deck . . . . */
|
else { /* must be regular deck . . . . */
|
||||||
/* loop through deck and handle control cards */
|
/* loop through deck and handle control cards */
|
||||||
for (dd = deck->li_next; dd; dd = ld->li_next) {
|
for (dd = deck->li_next; dd; dd = ld->li_next) {
|
||||||
/* get temp from deck */
|
/* get temp from deck */
|
||||||
if ( ciprefix(".temp", dd->li_line) ) {
|
if (ciprefix(".temp", dd->li_line)) {
|
||||||
s = dd->li_line + 5;
|
s = dd->li_line + 5;
|
||||||
while ( isspace(*s) ) s++;
|
while (isspace(*s))
|
||||||
if ( temperature != NULL ) {
|
s++;
|
||||||
|
if (temperature)
|
||||||
txfree(temperature);
|
txfree(temperature);
|
||||||
}
|
|
||||||
temperature = strdup(s);
|
temperature = strdup(s);
|
||||||
}
|
}
|
||||||
/* Ignore comment lines, but not lines begining with '*#',
|
/* Ignore comment lines, but not lines begining with '*#',
|
||||||
but remove them, if they are in a .control ... .endc section */
|
but remove them, if they are in a .control ... .endc section */
|
||||||
s = dd->li_line;
|
s = dd->li_line;
|
||||||
while(isspace(*s)) s++;
|
while(isspace(*s))
|
||||||
if ( (*s == '*') && ( (s != dd->li_line) || (s[1] != '#'))) {
|
s++;
|
||||||
|
if ((*s == '*') && ((s != dd->li_line) || (s[1] != '#'))) {
|
||||||
if (commands) {
|
if (commands) {
|
||||||
/* Remove comment lines in control sections, so they don't
|
/* Remove comment lines in control sections, so they don't
|
||||||
* get considered as circuits. */
|
* get considered as circuits. */
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE);
|
line_free(dd, FALSE);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ld = dd;
|
ld = dd;
|
||||||
|
|
@ -427,14 +423,14 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
|
|
||||||
if (ciprefix(".control", dd->li_line)) {
|
if (ciprefix(".control", dd->li_line)) {
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE); /* SJB - free this line's memory */
|
line_free(dd, FALSE); /* SJB - free this line's memory */
|
||||||
if (commands)
|
if (commands)
|
||||||
fprintf(cp_err, "Warning: redundant .control card\n");
|
fprintf(cp_err, "Warning: redundant .control card\n");
|
||||||
else
|
else
|
||||||
commands = TRUE;
|
commands = TRUE;
|
||||||
} else if (ciprefix(".endc", dd->li_line)) {
|
} else if (ciprefix(".endc", dd->li_line)) {
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE); /* SJB - free this line's memory */
|
line_free(dd, FALSE); /* SJB - free this line's memory */
|
||||||
if (commands)
|
if (commands)
|
||||||
commands = FALSE;
|
commands = FALSE;
|
||||||
else
|
else
|
||||||
|
|
@ -452,55 +448,58 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
/* Look for set or unset numparams.
|
/* Look for set or unset numparams.
|
||||||
If either are found then we evaluate these lines immediately
|
If either are found then we evaluate these lines immediately
|
||||||
so they take effect before netlist parsing */
|
so they take effect before netlist parsing */
|
||||||
while(isspace(*s)) s++; /* step past any white space */
|
while(isspace(*s)) /* step past any white space */
|
||||||
if(ciprefix("set", s)) {
|
s++;
|
||||||
s+=3;
|
if (ciprefix("set", s))
|
||||||
} else if(ciprefix("unset", s)) {
|
s += 3;
|
||||||
s+=5;
|
else if (ciprefix("unset", s))
|
||||||
}
|
s += 5;
|
||||||
if(s!=dd->li_line) { /* one of the above must have matched */
|
if (s != dd->li_line) { /* one of the above must have matched */
|
||||||
while(isspace(*s)) s++; /* step past white space */
|
while(isspace(*s)) /* step past white space */
|
||||||
if(ciprefix("numparams", s)) {
|
s++;
|
||||||
|
if (ciprefix("numparams", s))
|
||||||
cp_evloop(wl->wl_word);
|
cp_evloop(wl->wl_word);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE);
|
line_free(dd, FALSE);
|
||||||
} else if (!*dd->li_line) {
|
} else if (!*dd->li_line) {
|
||||||
/* So blank lines in com files don't get considered as
|
/* So blank lines in com files don't get considered as
|
||||||
* circuits. */
|
* circuits. */
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE);
|
line_free(dd, FALSE);
|
||||||
} else {
|
} else {
|
||||||
/* lines .width, .four, .plot, .print,. save added to wl_first, removed from deck */
|
/* lines .width, .four, .plot, .print,. save added to wl_first, removed from deck */
|
||||||
/* lines .op, .meas, .tf added to wl_first */
|
/* lines .op, .meas, .tf added to wl_first */
|
||||||
inp_casefix(s); /* s: first token from line */
|
inp_casefix(s); /* s: first token from line */
|
||||||
inp_casefix(dd->li_line);
|
inp_casefix(dd->li_line);
|
||||||
if (eq(s, ".width")
|
if (eq(s, ".width") ||
|
||||||
|| ciprefix(".four", s)
|
ciprefix(".four", s) ||
|
||||||
|| eq(s, ".plot")
|
eq(s, ".plot") ||
|
||||||
|| eq(s, ".print")
|
eq(s, ".print") ||
|
||||||
|| eq(s, ".save")
|
eq(s, ".save") ||
|
||||||
|| eq(s, ".op")
|
eq(s, ".op") ||
|
||||||
|| ciprefix(".meas", s)
|
ciprefix(".meas", s) ||
|
||||||
|| eq(s, ".tf")) {
|
eq(s, ".tf"))
|
||||||
|
{
|
||||||
wl_append_word(&wl_first, &end, copy(dd->li_line));
|
wl_append_word(&wl_first, &end, copy(dd->li_line));
|
||||||
|
|
||||||
if (!eq(s, ".op") && !eq(s, ".tf") && !ciprefix(".meas", s)) {
|
if (!eq(s, ".op") && !eq(s, ".tf") && !ciprefix(".meas", s)) {
|
||||||
ld->li_next = dd->li_next;
|
ld->li_next = dd->li_next;
|
||||||
line_free(dd,FALSE);
|
line_free(dd, FALSE);
|
||||||
} else
|
} else {
|
||||||
ld = dd;
|
ld = dd;
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
ld = dd;
|
ld = dd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} /* end for(dd=deck->li_next . . . . */
|
} /* end for (dd = deck->li_next . . . . */
|
||||||
|
|
||||||
/* set temperature if defined to a preliminary variable which may be used
|
/* set temperature if defined to a preliminary variable which may be used
|
||||||
in numparam evaluation */
|
in numparam evaluation */
|
||||||
if ( temperature != NULL ) {
|
if (temperature) {
|
||||||
temperature_value = atof(temperature);
|
temperature_value = atof(temperature);
|
||||||
cp_vset("pretemp", CP_REAL, &temperature_value );
|
cp_vset("pretemp", CP_REAL, &temperature_value);
|
||||||
}
|
}
|
||||||
if (ft_ngdebug) {
|
if (ft_ngdebug) {
|
||||||
cp_getvar("pretemp", CP_REAL, &testemp);
|
cp_getvar("pretemp", CP_REAL, &testemp);
|
||||||
|
|
@ -511,12 +510,12 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
if (deck->li_next) {
|
if (deck->li_next) {
|
||||||
fprintf(cp_out, "\nCircuit: %s\n\n", tt);
|
fprintf(cp_out, "\nCircuit: %s\n\n", tt);
|
||||||
#ifdef HAS_WINDOWS
|
#ifdef HAS_WINDOWS
|
||||||
SetAnalyse( "Prepare Deck", 0);
|
SetAnalyse("Prepare Deck", 0);
|
||||||
#endif
|
#endif
|
||||||
/* Now expand subcircuit macros and substitute numparams.*/
|
/* Now expand subcircuit macros and substitute numparams.*/
|
||||||
if (!cp_getvar("nosubckt", CP_BOOL, NULL))
|
if (!cp_getvar("nosubckt", CP_BOOL, NULL))
|
||||||
if( (deck->li_next = inp_subcktexpand(deck->li_next)) == NULL ) {
|
if ((deck->li_next = inp_subcktexpand(deck->li_next)) == NULL) {
|
||||||
line_free(realdeck,TRUE);
|
line_free(realdeck, TRUE);
|
||||||
line_free(deck->li_actual, TRUE);
|
line_free(deck->li_actual, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -525,10 +524,9 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
#ifdef XSPICE
|
#ifdef XSPICE
|
||||||
/* Translate all SPICE 2G6 polynomial type sources */
|
/* Translate all SPICE 2G6 polynomial type sources */
|
||||||
deck->li_next = ENHtranslate_poly(deck->li_next);
|
deck->li_next = ENHtranslate_poly(deck->li_next);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
line_free(deck->li_actual,FALSE);
|
line_free(deck->li_actual, FALSE);
|
||||||
deck->li_actual = realdeck;
|
deck->li_actual = realdeck;
|
||||||
|
|
||||||
/* print out the expanded deck into debug-out2.txt */
|
/* print out the expanded deck into debug-out2.txt */
|
||||||
|
|
@ -537,28 +535,27 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
struct line *tmp_ptr1 = NULL;
|
struct line *tmp_ptr1 = NULL;
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
fdo = fopen("debug-out2.txt", "w");
|
fdo = fopen("debug-out2.txt", "w");
|
||||||
for(tmp_ptr1 = deck; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next)
|
for (tmp_ptr1 = deck; tmp_ptr1; tmp_ptr1 = tmp_ptr1->li_next)
|
||||||
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
||||||
;
|
|
||||||
(void) fclose(fdo);
|
(void) fclose(fdo);
|
||||||
}
|
}
|
||||||
for(dd = deck; dd != NULL; dd = dd->li_next) {
|
for (dd = deck; dd; dd = dd->li_next) {
|
||||||
/* get csparams and create vectors */
|
/* get csparams and create vectors */
|
||||||
if ( ciprefix(".csparam", dd->li_line) ) {
|
if (ciprefix(".csparam", dd->li_line)) {
|
||||||
wordlist *wlist = NULL;
|
wordlist *wlist = NULL;
|
||||||
wordlist *wl = NULL;
|
wordlist *wl = NULL;
|
||||||
char *cstoken[3];
|
char *cstoken[3];
|
||||||
int i;
|
int i;
|
||||||
s = dd->li_line;
|
s = dd->li_line;
|
||||||
*s='*';
|
*s = '*';
|
||||||
s = dd->li_line + 8;
|
s = dd->li_line + 8;
|
||||||
while ( isspace(*s) ) s++;
|
while (isspace(*s))
|
||||||
cstoken[0]=gettok_char(&s, '=', FALSE, FALSE);
|
s++;
|
||||||
cstoken[1]=gettok_char(&s, '=', TRUE, FALSE);
|
cstoken[0] = gettok_char(&s, '=', FALSE, FALSE);
|
||||||
cstoken[2]=gettok(&s);
|
cstoken[1] = gettok_char(&s, '=', TRUE, FALSE);
|
||||||
for (i=0; i<3;i++) {
|
cstoken[2] = gettok(&s);
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
wl_append_word(&wlist, &wl, cstoken[i]);
|
wl_append_word(&wlist, &wl, cstoken[i]);
|
||||||
}
|
|
||||||
com_let(wlist);
|
com_let(wlist);
|
||||||
wl_free(wlist);
|
wl_free(wlist);
|
||||||
}
|
}
|
||||||
|
|
@ -569,16 +566,17 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
options = com_options;
|
options = com_options;
|
||||||
else if (options && com_options) {
|
else if (options && com_options) {
|
||||||
/* move to end of options
|
/* move to end of options
|
||||||
struct line* tmp_options = options;
|
struct line *tmp_options = options;
|
||||||
while (tmp_options) {
|
while (tmp_options) {
|
||||||
if (!tmp_options->li_next) break;
|
if (!tmp_options->li_next) break;
|
||||||
tmp_options = tmp_options->li_next;
|
tmp_options = tmp_options->li_next;
|
||||||
}
|
}
|
||||||
tmp_options->li_next = com_options;*/
|
tmp_options->li_next = com_options;*/
|
||||||
/* move to end of com_options */
|
/* move to end of com_options */
|
||||||
struct line* tmp_options = com_options;
|
struct line *tmp_options = com_options;
|
||||||
while (tmp_options) {
|
while (tmp_options) {
|
||||||
if (!tmp_options->li_next) break;
|
if (!tmp_options->li_next)
|
||||||
|
break;
|
||||||
tmp_options = tmp_options->li_next;
|
tmp_options = tmp_options->li_next;
|
||||||
}
|
}
|
||||||
tmp_options->li_next = options;
|
tmp_options->li_next = options;
|
||||||
|
|
@ -599,14 +597,15 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
|
|
||||||
for (dd = deck; dd; dd = dd->li_next) {
|
for (dd = deck; dd; dd = dd->li_next) {
|
||||||
/* all parameter lines should be sequentially ordered and placed at
|
/* all parameter lines should be sequentially ordered and placed at
|
||||||
beginning of deck */
|
beginning of deck */
|
||||||
if ( ciprefix( ".param", dd->li_line ) ) {
|
if (ciprefix(".param", dd->li_line)) {
|
||||||
ft_curckt->ci_param = dd;
|
ft_curckt->ci_param = dd;
|
||||||
/* find end of .param statements */
|
/* find end of .param statements */
|
||||||
while ( ciprefix( ".param", dd->li_line ) ) {
|
while (ciprefix(".param", dd->li_line)) {
|
||||||
prev_param = dd;
|
prev_param = dd;
|
||||||
dd = dd->li_next;
|
dd = dd->li_next;
|
||||||
if (dd == NULL) break; // no line after .param line
|
if (dd == NULL)
|
||||||
|
break; // no line after .param line
|
||||||
}
|
}
|
||||||
prev_card->li_next = dd;
|
prev_card->li_next = dd;
|
||||||
prev_param->li_next = NULL;
|
prev_param->li_next = NULL;
|
||||||
|
|
@ -616,17 +615,21 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ciprefix( ".meas", dd->li_line ) ) {
|
if (ciprefix(".meas", dd->li_line)) {
|
||||||
if ( cp_getvar( "autostop", CP_BOOL, NULL) ) {
|
if (cp_getvar("autostop", CP_BOOL, NULL)) {
|
||||||
if ( strstr( dd->li_line, " max " ) || strstr( dd->li_line, " min " ) || strstr( dd->li_line, " avg " ) ||
|
if (strstr(dd->li_line, " max ") ||
|
||||||
strstr( dd->li_line, " rms " ) || strstr( dd->li_line, " integ " ) ) {
|
strstr(dd->li_line, " min ") ||
|
||||||
printf( "Warning: .OPTION AUTOSTOP will not be effective because one of 'max|min|avg|rms|integ' is used in .meas\n" );
|
strstr(dd->li_line, " avg ") ||
|
||||||
printf( " AUTOSTOP being disabled...\n" );
|
strstr(dd->li_line, " rms ") ||
|
||||||
cp_remvar( "autostop" );
|
strstr(dd->li_line, " integ "))
|
||||||
|
{
|
||||||
|
printf("Warning: .OPTION AUTOSTOP will not be effective because one of 'max|min|avg|rms|integ' is used in .meas\n");
|
||||||
|
printf(" AUTOSTOP being disabled...\n");
|
||||||
|
cp_remvar("autostop");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( curr_meas == NULL ) {
|
if (curr_meas == NULL) {
|
||||||
curr_meas = ft_curckt->ci_meas = dd;
|
curr_meas = ft_curckt->ci_meas = dd;
|
||||||
} else {
|
} else {
|
||||||
curr_meas->li_next = dd;
|
curr_meas->li_next = dd;
|
||||||
|
|
@ -642,9 +645,9 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
/* set temperature, if defined, to new value.
|
/* set temperature, if defined, to new value.
|
||||||
cp_vset will set the variable "temp" and also set CKTtemp,
|
cp_vset will set the variable "temp" and also set CKTtemp,
|
||||||
so we can do it only here because the circuit has to be already there */
|
so we can do it only here because the circuit has to be already there */
|
||||||
if ( temperature != NULL ) {
|
if (temperature) {
|
||||||
temperature_value = atof(temperature);
|
temperature_value = atof(temperature);
|
||||||
cp_vset("temp", CP_REAL, &temperature_value );
|
cp_vset("temp", CP_REAL, &temperature_value);
|
||||||
txfree(temperature);
|
txfree(temperature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -659,9 +662,8 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
struct line *tmp_ptr1 = NULL;
|
struct line *tmp_ptr1 = NULL;
|
||||||
/*debug: print into file*/
|
/*debug: print into file*/
|
||||||
fdo = fopen("debug-out3.txt", "w");
|
fdo = fopen("debug-out3.txt", "w");
|
||||||
for(tmp_ptr1 = deck; tmp_ptr1 != NULL; tmp_ptr1 = tmp_ptr1->li_next)
|
for (tmp_ptr1 = deck; tmp_ptr1; tmp_ptr1 = tmp_ptr1->li_next)
|
||||||
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
fprintf(fdo, "%s\n", tmp_ptr1->li_line);
|
||||||
;
|
|
||||||
(void) fclose(fdo);
|
(void) fclose(fdo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -674,10 +676,11 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
|
||||||
|
|
||||||
/* linked list dbs is used to store the "save" or .save data (defined in breakp2.c),
|
/* linked list dbs is used to store the "save" or .save data (defined in breakp2.c),
|
||||||
breakpoint and iplot data, will be renewed in ft_dotsaves(). */
|
breakpoint and iplot data, will be renewed in ft_dotsaves(). */
|
||||||
if(dbs) tfree(dbs);
|
if (dbs)
|
||||||
|
tfree(dbs);
|
||||||
|
|
||||||
/*saj, to process save commands always, not just in batch mode
|
/*saj, to process save commands always, not just in batch mode
|
||||||
*(breaks encapsulation of frontend and parsing commands slightly)*/
|
*(breaks encapsulation of frontend and parsing commands slightly)*/
|
||||||
ft_dotsaves();
|
ft_dotsaves();
|
||||||
|
|
||||||
/* Now reset everything. Pop the control stack, and fix up the IO
|
/* Now reset everything. Pop the control stack, and fix up the IO
|
||||||
|
|
@ -704,10 +707,10 @@ inp_dodeck(
|
||||||
char *tt, /*in: the title of the deck */
|
char *tt, /*in: the title of the deck */
|
||||||
wordlist *end, /*in: all lines with .width, .plot, .print, .save, .op, .meas, .tf */
|
wordlist *end, /*in: all lines with .width, .plot, .print, .save, .op, .meas, .tf */
|
||||||
bool reuse, /*in: TRUE if called from runcoms2.c com_rset,
|
bool reuse, /*in: TRUE if called from runcoms2.c com_rset,
|
||||||
FALSE if called from inp_spsource() */
|
FALSE if called from inp_spsource() */
|
||||||
struct line *options, /*in: all .option lines from deck */
|
struct line *options, /*in: all .option lines from deck */
|
||||||
char *filename /*in: input file of deck */
|
char *filename /*in: input file of deck */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct circ *ct;
|
struct circ *ct;
|
||||||
struct line *dd;
|
struct line *dd;
|
||||||
|
|
@ -723,20 +726,18 @@ inp_dodeck(
|
||||||
|
|
||||||
/* First throw away any old error messages there might be and fix
|
/* First throw away any old error messages there might be and fix
|
||||||
the case of the lines. */
|
the case of the lines. */
|
||||||
for (dd = deck; dd; dd = dd->li_next) {
|
for (dd = deck; dd; dd = dd->li_next)
|
||||||
if (dd->li_error) {
|
if (dd->li_error) {
|
||||||
tfree(dd->li_error);
|
tfree(dd->li_error);
|
||||||
dd->li_error = NULL;
|
dd->li_error = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (reuse) {
|
if (reuse) {
|
||||||
ct = ft_curckt;
|
ct = ft_curckt;
|
||||||
} else {
|
} else {
|
||||||
if (ft_curckt) {
|
if (ft_curckt) {
|
||||||
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES,
|
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, NULL);
|
||||||
NULL);
|
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL);
|
||||||
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
ft_curckt = ct = alloc(struct circ);
|
ft_curckt = ct = alloc(struct circ);
|
||||||
|
|
||||||
|
|
@ -750,7 +751,7 @@ inp_dodeck(
|
||||||
is needed because we need the scale info BEFORE building the circuit
|
is needed because we need the scale info BEFORE building the circuit
|
||||||
and seems there is no other way to do this. */
|
and seems there is no other way to do this. */
|
||||||
if (!noparse) {
|
if (!noparse) {
|
||||||
struct line* opt_beg = options;
|
struct line *opt_beg = options;
|
||||||
for (; options; options = options->li_next) {
|
for (; options; options = options->li_next) {
|
||||||
for (s = options->li_line; *s && !isspace(*s); s++)
|
for (s = options->li_line; *s && !isspace(*s); s++)
|
||||||
;
|
;
|
||||||
|
|
@ -776,15 +777,15 @@ inp_dodeck(
|
||||||
case CP_NUM:
|
case CP_NUM:
|
||||||
break;
|
break;
|
||||||
case CP_REAL:
|
case CP_REAL:
|
||||||
if ( strcmp("scale",eev->va_name)==0 ) {
|
if (strcmp("scale", eev->va_name) == 0) {
|
||||||
cp_vset("scale", CP_REAL, &eev->va_real );
|
cp_vset("scale", CP_REAL, &eev->va_real);
|
||||||
printf("Scale set\n");
|
printf("Scale set\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CP_STRING:
|
case CP_STRING:
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n" );
|
fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n");
|
||||||
controlled_exit(EXIT_FAILURE);
|
controlled_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
} /* switch . . . */
|
} /* switch . . . */
|
||||||
|
|
@ -801,8 +802,9 @@ inp_dodeck(
|
||||||
startTime = seconds();
|
startTime = seconds();
|
||||||
ckt = if_inpdeck(deck, &tab);
|
ckt = if_inpdeck(deck, &tab);
|
||||||
ft_curckt->FTEstats->FTESTATnetParseTime = seconds() - startTime;
|
ft_curckt->FTEstats->FTESTATnetParseTime = seconds() - startTime;
|
||||||
} else
|
} else {
|
||||||
ckt = NULL;
|
ckt = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
out_init();
|
out_init();
|
||||||
|
|
||||||
|
|
@ -829,7 +831,7 @@ inp_dodeck(
|
||||||
#endif
|
#endif
|
||||||
p = dd->li_error;
|
p = dd->li_error;
|
||||||
do {
|
do {
|
||||||
q =strchr(p, '\n');
|
q = strchr(p, '\n');
|
||||||
if (q)
|
if (q)
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
|
|
||||||
|
|
@ -843,8 +845,9 @@ inp_dodeck(
|
||||||
if (ft_stricterror)
|
if (ft_stricterror)
|
||||||
controlled_exit(EXIT_BAD);
|
controlled_exit(EXIT_BAD);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
out_printf("%s\n", p);
|
out_printf("%s\n", p);
|
||||||
|
}
|
||||||
|
|
||||||
if (q)
|
if (q)
|
||||||
*q++ = '\n';
|
*q++ = '\n';
|
||||||
|
|
@ -856,25 +859,27 @@ inp_dodeck(
|
||||||
|
|
||||||
/* Only print out netlist if brief is FALSE */
|
/* Only print out netlist if brief is FALSE */
|
||||||
|
|
||||||
if(!cp_getvar( "brief", CP_BOOL, NULL )) {
|
if (!cp_getvar("brief", CP_BOOL, NULL)) {
|
||||||
/* output deck */
|
/* output deck */
|
||||||
out_printf( "\nProcessed Netlist\n" );
|
out_printf("\nProcessed Netlist\n");
|
||||||
out_printf( "=================\n" );
|
out_printf("=================\n");
|
||||||
print_listing = 1;
|
print_listing = 1;
|
||||||
for (dd = deck; dd; dd = dd->li_next) {
|
for (dd = deck; dd; dd = dd->li_next) {
|
||||||
if ( ciprefix(".prot", dd->li_line) ) print_listing = 0;
|
if (ciprefix(".prot", dd->li_line))
|
||||||
if ( print_listing == 1 ) out_printf( "%s\n", dd->li_line );
|
print_listing = 0;
|
||||||
if ( ciprefix(".unprot", dd->li_line) ) print_listing = 1;
|
if (print_listing == 1)
|
||||||
|
out_printf("%s\n", dd->li_line);
|
||||||
|
if (ciprefix(".unprot", dd->li_line))
|
||||||
|
print_listing = 1;
|
||||||
}
|
}
|
||||||
out_printf( "\n" );
|
out_printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add this circuit to the circuit list. If reuse is TRUE then use
|
/* Add this circuit to the circuit list. If reuse is TRUE then use
|
||||||
* the ft_curckt structure. */
|
* the ft_curckt structure. */
|
||||||
if (!reuse) {
|
if (!reuse) {
|
||||||
/* Be sure that ci_devices and ci_nodes are valid */
|
/* Be sure that ci_devices and ci_nodes are valid */
|
||||||
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES,
|
ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, NULL);
|
||||||
NULL);
|
|
||||||
cp_kwswitch(CT_DEVNAMES, ft_curckt->ci_devices);
|
cp_kwswitch(CT_DEVNAMES, ft_curckt->ci_devices);
|
||||||
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL);
|
ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL);
|
||||||
cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes);
|
cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes);
|
||||||
|
|
@ -901,44 +906,40 @@ inp_dodeck(
|
||||||
|
|
||||||
if (!noparse) {
|
if (!noparse) {
|
||||||
/* for (; options; options = options->li_next) {
|
/* for (; options; options = options->li_next) {
|
||||||
for (s = options->li_line; *s && !isspace(*s); s++)
|
for (s = options->li_line; *s && !isspace(*s); s++)
|
||||||
;
|
;
|
||||||
|
|
||||||
ii = cp_interactive;
|
ii = cp_interactive;
|
||||||
cp_interactive = FALSE;
|
cp_interactive = FALSE;
|
||||||
wl = cp_lexer(s);
|
wl = cp_lexer(s);
|
||||||
cp_interactive = ii;
|
cp_interactive = ii;
|
||||||
if (!wl || !wl->wl_word || !*wl->wl_word)
|
if (!wl || !wl->wl_word || !*wl->wl_word)
|
||||||
continue;
|
continue;
|
||||||
if (eev)
|
if (eev)
|
||||||
eev->va_next = cp_setparse(wl);
|
eev->va_next = cp_setparse(wl);
|
||||||
else
|
else
|
||||||
ct->ci_vars = eev = cp_setparse(wl);
|
ct->ci_vars = eev = cp_setparse(wl);
|
||||||
while (eev->va_next)
|
while (eev->va_next)
|
||||||
eev = eev->va_next;
|
eev = eev->va_next;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
for (eev = ct->ci_vars; eev; eev = eev->va_next) {
|
for (eev = ct->ci_vars; eev; eev = eev->va_next) {
|
||||||
bool one = TRUE; /* FIXME, actually eev->va_bool should be TRUE anyway */
|
bool one = TRUE; /* FIXME, actually eev->va_bool should be TRUE anyway */
|
||||||
switch (eev->va_type) {
|
switch (eev->va_type) {
|
||||||
case CP_BOOL:
|
case CP_BOOL:
|
||||||
if_option(ct->ci_ckt, eev->va_name,
|
if_option(ct->ci_ckt, eev->va_name, eev->va_type, &one);
|
||||||
eev->va_type, &one);
|
|
||||||
break;
|
break;
|
||||||
case CP_NUM:
|
case CP_NUM:
|
||||||
if_option(ct->ci_ckt, eev->va_name,
|
if_option(ct->ci_ckt, eev->va_name, eev->va_type, &eev->va_num);
|
||||||
eev->va_type, &eev->va_num);
|
|
||||||
break;
|
break;
|
||||||
case CP_REAL:
|
case CP_REAL:
|
||||||
if_option(ct->ci_ckt, eev->va_name,
|
if_option(ct->ci_ckt, eev->va_name, eev->va_type, &eev->va_real);
|
||||||
eev->va_type, &eev->va_real);
|
|
||||||
break;
|
break;
|
||||||
case CP_STRING:
|
case CP_STRING:
|
||||||
if_option(ct->ci_ckt, eev->va_name,
|
if_option(ct->ci_ckt, eev->va_name, eev->va_type, eev->va_string);
|
||||||
eev->va_type, eev->va_string);
|
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n" );
|
fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n");
|
||||||
controlled_exit(EXIT_FAILURE);
|
controlled_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
} // switch . . .
|
} // switch . . .
|
||||||
|
|
@ -989,8 +990,7 @@ com_edit(wordlist *wl)
|
||||||
cp_interactive = inter;
|
cp_interactive = inter;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
inp_list(fp, ft_curckt->ci_deck, ft_curckt->ci_options,
|
inp_list(fp, ft_curckt->ci_deck, ft_curckt->ci_options, LS_DECK);
|
||||||
LS_DECK);
|
|
||||||
fprintf(cp_err,
|
fprintf(cp_err,
|
||||||
"Warning: editing a temporary file -- "
|
"Warning: editing a temporary file -- "
|
||||||
"circuit not saved\n");
|
"circuit not saved\n");
|
||||||
|
|
@ -1017,7 +1017,7 @@ com_edit(wordlist *wl)
|
||||||
inp_spsource(fp, FALSE, permfile ? filename : NULL);
|
inp_spsource(fp, FALSE, permfile ? filename : NULL);
|
||||||
|
|
||||||
/* fclose(fp); */
|
/* fclose(fp); */
|
||||||
/* MW. inp_spsource already closed fp */
|
/* MW. inp_spsource already closed fp */
|
||||||
|
|
||||||
if (ft_curckt && !ft_curckt->ci_filename)
|
if (ft_curckt && !ft_curckt->ci_filename)
|
||||||
unlink(filename);
|
unlink(filename);
|
||||||
|
|
@ -1036,6 +1036,7 @@ com_edit(wordlist *wl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
doedit(char *filename)
|
doedit(char *filename)
|
||||||
{
|
{
|
||||||
|
|
@ -1055,6 +1056,7 @@ doedit(char *filename)
|
||||||
return (system(buf) ? FALSE : TRUE);
|
return (system(buf) ? FALSE : TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
com_source(wordlist *wl)
|
com_source(wordlist *wl)
|
||||||
{
|
{
|
||||||
|
|
@ -1068,6 +1070,7 @@ com_source(wordlist *wl)
|
||||||
|
|
||||||
inter = cp_interactive;
|
inter = cp_interactive;
|
||||||
cp_interactive = FALSE;
|
cp_interactive = FALSE;
|
||||||
|
|
||||||
if (wl->wl_next) {
|
if (wl->wl_next) {
|
||||||
/* There are several files -- put them into a temp file */
|
/* There are several files -- put them into a temp file */
|
||||||
tempfile = smktemp("sp");
|
tempfile = smktemp("sp");
|
||||||
|
|
@ -1090,8 +1093,10 @@ com_source(wordlist *wl)
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
}
|
}
|
||||||
fseek(fp, 0L, SEEK_SET);
|
fseek(fp, 0L, SEEK_SET);
|
||||||
} else
|
} else {
|
||||||
fp = inp_pathopen(wl->wl_word, "r");
|
fp = inp_pathopen(wl->wl_word, "r");
|
||||||
|
}
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
perror(wl->wl_word);
|
perror(wl->wl_word);
|
||||||
cp_interactive = TRUE;
|
cp_interactive = TRUE;
|
||||||
|
|
@ -1099,16 +1104,17 @@ com_source(wordlist *wl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't print the title if this is a spice initialisation file. */
|
/* Don't print the title if this is a spice initialisation file. */
|
||||||
if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) {
|
if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word))
|
||||||
inp_spsource(fp, TRUE, tempfile ? NULL : wl->wl_word);
|
inp_spsource(fp, TRUE, tempfile ? NULL : wl->wl_word);
|
||||||
} else {
|
else
|
||||||
inp_spsource(fp, FALSE, tempfile ? NULL : wl->wl_word);
|
inp_spsource(fp, FALSE, tempfile ? NULL : wl->wl_word);
|
||||||
}
|
|
||||||
cp_interactive = inter;
|
cp_interactive = inter;
|
||||||
if (tempfile)
|
if (tempfile)
|
||||||
unlink(tempfile);
|
unlink(tempfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
inp_source(char *file)
|
inp_source(char *file)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -48,238 +48,258 @@ if_sens_run(CKTcircuit *ckt, wordlist *args, INPtables *tab)
|
||||||
|
|
||||||
(void) sprintf(buf, ".%s", wl_flatten(args));
|
(void) sprintf(buf, ".%s", wl_flatten(args));
|
||||||
|
|
||||||
deck.nextcard = NULL;
|
deck.nextcard = NULL;
|
||||||
deck.actualLine = NULL;
|
deck.actualLine = NULL;
|
||||||
deck.error = NULL;
|
deck.error = NULL;
|
||||||
deck.linenum = 0;
|
deck.linenum = 0;
|
||||||
deck.linenum_orig = 0;
|
deck.linenum_orig = 0;
|
||||||
deck.line = buf;
|
deck.line = buf;
|
||||||
|
|
||||||
current = (card *) &deck;
|
current = (card *) &deck;
|
||||||
line = current->line;
|
line = current->line;
|
||||||
INPgetTok(&line,&token,1);
|
INPgetTok(&line, &token, 1);
|
||||||
|
|
||||||
if(ft_curckt->ci_specTask) {
|
if (ft_curckt->ci_specTask) {
|
||||||
err = ft_sim->deleteTask (ft_curckt->ci_ckt,
|
err = ft_sim->deleteTask (ft_curckt->ci_ckt, ft_curckt->ci_specTask);
|
||||||
ft_curckt->ci_specTask);
|
if (err) {
|
||||||
if(err) {
|
ft_sperror(err, "deleteTask");
|
||||||
ft_sperror(err,"deleteTask");
|
|
||||||
return(0); /* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = ft_sim->newTask (ft_curckt->ci_ckt,
|
err = ft_sim->newTask (ft_curckt->ci_ckt, &(ft_curckt->ci_specTask),
|
||||||
&(ft_curckt->ci_specTask), "special",
|
"special", & (ft_curckt->ci_defTask));
|
||||||
&(ft_curckt->ci_defTask));
|
if (err) {
|
||||||
if(err) {
|
ft_sperror(err, "newTask");
|
||||||
ft_sperror(err,"newTask");
|
|
||||||
return(0); /* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
for(j=0;j<ft_sim->numAnalyses;j++) {
|
|
||||||
if(strcmp(ft_sim->analyses[j]->name,"options")==0) {
|
for (j = 0; j < ft_sim->numAnalyses; j++)
|
||||||
|
if (strcmp(ft_sim->analyses[j]->name, "options") == 0) {
|
||||||
which = j;
|
which = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(which == -1) {
|
if (which == -1) {
|
||||||
/* in DEEP trouble */
|
/* in DEEP trouble */
|
||||||
ft_sperror(err,"in DEEP trouble");
|
ft_sperror(err, "in DEEP trouble");
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "options",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "options",
|
||||||
&(ft_curckt->ci_specOpt), ft_curckt->ci_specTask);
|
& (ft_curckt->ci_specOpt), ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createOptions");
|
ft_sperror(err, "createOptions");
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
|
|
||||||
ft_curckt->ci_curOpt = ft_curckt->ci_specOpt;
|
ft_curckt->ci_curOpt = ft_curckt->ci_specOpt;
|
||||||
ft_curckt->ci_curTask = ft_curckt->ci_specTask;
|
ft_curckt->ci_curTask = ft_curckt->ci_specTask;
|
||||||
|
|
||||||
which = -1;
|
which = -1;
|
||||||
for(j=0;j<ft_sim->numAnalyses;j++) {
|
for (j = 0; j < ft_sim->numAnalyses; j++)
|
||||||
if(strcmp(ft_sim->analyses[j]->name,"SEN")==0) {
|
if (strcmp(ft_sim->analyses[j]->name, "SEN") == 0) {
|
||||||
which = j;
|
which = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(which == -1) {
|
if (which == -1) {
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
current->error = INPerrCat(
|
||||||
"sensetivity analysis unsupported\n"));
|
current->error,
|
||||||
|
INPmkTemp("sensetivity analysis unsupported\n"));
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "sense",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "sense",
|
||||||
& senseJob, ft_curckt->ci_specTask);
|
& senseJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createSense");
|
ft_sperror(err, "createSense");
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
|
|
||||||
save = which;
|
save = which;
|
||||||
INPgetTok(&line,&token,1);
|
|
||||||
if(strcmp(token ,"ac")==0){
|
INPgetTok(&line, &token, 1);
|
||||||
|
|
||||||
|
if (strcmp(token, "ac") == 0) {
|
||||||
JOB *acJob;
|
JOB *acJob;
|
||||||
which = -1;
|
which = -1;
|
||||||
for(j=0;j<ft_sim->numAnalyses;j++) {
|
for (j = 0; j < ft_sim->numAnalyses; j++)
|
||||||
if(strcmp(ft_sim->analyses[j]->name,"AC")==0) {
|
if (strcmp(ft_sim->analyses[j]->name, "AC") == 0) {
|
||||||
which = j;
|
which = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
if (which == -1) {
|
||||||
if(which == -1) {
|
current->error = INPerrCat
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
(current->error,
|
||||||
"ac analysis unsupported\n"));
|
INPmkTemp("ac analysis unsupported\n"));
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "acan",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "acan",
|
||||||
& acJob, ft_curckt->ci_specTask);
|
& acJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createAC"); /* or similar error message */
|
ft_sperror(err, "createAC"); /* or similar error message */
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
|
|
||||||
INPgetTok(&line,&steptype,1); /* get DEC, OCT, or LIN */
|
INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */
|
||||||
ptemp.iValue=1;
|
ptemp.iValue = 1;
|
||||||
error = INPapName(ckt,which,acJob,steptype,&ptemp);
|
error = INPapName(ckt, which, acJob, steptype, &ptemp);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
parm=INPgetValue(ckt,&line,IF_INTEGER,tab);/* number of points*/
|
parm = INPgetValue(ckt, &line, IF_INTEGER, tab);/* number of points*/
|
||||||
error = INPapName(ckt,which,acJob,"numsteps",parm);
|
error = INPapName(ckt, which, acJob, "numsteps", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* fstart */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */
|
||||||
error = INPapName(ckt,which,acJob,"start",parm);
|
error = INPapName(ckt, which, acJob, "start", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* fstop */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */
|
||||||
error = INPapName(ckt,which,acJob,"stop",parm);
|
error = INPapName(ckt, which, acJob, "stop", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
|
||||||
}
|
}
|
||||||
if(strcmp(token ,"op")==0){
|
|
||||||
|
if (strcmp(token, "op") == 0) {
|
||||||
which = -1;
|
which = -1;
|
||||||
for(i=0;i<ft_sim->numAnalyses;i++) {
|
for (i = 0; i < ft_sim->numAnalyses; i++)
|
||||||
if(strcmp(ft_sim->analyses[i]->name,"DCOP")==0) {
|
if (strcmp(ft_sim->analyses[i]->name, "DCOP") == 0) {
|
||||||
which=i;
|
which = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
if (which == -1) {
|
||||||
if(which == -1) {
|
current->error = INPerrCat
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
(current->error,
|
||||||
"DC operating point analysis unsupported\n"));
|
INPmkTemp("DC operating point analysis unsupported\n"));
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "dcop",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "dcop",
|
||||||
& opJob, ft_curckt->ci_specTask);
|
& opJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createOP"); /* or similar error message */
|
ft_sperror(err, "createOP"); /* or similar error message */
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(strcmp(token ,"dc")==0){
|
|
||||||
|
if (strcmp(token, "dc") == 0) {
|
||||||
JOB *dcJob;
|
JOB *dcJob;
|
||||||
/* .dc SRC1NAME Vstart1 Vstop1 Vinc1 [SRC2NAME Vstart2 */
|
/* .dc SRC1NAME Vstart1 Vstop1 Vinc1 [SRC2NAME Vstart2 */
|
||||||
/* Vstop2 Vinc2 */
|
/* Vstop2 Vinc2 */
|
||||||
which = -1;
|
which = -1;
|
||||||
for(i=0;i<ft_sim->numAnalyses;i++) {
|
for (i = 0; i < ft_sim->numAnalyses; i++)
|
||||||
if(strcmp(ft_sim->analyses[i]->name,"DCTransfer")==0) {
|
if (strcmp(ft_sim->analyses[i]->name, "DCTransfer") == 0) {
|
||||||
which=i;
|
which = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
if (which == -1) {
|
||||||
if(which==-1) {
|
current->error = INPerrCat
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
(current->error,
|
||||||
"DC transfer curve analysis unsupported\n"));
|
INPmkTemp("DC transfer curve analysis unsupported\n"));
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "DCtransfer",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "DCtransfer",
|
||||||
&(dcJob),ft_curckt->ci_specTask);
|
& dcJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createOP"); /* or similar error message */
|
ft_sperror(err, "createOP"); /* or similar error message */
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
INPgetTok(&line,&name,1);
|
INPgetTok(&line, &name, 1);
|
||||||
INPinsert(&name,tab);
|
INPinsert(&name, tab);
|
||||||
ptemp.uValue=name;
|
ptemp.uValue = name;
|
||||||
error = INPapName(ckt,which,dcJob,"name1",&ptemp);
|
error = INPapName(ckt, which, dcJob, "name1", &ptemp);
|
||||||
if(error) current->error = INPerrCat(current->error,INPerror(error));
|
if (error)
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vstart1 */
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
error = INPapName(ckt,which,dcJob,"start1",parm);
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart1 */
|
||||||
if(error) current->error = INPerrCat(current->error,INPerror(error));
|
error = INPapName(ckt, which, dcJob, "start1", parm);
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vstop1 */
|
if (error)
|
||||||
error = INPapName(ckt,which,dcJob,"stop1",parm);
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
if(error) current->error = INPerrCat(current->error,INPerror(error));
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop1 */
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vinc1 */
|
error = INPapName(ckt, which, dcJob, "stop1", parm);
|
||||||
error = INPapName(ckt,which,dcJob,"step1",parm);
|
if (error)
|
||||||
if(error) current->error = INPerrCat(current->error,INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
if(*line) {
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc1 */
|
||||||
if(*line == 'd') goto next;
|
error = INPapName(ckt, which, dcJob, "step1", parm);
|
||||||
INPgetTok(&line,&name,1);
|
if (error)
|
||||||
INPinsert(&name,tab);
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
ptemp.uValue=name;
|
if (*line) {
|
||||||
error = INPapName(ckt,which,dcJob,"name2",&ptemp);
|
if (*line == 'd')
|
||||||
if(error) current->error= INPerrCat(current->error,INPerror(error));
|
goto next;
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vstart1 */
|
INPgetTok(&line, &name, 1);
|
||||||
error = INPapName(ckt,which,dcJob,"start2",parm);
|
INPinsert(&name, tab);
|
||||||
if(error) current->error= INPerrCat(current->error,INPerror(error));
|
ptemp.uValue = name;
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vstop1 */
|
error = INPapName(ckt, which, dcJob, "name2", &ptemp);
|
||||||
error = INPapName(ckt,which,dcJob,"stop2",parm);
|
if (error)
|
||||||
if(error) current->error= INPerrCat(current->error,INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* vinc1 */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart1 */
|
||||||
error = INPapName(ckt,which,dcJob,"step2",parm);
|
error = INPapName(ckt, which, dcJob, "start2", parm);
|
||||||
if(error) current->error= INPerrCat(current->error,INPerror(error));
|
if (error)
|
||||||
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop1 */
|
||||||
|
error = INPapName(ckt, which, dcJob, "stop2", parm);
|
||||||
|
if (error)
|
||||||
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc1 */
|
||||||
|
error = INPapName(ckt, which, dcJob, "step2", parm);
|
||||||
|
if (error)
|
||||||
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(strcmp(token ,"tran")==0){
|
|
||||||
|
if (strcmp(token, "tran") == 0) {
|
||||||
JOB *tranJob;
|
JOB *tranJob;
|
||||||
which = -1;
|
which = -1;
|
||||||
for(j=0;j<ft_sim->numAnalyses;j++) {
|
for (j = 0; j < ft_sim->numAnalyses; j++)
|
||||||
if(strcmp(ft_sim->analyses[j]->name,"TRAN")==0) {
|
if (strcmp(ft_sim->analyses[j]->name, "TRAN") == 0) {
|
||||||
which = j;
|
which = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
if (which == -1) {
|
||||||
if(which == -1) {
|
current->error = INPerrCat
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
(current->error,
|
||||||
"transient analysis unsupported\n"));
|
INPmkTemp("transient analysis unsupported\n"));
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "tranan",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "tranan",
|
||||||
& tranJob, ft_curckt->ci_specTask);
|
& tranJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createTRAN");
|
ft_sperror(err, "createTRAN");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
parm=INPgetValue(ckt,&line,IF_REAL,tab);/* Tstep */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstep */
|
||||||
error = INPapName(ckt,which,tranJob,"tstep",parm);
|
error = INPapName(ckt, which, tranJob, "tstep", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* Tstop*/
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstop*/
|
||||||
error = INPapName(ckt,which,tranJob,"tstop",parm);
|
error = INPapName(ckt, which, tranJob, "tstop", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
if(*line){
|
if (*line) {
|
||||||
if(*line == 'd') goto next;
|
if (*line == 'd')
|
||||||
if(*line == 'u') goto uic;
|
goto next;
|
||||||
parm=INPgetValue(ckt,&line,IF_REAL,tab);/* Tstart */
|
if (*line == 'u')
|
||||||
error = INPapName(ckt,which,tranJob,"tstart",parm);
|
goto uic;
|
||||||
if(error) current->error = INPerrCat(current->error,
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstart */
|
||||||
INPerror(error));
|
error = INPapName(ckt, which, tranJob, "tstart", parm);
|
||||||
if(*line == 'u') goto uic;
|
if (error)
|
||||||
parm=INPgetValue(ckt,&line,IF_REAL,tab);/* Tmax */
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
error = INPapName(ckt,which,tranJob,"tmax",parm);
|
if (*line == 'u')
|
||||||
if(error) current->error = INPerrCat(current->error,
|
goto uic;
|
||||||
INPerror(error));
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tmax */
|
||||||
uic:
|
error = INPapName(ckt, which, tranJob, "tmax", parm);
|
||||||
if(*line == 'u') {
|
if (error)
|
||||||
INPgetTok(&line,&name,1);
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
if(strcmp(name,"uic")==0) {
|
uic:
|
||||||
|
if (*line == 'u') {
|
||||||
|
INPgetTok(&line, &name, 1);
|
||||||
|
if (strcmp(name, "uic") == 0) {
|
||||||
ptemp.iValue = 1;
|
ptemp.iValue = 1;
|
||||||
error = INPapName(ckt,which,tranJob,"tstart",&ptemp);
|
error = INPapName(ckt, which, tranJob, "tstart", &ptemp);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -287,99 +307,96 @@ uic:
|
||||||
/* *********************** */
|
/* *********************** */
|
||||||
/* PSS - Spertica - 100910 */
|
/* PSS - Spertica - 100910 */
|
||||||
/* *********************** */
|
/* *********************** */
|
||||||
if(strcmp(token ,"pss")==0){
|
if (strcmp(token, "pss") == 0) {
|
||||||
JOB *pssJob;
|
JOB *pssJob;
|
||||||
which = -1;
|
which = -1;
|
||||||
for(j=0;j<ft_sim->numAnalyses;j++) {
|
for (j = 0; j < ft_sim->numAnalyses; j++)
|
||||||
if(strcmp(ft_sim->analyses[j]->name,"PSS")==0) {
|
if (strcmp(ft_sim->analyses[j]->name, "PSS") == 0) {
|
||||||
which = j;
|
which = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
if (which == -1) {
|
||||||
if(which == -1) {
|
current->error = INPerrCat
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
(current->error,
|
||||||
"periodic steady state analysis unsupported\n"));
|
INPmkTemp("periodic steady state analysis unsupported\n"));
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
err = ft_sim->newAnalysis (ft_curckt->ci_ckt,which, "pssan",
|
err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "pssan",
|
||||||
& pssJob, ft_curckt->ci_specTask);
|
& pssJob, ft_curckt->ci_specTask);
|
||||||
if(err) {
|
if (err) {
|
||||||
ft_sperror(err,"createPSS");
|
ft_sperror(err, "createPSS");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
parm=INPgetValue(ckt,&line,IF_REAL,tab);/* Guessed Frequency */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Guessed Frequency */
|
||||||
error = INPapName(ckt,which,pssJob,"fguess",parm);
|
error = INPapName(ckt, which, pssJob, "fguess", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
|
||||||
parm = INPgetValue(ckt,&line,IF_REAL,tab); /* Stabilization time */
|
parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Stabilization time */
|
||||||
error = INPapName(ckt,which,pssJob,"stabtime",parm);
|
error = INPapName(ckt, which, pssJob, "stabtime", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
|
||||||
parm = INPgetValue(ckt,&line,IF_INTEGER,tab); /* PSS points */
|
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */
|
||||||
error = INPapName(ckt,which,pssJob,"points",parm);
|
error = INPapName(ckt, which, pssJob, "points", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
|
|
||||||
parm = INPgetValue(ckt,&line,IF_INTEGER,tab); /* PSS points */
|
parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */
|
||||||
error = INPapName(ckt,which,pssJob,"harmonics",parm);
|
error = INPapName(ckt, which, pssJob, "harmonics", parm);
|
||||||
if(error) current->error = INPerrCat(current->error,
|
if (error)
|
||||||
INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
next:
|
next:
|
||||||
while(*line) { /* read the entire line */
|
while (*line) { /* read the entire line */
|
||||||
if(flag){
|
|
||||||
INPgetTok(&line,&token,1);
|
if (flag)
|
||||||
}
|
INPgetTok(&line, &token, 1);
|
||||||
else{
|
else
|
||||||
flag = 1;
|
flag = 1;
|
||||||
}
|
|
||||||
for(i=0;i<ft_sim->analyses[save]->numParms;i++) {
|
for (i = 0; i < ft_sim->analyses[save]->numParms; i++) {
|
||||||
/* find the parameter */
|
/* find the parameter */
|
||||||
if(0==strcmp(token ,
|
if (0 == strcmp(token, ft_sim->analyses[save]->analysisParms[i].keyword)) {
|
||||||
ft_sim->analyses[save]->analysisParms[i].
|
|
||||||
keyword) ){
|
|
||||||
/* found it, analysis which, parameter i */
|
/* found it, analysis which, parameter i */
|
||||||
if(ft_sim->analyses[save]->analysisParms[i].
|
if (ft_sim->analyses[save]->analysisParms[i].dataType & IF_FLAG) {
|
||||||
dataType & IF_FLAG) {
|
|
||||||
/* one of the keywords! */
|
/* one of the keywords! */
|
||||||
ptemp.iValue = 1;
|
ptemp.iValue = 1;
|
||||||
error = ft_sim->setAnalysisParm (ckt,
|
error = ft_sim->setAnalysisParm
|
||||||
senseJob, ft_sim->analyses[save]->
|
(ckt, senseJob,
|
||||||
analysisParms[i].id, &ptemp, NULL);
|
ft_sim->analyses[save]->analysisParms[i].id, &ptemp, NULL);
|
||||||
if(error) current->error = INPerrCat(
|
if (error)
|
||||||
current->error, INPerror(error));
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
}
|
} else {
|
||||||
else {
|
parm = INPgetValue
|
||||||
parm = INPgetValue(ckt,&line,ft_sim->
|
(ckt, &line,
|
||||||
analyses[save]->analysisParms[i].
|
ft_sim->analyses[save]->analysisParms[i].dataType, tab);
|
||||||
dataType,tab);
|
error = ft_sim->setAnalysisParm
|
||||||
error = ft_sim->setAnalysisParm (ckt,
|
(ckt, senseJob,
|
||||||
senseJob, ft_sim->analyses[save]->
|
ft_sim->analyses[save]->analysisParms[i].id, parm, NULL);
|
||||||
analysisParms[i].id, parm, NULL);
|
if (error)
|
||||||
if(error) current->error = INPerrCat(
|
current->error = INPerrCat(current->error, INPerror(error));
|
||||||
current->error, INPerror(error));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(i==ft_sim->analyses[save]->numParms) {
|
|
||||||
|
if (i == ft_sim->analyses[save]->numParms) {
|
||||||
/* didn't find it! */
|
/* didn't find it! */
|
||||||
current->error = INPerrCat(current->error,INPmkTemp(
|
current->error = INPerrCat
|
||||||
" Error: unknown parameter on .sens - ignored \n"));
|
(current->error,
|
||||||
|
INPmkTemp(" Error: unknown parameter on .sens - ignored \n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ((err = ft_sim->doAnalyses (ckt, 1, ft_curckt->ci_curTask)) != OK) {
|
||||||
if((err = ft_sim->doAnalyses (ckt, 1, ft_curckt->ci_curTask)) != OK) {
|
|
||||||
ft_sperror(err, "doAnalyses");
|
ft_sperror(err, "doAnalyses");
|
||||||
return(0);/* temporary */
|
return(0); /* temporary */
|
||||||
}
|
}
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
||||||
Author: 1985 Thomas L. Quarles
|
Author: 1985 Thomas L. Quarles
|
||||||
Modified: 2000 AlansFixes
|
Modified: 2000 AlansFixes
|
||||||
**********/
|
**********/
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ngspice/ngspice.h"
|
#include "ngspice/ngspice.h"
|
||||||
#include "ngspice/tskdefs.h"
|
#include "ngspice/tskdefs.h"
|
||||||
|
|
@ -13,110 +11,115 @@ Modified: 2000 AlansFixes
|
||||||
#include "ngspice/iferrmsg.h"
|
#include "ngspice/iferrmsg.h"
|
||||||
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
/* CDHW See notes in spiceif.c for an explanation of these fixes CDHW */
|
||||||
/*
|
|
||||||
int
|
|
||||||
CKTnewTask(CKTcircuit *ckt, void **taskPtr, IFuid taskName)
|
|
||||||
*/
|
|
||||||
int
|
int
|
||||||
CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr)
|
CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr)
|
||||||
/*CDHW See notes in spiceif.c for an explanation of these fixes CDHW*/
|
|
||||||
{
|
{
|
||||||
TSKtask *tsk, *def=NULL;
|
TSKtask *tsk, *def = NULL;
|
||||||
|
|
||||||
NG_IGNORE(ckt);
|
NG_IGNORE(ckt);
|
||||||
|
|
||||||
*taskPtr = TMALLOC(TSKtask, 1);
|
*taskPtr = TMALLOC(TSKtask, 1);
|
||||||
if(*taskPtr==NULL) return(E_NOMEM);
|
if (*taskPtr == NULL)
|
||||||
|
return(E_NOMEM);
|
||||||
|
|
||||||
tsk = *taskPtr;
|
tsk = *taskPtr;
|
||||||
tsk->TSKname = taskName;
|
tsk->TSKname = taskName;
|
||||||
|
|
||||||
#if (1) /*CDHW*/
|
#if (1) /*CDHW*/
|
||||||
if(defPtr)
|
|
||||||
def = *defPtr;
|
if(defPtr)
|
||||||
if ((strcmp(taskName,"special")==0) && def ) {
|
def = *defPtr;
|
||||||
/* create options by copying the circuit's defaults */
|
|
||||||
tsk->TSKtemp = def->TSKtemp;
|
if ((strcmp(taskName,"special") == 0) && def) {
|
||||||
tsk->TSKnomTemp = def->TSKnomTemp;
|
/* create options by copying the circuit's defaults */
|
||||||
tsk->TSKmaxOrder = def->TSKmaxOrder;
|
tsk->TSKtemp = def->TSKtemp;
|
||||||
tsk->TSKintegrateMethod = def->TSKintegrateMethod;
|
tsk->TSKnomTemp = def->TSKnomTemp;
|
||||||
tsk->TSKbypass = def->TSKbypass;
|
tsk->TSKmaxOrder = def->TSKmaxOrder;
|
||||||
tsk->TSKdcMaxIter = def->TSKdcMaxIter;
|
tsk->TSKintegrateMethod = def->TSKintegrateMethod;
|
||||||
tsk->TSKdcTrcvMaxIter = def->TSKdcTrcvMaxIter;
|
tsk->TSKbypass = def->TSKbypass;
|
||||||
tsk->TSKtranMaxIter = def->TSKtranMaxIter;
|
tsk->TSKdcMaxIter = def->TSKdcMaxIter;
|
||||||
tsk->TSKnumSrcSteps = def->TSKnumSrcSteps;
|
tsk->TSKdcTrcvMaxIter = def->TSKdcTrcvMaxIter;
|
||||||
tsk->TSKnumGminSteps = def->TSKnumGminSteps;
|
tsk->TSKtranMaxIter = def->TSKtranMaxIter;
|
||||||
tsk->TSKgminFactor = def->TSKgminFactor;
|
tsk->TSKnumSrcSteps = def->TSKnumSrcSteps;
|
||||||
/* minBreak */
|
tsk->TSKnumGminSteps = def->TSKnumGminSteps;
|
||||||
tsk->TSKabstol = def->TSKabstol;
|
tsk->TSKgminFactor = def->TSKgminFactor;
|
||||||
tsk->TSKpivotAbsTol = def->TSKpivotAbsTol;
|
/* minBreak */
|
||||||
tsk->TSKpivotRelTol = def->TSKpivotRelTol;
|
tsk->TSKabstol = def->TSKabstol;
|
||||||
tsk->TSKreltol = def->TSKreltol;
|
tsk->TSKpivotAbsTol = def->TSKpivotAbsTol;
|
||||||
tsk->TSKchgtol = def->TSKchgtol;
|
tsk->TSKpivotRelTol = def->TSKpivotRelTol;
|
||||||
tsk->TSKvoltTol = def->TSKvoltTol;
|
tsk->TSKreltol = def->TSKreltol;
|
||||||
tsk->TSKgmin = def->TSKgmin;
|
tsk->TSKchgtol = def->TSKchgtol;
|
||||||
tsk->TSKgshunt = def->TSKgshunt;
|
tsk->TSKvoltTol = def->TSKvoltTol;
|
||||||
|
tsk->TSKgmin = def->TSKgmin;
|
||||||
|
tsk->TSKgshunt = def->TSKgshunt;
|
||||||
/* delmin */
|
/* delmin */
|
||||||
tsk->TSKtrtol = def->TSKtrtol;
|
tsk->TSKtrtol = def->TSKtrtol;
|
||||||
tsk->TSKdefaultMosM = def->TSKdefaultMosM;
|
tsk->TSKdefaultMosM = def->TSKdefaultMosM;
|
||||||
tsk->TSKdefaultMosL = def->TSKdefaultMosL;
|
tsk->TSKdefaultMosL = def->TSKdefaultMosL;
|
||||||
tsk->TSKdefaultMosW = def->TSKdefaultMosW;
|
tsk->TSKdefaultMosW = def->TSKdefaultMosW;
|
||||||
tsk->TSKdefaultMosAD = def->TSKdefaultMosAD;
|
tsk->TSKdefaultMosAD = def->TSKdefaultMosAD;
|
||||||
tsk->TSKdefaultMosAS = def->TSKdefaultMosAS;
|
tsk->TSKdefaultMosAS = def->TSKdefaultMosAS;
|
||||||
/* fixLimit */
|
/* fixLimit */
|
||||||
tsk->TSKnoOpIter= def->TSKnoOpIter;
|
tsk->TSKnoOpIter = def->TSKnoOpIter;
|
||||||
tsk->TSKtryToCompact = def->TSKtryToCompact;
|
tsk->TSKtryToCompact = def->TSKtryToCompact;
|
||||||
tsk->TSKbadMos3 = def->TSKbadMos3;
|
tsk->TSKbadMos3 = def->TSKbadMos3;
|
||||||
tsk->TSKkeepOpInfo = def->TSKkeepOpInfo;
|
tsk->TSKkeepOpInfo = def->TSKkeepOpInfo;
|
||||||
tsk->TSKcopyNodesets = def->TSKcopyNodesets;
|
tsk->TSKcopyNodesets = def->TSKcopyNodesets;
|
||||||
tsk->TSKnodeDamping = def->TSKnodeDamping;
|
tsk->TSKnodeDamping = def->TSKnodeDamping;
|
||||||
tsk->TSKabsDv = def->TSKabsDv;
|
tsk->TSKabsDv = def->TSKabsDv;
|
||||||
tsk->TSKrelDv = def->TSKrelDv;
|
tsk->TSKrelDv = def->TSKrelDv;
|
||||||
#ifdef NEWTRUNC
|
#ifdef NEWTRUNC
|
||||||
tsk->TSKlteReltol = def->TSKlteReltol;
|
tsk->TSKlteReltol = def->TSKlteReltol;
|
||||||
tsk->TSKlteAbstol = def->TSKlteAbstol;
|
tsk->TSKlteAbstol = def->TSKlteAbstol;
|
||||||
#endif /* NEWTRUNC */
|
#endif
|
||||||
} else {
|
|
||||||
/* use the application defaults */
|
} else {
|
||||||
#endif /*CDHW*/
|
#endif /*CDHW*/
|
||||||
tsk->TSKgmin = 1e-12;
|
|
||||||
tsk->TSKgshunt = 0;
|
/* use the application defaults */
|
||||||
tsk->TSKabstol = 1e-12;
|
tsk->TSKgmin = 1e-12;
|
||||||
tsk->TSKreltol = 1e-3;
|
tsk->TSKgshunt = 0;
|
||||||
tsk->TSKchgtol = 1e-14;
|
tsk->TSKabstol = 1e-12;
|
||||||
tsk->TSKvoltTol = 1e-6;
|
tsk->TSKreltol = 1e-3;
|
||||||
|
tsk->TSKchgtol = 1e-14;
|
||||||
|
tsk->TSKvoltTol = 1e-6;
|
||||||
#ifdef NEWTRUNC
|
#ifdef NEWTRUNC
|
||||||
tsk->TSKlteReltol = 1e-3;
|
tsk->TSKlteReltol = 1e-3;
|
||||||
tsk->TSKlteAbstol = 1e-6;
|
tsk->TSKlteAbstol = 1e-6;
|
||||||
#endif /* NEWTRUNC */
|
#endif
|
||||||
tsk->TSKtrtol = 7;
|
tsk->TSKtrtol = 7;
|
||||||
tsk->TSKbypass = 0;
|
tsk->TSKbypass = 0;
|
||||||
tsk->TSKtranMaxIter = 10;
|
tsk->TSKtranMaxIter = 10;
|
||||||
tsk->TSKdcMaxIter = 100;
|
tsk->TSKdcMaxIter = 100;
|
||||||
tsk->TSKdcTrcvMaxIter = 50;
|
tsk->TSKdcTrcvMaxIter = 50;
|
||||||
tsk->TSKintegrateMethod = TRAPEZOIDAL;
|
tsk->TSKintegrateMethod = TRAPEZOIDAL;
|
||||||
tsk->TSKmaxOrder = 2;
|
tsk->TSKmaxOrder = 2;
|
||||||
tsk->TSKnumSrcSteps = 1;
|
tsk->TSKnumSrcSteps = 1;
|
||||||
tsk->TSKnumGminSteps = 1;
|
tsk->TSKnumGminSteps = 1;
|
||||||
tsk->TSKgminFactor = 10;
|
tsk->TSKgminFactor = 10;
|
||||||
tsk->TSKpivotAbsTol = 1e-13;
|
tsk->TSKpivotAbsTol = 1e-13;
|
||||||
tsk->TSKpivotRelTol = 1e-3;
|
tsk->TSKpivotRelTol = 1e-3;
|
||||||
tsk->TSKtemp = 300.15;
|
tsk->TSKtemp = 300.15;
|
||||||
tsk->TSKnomTemp = 300.15;
|
tsk->TSKnomTemp = 300.15;
|
||||||
tsk->TSKdefaultMosM = 1;
|
tsk->TSKdefaultMosM = 1;
|
||||||
tsk->TSKdefaultMosL = 1e-4;
|
tsk->TSKdefaultMosL = 1e-4;
|
||||||
tsk->TSKdefaultMosW = 1e-4;
|
tsk->TSKdefaultMosW = 1e-4;
|
||||||
tsk->TSKdefaultMosAD = 0;
|
tsk->TSKdefaultMosAD = 0;
|
||||||
tsk->TSKdefaultMosAS = 0;
|
tsk->TSKdefaultMosAS = 0;
|
||||||
tsk->TSKnoOpIter=0;
|
tsk->TSKnoOpIter = 0;
|
||||||
tsk->TSKtryToCompact=0;
|
tsk->TSKtryToCompact = 0;
|
||||||
tsk->TSKbadMos3=0;
|
tsk->TSKbadMos3 = 0;
|
||||||
tsk->TSKkeepOpInfo=0;
|
tsk->TSKkeepOpInfo = 0;
|
||||||
tsk->TSKcopyNodesets=0;
|
tsk->TSKcopyNodesets = 0;
|
||||||
tsk->TSKnodeDamping=0;
|
tsk->TSKnodeDamping = 0;
|
||||||
tsk->TSKabsDv=0.5;
|
tsk->TSKabsDv = 0.5;
|
||||||
tsk->TSKrelDv=2.0;
|
tsk->TSKrelDv = 2.0;
|
||||||
|
|
||||||
#if (1) /*CDHW*/
|
#if (1) /*CDHW*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue