Jspice3
ftedata.h
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1985 Wayne A. Christopher
5  1992 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #ifndef FTEdata_h
9 #define FTEdata_h
10 
11 #include "cpstd.h" /* for struct complex */
12 #include "fteconst.h"
13 
14 /* A (possibly multi-dimensional) data vector. The data is represented
15  * internally by a 1-d array. The number of dimensions and the size
16  * of each dimension is recorded, along with v_length, the total size of
17  * the array. If the dimensionality is 0 or 1, v_length is significant
18  * instead of v_numdims and v_dims, and the vector is handled in the old
19  * manner.
20  */
21 
22 #define MAXDIMS 8
23 
24 struct dvec {
25  char *v_name; /* Same as so_vname. */
26  int v_type; /* Same as so_vtype. */
27  short v_flags; /* Flags (a combination of VF_*). */
28  double *v_realdata; /* Real data. */
29  complex *v_compdata; /* Complex data. */
30  double v_minsignal; /* Minimum value to plot. */
31  double v_maxsignal; /* Maximum value to plot. */
32  GRIDTYPE v_gridtype; /* One of GRID_*. */
33  PLOTTYPE v_plottype; /* One of PLOT_*. */
34  int v_length; /* Length of the vector. */
35  int v_rlength; /* How much space we really have. */
36  int v_outindex; /* Index if writedata is building the vector. */
37  int v_linestyle; /* What line style we are using. */
38  int v_color; /* What color we are using. */
39  char *v_defcolor; /* The name of a color to use. */
40  int v_numdims; /* How many dims -- 0 = scalar (len = 1). */
41  int v_dims[MAXDIMS]; /* The actual size in each dimension. */
42  struct plot *v_plot; /* The plot structure (if it has one). */
43  struct dvec *v_next; /* Link for list of plot vectors. */
44  struct dvlist *v_link2; /* Extra link for things like print. */
45  struct dvec *v_scale; /* If this has a non-standard scale... */
46 } ;
47 
48 /* list of data vectors */
49 struct dvlist {
50  struct dvec *dl_dvec;
51  struct dvlist *dl_next;
52 };
53 
54 #define isreal(v) ((v)->v_flags & VF_REAL)
55 #define iscomplex(v) ((v)->v_flags & VF_COMPLEX)
56 
57 /* The information for a particular set of vectors that come from one
58  * plot.
59  */
60 
61 struct plot {
62  char *pl_title; /* The title card. */
63  char *pl_date; /* Date. */
64  char *pl_name; /* The plot name. */
65  char *pl_typename; /* Tran1, op2, etc. */
66  void *pl_hashtab; /* Hash head for permanent vectors */
67  struct dvec *pl_dvecs; /* The data vectors in this plot. */
68  struct dvec *pl_scale; /* The "scale" for the rest of the vectors. */
69  struct plot *pl_next; /* List of plots. */
70  wordlist *pl_commands; /* Commands to execute for this plot. */
71  struct variable *pl_env;/* The 'environment' for this plot. */
72  char *pl_ccom; /* The ccom struct for this plot. */
73  bool pl_written; /* Some or all of the vecs have been saved. */
74  int pl_ndims; /* Number of dimensions */
75  int pl_active; /* Nonzero when the plot is being used */
76  double pl_start; /* the "tran params" for this plot */
77  double pl_stop;
78  double pl_step;
79 } ;
80 
81 #endif /* FTEdata_h */
double v_minsignal
Definition: ftedata.h:30
GRIDTYPE
Definition: fteconst.h:60
int v_rlength
Definition: ftedata.h:35
char * pl_typename
Definition: ftedata.h:65
char * pl_date
Definition: ftedata.h:63
struct dvlist * v_link2
Definition: ftedata.h:44
char * pl_title
Definition: ftedata.h:62
char * pl_name
Definition: ftedata.h:64
double pl_step
Definition: ftedata.h:78
struct variable * pl_env
Definition: ftedata.h:71
struct dvec * pl_dvecs
Definition: ftedata.h:67
Definition: ftedata.h:49
Definition: cpstd.h:29
Definition: ftedata.h:61
int v_dims[MAXDIMS]
Definition: ftedata.h:41
PLOTTYPE
Definition: fteconst.h:73
struct dvec * v_next
Definition: ftedata.h:43
void * pl_hashtab
Definition: ftedata.h:66
complex * v_compdata
Definition: ftedata.h:29
char * pl_ccom
Definition: ftedata.h:72
struct dvlist * dl_next
Definition: ftedata.h:51
int v_linestyle
Definition: ftedata.h:37
double v_maxsignal
Definition: ftedata.h:31
#define MAXDIMS
Definition: ftedata.h:22
int pl_active
Definition: ftedata.h:75
struct dvec * pl_scale
Definition: ftedata.h:68
GRIDTYPE v_gridtype
Definition: ftedata.h:32
bool pl_written
Definition: ftedata.h:73
struct plot * v_plot
Definition: ftedata.h:42
char * v_defcolor
Definition: ftedata.h:39
struct dvec * v_scale
Definition: ftedata.h:45
Definition: ftedata.h:24
struct dvec * dl_dvec
Definition: ftedata.h:50
char * v_name
Definition: ftedata.h:25
int v_outindex
Definition: ftedata.h:36
int pl_ndims
Definition: ftedata.h:74
Definition: cpstd.h:21
struct plot * pl_next
Definition: ftedata.h:69
int v_type
Definition: ftedata.h:26
double pl_start
Definition: ftedata.h:76
int v_numdims
Definition: ftedata.h:40
PLOTTYPE v_plottype
Definition: ftedata.h:33
int v_color
Definition: ftedata.h:38
int v_length
Definition: ftedata.h:34
double pl_stop
Definition: ftedata.h:77
short v_flags
Definition: ftedata.h:27
wordlist * pl_commands
Definition: ftedata.h:70
double * v_realdata
Definition: ftedata.h:28
Definition: cpstd.h:41