1 | /***************************************
2 | $Header: /cvsroot/petscgraphics/illuminator.h,v 1.15 2003/07/25 15:40:09 hazelsct Exp $
3 |
4 | This is the interface for the Illuminator library.
5 | ***************************************/
6 |
7 | #ifndef ILLUMINATOR_H
8 | #define ILLUMINATOR_H /*+ To stop multiple inclusions. +*/
9 | #include <petscda.h>
10 |
11 | /* Core stuff */
12 | int IllDrawTet (PetscScalar *coords, PetscScalar *vals, PetscScalar isoquant, PetscScalar *color);
13 | int IllDrawHex (PetscScalar *coords, PetscScalar *vals, PetscScalar isoquant, PetscScalar *color);
14 | int IllDraw3DBlock (int xd, int yd, int zd, int xs, int ys, int zs, int xm,
15 | int ym, int zm, PetscScalar *minmax, PetscScalar *vals,
16 | int skip, int n_quants, PetscScalar *isoquants,
17 | PetscScalar *colors);
18 |
19 | /*+ A value of
20 | +latex+{\tt field\_plot\_type}
21 | +html+ <tt>field_plot_type</tt>
22 | is attached to each field in a simulation in order to visualize them
23 | properly. Types are as follows:
24 | +*/
25 | typedef enum {
26 | /*+Plot scalar field using colors.+*/
27 | FIELD_SCALAR_COLORS=0x00,
28 | /*+Plot scalar field using contours.+*/
29 | FIELD_SCALAR_CONTOURS=0x01,
30 | /*+Plot ternary data using red, green, blue for components (third component
31 | is inferred from first two).+*/
32 | FIELD_TERNARY_RGB=0x10,
33 | /*+Plot vector field using arrows.+*/
34 | FIELD_VECTOR_ARROWS=0x20,
35 | /*+Plot vector field using hue for direction, intensity for magnitude.+*/
36 | FIELD_VECTOR_HUEINTENSE=0x21,
37 | /*+Plot transformation tensor field as vector triplets.+*/
38 | FIELD_TENSOR_TRANSFORM_VECTORS=0x30,
39 | /*+Plot symmetric tensor field using lines in principal stress directions.+*/
40 | FIELD_TENSOR_STRESS=0x38,
41 | /*+Plot symmetric tensor field using lines in principal stress directions,
42 | inferring last diagonal from the opposite of the sum of the other two.+*/
43 | FIELD_TENSOR_STRESS_SHEAR=0x39
44 | } field_plot_type;
45 |
46 | /* PETSc stuff */
47 | int DATriangulate (DA theda, Vec X, int this, PetscScalar *minmax,
48 | int n_quants, PetscScalar *isoquants, PetscScalar *colors);
49 | int IllErrorHandler (int id, char *message);
50 |
51 | /* Plot2D stuff, future development... */
52 |
53 | /* int DAPlot (DA theda, Vec global, PetscScalar x_magnify, PetscScalar y_magnify,
54 | plot_type *types, void **params); */
55 |
56 | /* IlluMulti load/save stuff, including compression #defines */
57 | int IlluMultiLoad
58 | (char *basename, DA *theda, PetscScalar *wx,PetscScalar *wy,PetscScalar *wz,
59 | field_plot_type **fieldtypes, int *usermetacount, char ***usermetanames,
60 | char ***usermetadata);
61 | int IlluMultiRead (DA theda, Vec X, char *basename, int *usermetacount,
62 | char ***usermetanames, char ***usermetadata);
63 | int IlluMultiSave
64 | (DA theda, Vec X, char *basename, PetscScalar wx,PetscScalar wy,PetscScalar wz,
65 | field_plot_type *fieldtypes, int usermetacount, char **usermetanames,
66 | char **usermetadata, int compressed);
67 | #define COMPRESS_INT_MASK 0x30
68 | #define COMPRESS_INT_NONE 0x00
69 | #define COMPRESS_INT_LONG 0x10
70 | #define COMPRESS_INT_SHORT 0x20
71 | #define COMPRESS_INT_CHAR 0x30
72 | #define COMPRESS_GZIP_MASK 0x0F
73 | #define COMPRESS_GZIP_NONE 0x00
74 | #define COMPRESS_GZIP_FAST 0x01
75 | #define COMPRESS_GZIP_BEST 0x0A
76 |
77 | /* Geomview stuff */
78 | int GeomviewBegin (MPI_Comm comm);
79 | int GeomviewEnd (MPI_Comm comm);
80 | int GeomviewDisplayTriangulation (MPI_Comm comm, PetscScalar *minmax,
81 | char *name, PetscTruth transparent);
82 |
83 | #endif /* ILLUMINATOR_H */