File: CNvector.h

package info (click to toggle)
plotmtv 1.4.1-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 4,024 kB
  • ctags: 5,006
  • sloc: ansic: 51,179; makefile: 1,976; fortran: 1,277; sh: 510; csh: 439
file content (80 lines) | stat: -rw-r--r-- 1,919 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * CNvector.h - definition for vectors
 *
 * This file requires the inclusion of "CNdata.h"
 */

#ifndef CNvector_defined
#define CNvector_defined

#define CN_ALL_FIELDS -1         /* To denote vectors           */
#define CN_MAG_FIELDS -2         /* Vector magnitude            */

/*
 * A vector consists of magnitude and direction (vx,vy,vz)
 * and a point (x,y,z).  For simplicity, each vector is self-contained,
 * i.e. contains both magnitude and point, unlike nodes which point to
 * points.
 */

/* A vector in a linked list */
typedef struct CNvector_strct {
   short  ID;
   short  flag;
   short  noplot;
   double x;
   double y;
   double z;
   double vx;
   double vy;
   double vz;
   struct CNnode_strct *nd;
   struct CNvector_strct *next;
   struct CNvector_strct *prev;
} CNvector;
typedef struct CNvector_strct *CNvecptr;

/*
 * The vector_bag contains the vectors and various bits of info
 * related to the vectors
 */
 
/* A vector-box */
typedef struct CNvecbox_strct {
   short  ID;
   short  linetype;
   short  linecolor;
   short  linewidth;
   short  marktype;
   short  markcolor;
   double vlen_max;
   double vlen_min;
   double xmin, xmax;
   double ymin, ymax;
   double zmin, zmax;
   struct CNvector_strct *vectorhead;
   struct CNvector_strct *vectortail;
} CNvecbox;
typedef struct CNvecbox_strct *CNvecboxptr;


/*
 * Extern declarations
 */
extern double      CNdefault_vector_scale();
extern double      CNmax_vector();
extern double      CNmin_vector();
extern double      CNveclog10();

extern CNvecboxptr CNmake_vectorbox();
extern void        CNdelete_vectorbox();
extern void        CNprint_vectorbox();

extern CNvecptr    CNmake_vector();
extern CNvecptr    CNinsert_vector();
extern void        CNdelete_vector();
extern void        CNdelete_vector_list();
extern void        CNprint_vector_list();
extern int         CNcount_vectors();

#endif /* CNvector_defined */