File tsview-ng.c

RCS Header

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


Preprocessor definitions

#define PNG_NO_MMX_CODE 1

#define ORBIT2 1

#define IMLIB2_EXISTS 1

#define DPRINTF( fmt, args... )

#define DEFAULT_RENDER_SIZE 300

#define SCALE_BPP 3

#define __FUNCT__ "render_dataviews"

#define RENDER_WIDTH

#define RENDER_HEIGHT

#define __FUNCT__ "my_time_filter"

#define __FUNCT__ "my_time_filter"

#define __FUNCT__ "main"


Typedef terntype

typedef enum {...} terntype
enum  
   {  
      GEN_TRI;  
      UNIT_TRI;  
      EQ_TRI;  
      GEN_RECT;  
      UNIT_SQ;  
      SQUARE;  
   }  

Global Variable xml

Declared in illuminator.c, these give the current number of triangles on this node and corner coordinates and color information for each triangle.

GladeXML* xml


Global Variable Surf

ISurface Surf

Global Variable Disp

IDisplay Disp[1]

Global Variable entrynum

int entrynum

Global Variable total_entries

int total_entries

Global Variable current_timestep

int current_timestep

Global Variable the_basename

char* the_basename

Global Variable basedirname

char* basedirname

Global Variable stepnames

char** stepnames

Global Variable current_time

double current_time

Global Variable log_text

char* log_text

Global Variable ternary_dp_color

PetscScalar ternary_dp_color[4]

Global Variable dp_supp_colors

int dp_supp_colors

Global Variable dp_supp_color_points

int* dp_supp_color_points

Global Variable dp_supp_red

PetscScalar* dp_supp_red

Global Variable dp_supp_green

PetscScalar* dp_supp_green

Global Variable dp_supp_blue

PetscScalar* dp_supp_blue

Global Variable dp_supp_alpha

PetscScalar* dp_supp_alpha

Global Variable dp_supp_AB

PetscScalar* dp_supp_AB

Global Variable width

int width

Global Variable height

int height

Global Variable bpp

int bpp

Global Variable scale_size

int scale_size

Global Variable nx

int nx

Global Variable ny

int ny

Global Variable transform

int transform

Global Variable dataview_count

int dataview_count

Global Variable dataviews

GtkWidget* dataviews[1]

Global Variable scalar_disp

IDisplay scalar_disp

Global Variable ternary_square_disp

IDisplay ternary_square_disp

Global Variable ternary_triangle_disp

IDisplay ternary_triangle_disp

Global Variable ternary_disp

IDisplay ternary_disp

Global Variable vector_disp

IDisplay vector_disp

Global Variable shear_disp

IDisplay shear_disp

Global Variable scalar_auto_set

gboolean scalar_auto_set

Global Variable ternary_auto_set

gboolean ternary_auto_set

Global Variable vector_auto_set

gboolean vector_auto_set

Global Variable shear_auto_set

gboolean shear_auto_set

Global Variable sizemag

gdouble sizemag

Global Variable transp

PetscTruth transp

Global Variable lastern

terntype lastern

Global Variable thistern

terntype thistern

Global Variable theda

DA theda

Global Variable global

Vec global

Global Variable minmax

PetscScalar minmax[6]

Global Variable scales

PetscScalar scales[15]

Global Variable fieldtypes

field_plot_type* fieldtypes

Global Variable dimensions

int dimensions

Global Variable num_fields

int num_fields

Global Variable current_field

int current_field

Global Variable field_index

int* field_index

Global Variable num_variables

int num_variables[1]

Global Variable variable_indices

int** variable_indices

Local Variables

help
static char help[]

basefilename
Little variable for my_*_filter() and refresh_stepnames().

static char* basefilename


Global Function change_ternary()

void change_ternary ( GtkWidget* widget, gpointer user_data )

Global Function change_variable()

void change_variable ( GtkWidget* widget, gpointer user_data )

Global Function display_timestep()

void display_timestep ( int usermetacount, char** usermetanames, char** usermetadata )

Global Function main()

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.


Global Function my_notime_filter()

This function returns non-zero for "qualifying" file names which start with the stored files' basename and end with .cpu0000.meta. It is used as the select() function for scandir() in main().

int my_notime_filter ( const struct dirent* direntry )

int my_notime_filter
Returns non-zero for qualifying filenames.
const struct dirent* direntry
Directory entry with filename to test.

Global Function my_time_filter()

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 my_time_filter ( const struct dirent* direntry )

int my_time_filter
Returns non-zero for qualifying filenames.
const struct dirent* direntry
Directory entry with filename to test.

Global Function on_about_activate()

void on_about_activate ( GtkWidget* none, gpointer user_data )

Global Function on_log_reload_button_clicked()

This reloads the .log file.

void on_log_reload_button_clicked ( GtkWidget* none, gpointer user_data )

GtkWidget* none
Empty GtkWidget (unusable because it's a menu item).
gpointer user_data
Empty pointer.

Global Function on_mag_spin_value_changed()

void on_mag_spin_value_changed ( GtkWidget* mag_spin, gpointer user_data )

Global Function on_path_filename_entry_activate()

void on_path_filename_entry_activate ( GtkWidget* theentry, gpointer user )

Global Function on_plot_area_expose_event()

void on_plot_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )

Global Function on_refresh_activate()

void on_refresh_activate ( GtkWidget* none, gpointer user_data )

Global Function on_run_log_activate()

void on_run_log_activate ( GtkWidget* none, gpointer user_data )

Global Function on_save_activate()

This function saves both the current field image and also the scale image.

void on_save_activate ( GtkWidget* widget, gpointer user_data )

GtkWidget* widget
Standard GTK+ callback argument, ignored here.
gpointer user_data
Standard GTK+ callback argument, ignored here.

Global Function on_save_all_activate()

void on_save_all_activate ( GtkWidget* none, gpointer user_data )

Global Function on_scalar_auto_checkbutton_toggled()

void on_scalar_auto_checkbutton_toggled ( GtkWidget* thebutton, gpointer user_data )

Global Function on_scalar_max_entry_changed()

void on_scalar_max_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_scalar_min_entry_changed()

void on_scalar_min_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_scalar_scale_area_expose_event()

void on_scalar_scale_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )

Global Function on_scale_size_entry_activate()

void on_scale_size_entry_activate ( GtkWidget* theentry, gpointer user )

Global Function on_shear_auto_checkbutton_toggled()

void on_shear_auto_checkbutton_toggled ( GtkWidget* thebutton, gpointer user_data )

Global Function on_shear_max_entry_changed()

void on_shear_max_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_shear_scale_area_expose_event()

void on_shear_scale_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )

Global Function on_ternary_1A_entry_changed()

void on_ternary_1A_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_1B_entry_changed()

void on_ternary_1B_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_2A_entry_changed()

void on_ternary_2A_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_2B_entry_changed()

void on_ternary_2B_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_3A_entry_changed()

void on_ternary_3A_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_3B_entry_changed()

void on_ternary_3B_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_auto_checkbutton_toggled()

void on_ternary_auto_checkbutton_toggled ( GtkWidget* thebutton, gpointer user_data )

Global Function on_ternary_dp_alpha_entry_changed()

void on_ternary_dp_alpha_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_dp_blue_entry_changed()

void on_ternary_dp_blue_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_dp_green_entry_changed()

void on_ternary_dp_green_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_dp_red_entry_changed()

void on_ternary_dp_red_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_ternary_scale_area_expose_event()

void on_ternary_scale_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )

Global Function on_timestep_spin_value_changed()

void on_timestep_spin_value_changed ( GtkWidget* timestep_spin, gpointer user_data )

Global Function on_transform_activate()

void on_transform_activate ( GtkWidget* widget, gpointer user_data )

Global Function on_vector_auto_checkbutton_toggled()

void on_vector_auto_checkbutton_toggled ( GtkWidget* thebutton, gpointer user_data )

Global Function on_vector_max_entry_changed()

void on_vector_max_entry_changed ( GtkWidget* theentry, gpointer user_data )

Global Function on_vector_scale_area_expose_event()

void on_vector_scale_area_expose_event ( GtkWidget* widget, GdkEventExpose* event, gpointer user_data )

Global Function on_vector_symm_spinbutton_changed()

void on_vector_symm_spinbutton_changed ( GtkWidget* theentry, gpointer user_data )

Global Function refresh_stepnames()

This loads the names of the files into a long list.

int refresh_stepnames ( void )


Global Function render_dataviews()

int render_dataviews ( void )

Global Function square_to_triangle()

void square_to_triangle ( void )

Global Function triangle_to_square()

void triangle_to_square ( void )