RCS Header: /cvsroot/petscgraphics/tsview-ng.c,v 1.10 2004/05/21 22:08:44 hazelsct Exp
This program views the output of a time series saved using
IlluMultiSave().
It basically just switches between timesteps; future versions may be more
interesting. The neat part of it is that it loads multiprocessor data and
displays it on a single CPU.
Included Files
- #include <libgnomeui/libgnomeui.h>
Preprocessor definitions
#define DPRINTF( fmt, args... )
#define __FUNCT__ "myfilter"
The Illuminator-based 3-D viewer can only display one field at a
time. At the beginning, that is field 0, and is cycled using the
v
command.
#define __FUNCT__ "main"
GladeXML* xml
int entrynum
int total_entries
int current_timestep
char* the_basename
char* basedirname
char** stepnames
double current_time
int width
int height
int nx
int ny
int dataview_count
GtkWidget* dataviews[1]
guchar* rgbbuf[1]
double sizemag
PetscTruth transp
PetscScalar vecmax
DA theda
Vec global
PetscScalar minmax[6]
field_plot_type* fieldtypes
int dimensions
int num_fields
int num_variables[1]
int** variable_indices
Local Variables
help
static char help[]
basefilename
Little variable for myfilter() and refresh_stepnames().
static char* basefilename
PetscScalar ArrayMaxMag ( PetscScalar* global, int points, int fields, int field )
void display_timestep ( int usermetacount, char** usermetanames, char** usermetadata )
This is
main().
int main ( int argc, char* argv[] )
- int main
- It returns an int to the OS.
- int argc
- Argument count.
- char* argv[]
- Arguments.
After
PETSc
and glade/GNOME initialization, it gets the list of files matching the
basename.
This function returns non-zero for "qualifying" file names which start with
the stored files' basename.time and end with
.cpu0000.meta.
It is used as the
select() function for scandir() in main().
int myfilter ( const struct dirent* direntry )
- int myfilter
- Returns non-zero for qualifying filenames.
- const struct dirent* direntry
- Directory entry with filename to test.
void on_about_activate ( GtkWidget* none, gpointer user_data )
void on_mag_spin_value_changed ( GtkWidget* mag_spin, gpointer user_data )
void on_plot_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )
void on_refresh_activate ( GtkWidget* none, gpointer user_data )
void on_save_activate ( GtkWidget* widget, gpointer user_data )
void on_timestep_spin_value_changed ( GtkWidget* timestep_spin, gpointer user_data )
void paint_rgb ( guchar* rgb, int rwidth, int rheight, DA rgbda, Vec rgbglobal, int display_field )
This loads the names of the files into a long list.
int refresh_stepnames ( void )
void render_dataviews ( void )
static inline void pseudocolor ( PetscScalar val, PetscScalar min, PetscScalar max, guchar* pixel )
static inline void pseudohueintcolor ( PetscScalar vx, PetscScalar vy, PetscScalar refmag, guchar* pixel )
static inline void pseudoternarycolor ( PetscScalar A, PetscScalar B, PetscScalar Corner1A, PetscScalar Corner1B, PetscScalar Corner2A, PetscScalar Corner2B, PetscScalar Corner3A, PetscScalar Corner3B, guchar* pixel )