Enable linearizing all vectors, when none is given, with or without np statement.
This commit is contained in:
parent
bfe496937e
commit
8639a053a3
|
|
@ -148,6 +148,7 @@ com_linearnp(wordlist* wl)
|
||||||
struct dvec* lin;
|
struct dvec* lin;
|
||||||
int expo, len, i;
|
int expo, len, i;
|
||||||
wordlist* wlnew;
|
wordlist* wlnew;
|
||||||
|
bool nponly = FALSE;
|
||||||
|
|
||||||
if (!plot_cur || !plot_cur->pl_typename || !ciprefix("tran", plot_cur->pl_typename)) {
|
if (!plot_cur || !plot_cur->pl_typename || !ciprefix("tran", plot_cur->pl_typename)) {
|
||||||
fprintf(cp_err, "Error: plot must be a transient analysis\n");
|
fprintf(cp_err, "Error: plot must be a transient analysis\n");
|
||||||
|
|
@ -246,7 +247,14 @@ com_linearnp(wordlist* wl)
|
||||||
newtime->v_realdata[i] = d;
|
newtime->v_realdata[i] = d;
|
||||||
new->pl_scale = new->pl_dvecs = newtime;
|
new->pl_scale = new->pl_dvecs = newtime;
|
||||||
|
|
||||||
if (wl) {
|
/* check if "np=" is the only entry in wl.
|
||||||
|
If yes, linearize all vectors */
|
||||||
|
if (wl && ciprefix("np=", wl->wl_word) && wl->wl_next == NULL) {
|
||||||
|
nponly = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wl && !nponly) {
|
||||||
|
/* check for vectors given in the command line */
|
||||||
while (wl) {
|
while (wl) {
|
||||||
if (ciprefix("np=", wl->wl_word)) {
|
if (ciprefix("np=", wl->wl_word)) {
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
|
|
@ -264,6 +272,7 @@ com_linearnp(wordlist* wl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* linearize all vectors of the current plot */
|
||||||
for (v = old->pl_dvecs; v; v = v->v_next) {
|
for (v = old->pl_dvecs; v; v = v->v_next) {
|
||||||
if (v == old->pl_scale)
|
if (v == old->pl_scale)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue