1 | /***************************************
2 | $Header: /cvsroot/petscgraphics/illuminator.h,v 1.16 2004/03/07 01:56:18 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; xcut, ycut and zcut should almost always be PETSC_FALSE */
47 | int DATriangulate
48 | (DA theda, Vec globalX, int this, PetscScalar *minmax, int n_quants,
49 | PetscScalar *isoquants, PetscScalar *colors, PetscTruth xcut, PetscTruth ycut,
50 | PetscTruth zcut);
51 | int DATriangulateLocal
52 | (DA theda, Vec localX, int this, PetscScalar *minmax, int n_quants,
53 | PetscScalar *isoquants, PetscScalar *colors, PetscTruth xcut, PetscTruth ycut,
54 | PetscTruth zcut);
55 | int IllErrorHandler (int id, char *message);
56 |
57 | /* Plot2D stuff, future development... */
58 |
59 | /* int DAPlot (DA theda, Vec global, PetscScalar x_magnify, PetscScalar y_magnify,
60 | plot_type *types, void **params); */
61 |
62 | /* IlluMulti load/save stuff, including compression #defines */
63 | int IlluMultiLoad
64 | (char *basename, DA *theda, PetscScalar *wx,PetscScalar *wy,PetscScalar *wz,
65 | field_plot_type **fieldtypes, int *usermetacount, char ***usermetanames,
66 | char ***usermetadata);
67 | int IlluMultiRead (DA theda, Vec X, char *basename, int *usermetacount,
68 | char ***usermetanames, char ***usermetadata);
69 | int IlluMultiSave
70 | (DA theda, Vec X, char *basename, PetscScalar wx,PetscScalar wy,PetscScalar wz,
71 | field_plot_type *fieldtypes, int usermetacount, char **usermetanames,
72 | char **usermetadata, int compressed);
73 | #define COMPRESS_INT_MASK 0x30
74 | #define COMPRESS_INT_NONE 0x00
75 | #define COMPRESS_INT_LONG 0x10
76 | #define COMPRESS_INT_SHORT 0x20
77 | #define COMPRESS_INT_CHAR 0x30
78 | #define COMPRESS_GZIP_MASK 0x0F
79 | #define COMPRESS_GZIP_NONE 0x00
80 | #define COMPRESS_GZIP_FAST 0x01
81 | #define COMPRESS_GZIP_BEST 0x0A
82 |
83 | /* Geomview stuff */
84 | int GeomviewBegin (MPI_Comm comm);
85 | int GeomviewEnd (MPI_Comm comm);
86 | int GeomviewDisplayTriangulation (MPI_Comm comm, PetscScalar *minmax,
87 | char *name, PetscTruth transparent);
88 |
89 | #endif /* ILLUMINATOR_H */