Show
Ignore:
Timestamp:
03/02/06 22:48:58 (4 years ago)
Author:
powell
Message:

Fixes for new PETSc 2.3.0, illuminator 0.10.0.

Location:
trunk/matml/src/castabox
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/src/castabox/castabox.c

    r191 r230  
    2121 
    2222#include <stdlib.h> /* For atoi() */ 
     23#include <string.h> 
    2324/* This also #includes petscda.h, petscvec.h and several other dependencies. */ 
    2425#include <illuminator.h> 
     
    272273  int ts=0, plots=6, keepon=1, ierr; 
    273274  char outstring [101]; 
     275  ISurface Surf; 
     276  IDisplay Disp; 
     277 
     278  DPRINTF ("Starting the Geomview display using Illuminator.\n",0); 
     279  ierr = SurfCreate (&Surf); CHKERRQ (ierr); 
     280  ierr = GeomviewBegin (PETSC_COMM_WORLD, &Disp); CHKERRQ (ierr); 
    274281 
    275282  DPRINTF ("Calculating maximum stable explicit timestep size.\n",0); 
     
    351358                  { 0., p.width_x, 0., p.width_y, 0., p.width_z }; 
    352359 
    353                 ierr = DATriangulate (box_da, global, TEMPERATURE, minmax, 
     360                ierr = DATriangulate (Surf, box_da,global, TEMPERATURE, minmax, 
    354361                                      plots=newplots, plot_temps, plot_colors, 
    355                                       PETSC_NULL, PETSC_NULL, PETSC_NULL); 
     362                                      PETSC_FALSE, PETSC_FALSE, PETSC_FALSE); 
    356363                CHKERRQ (ierr); 
    357364                /* Work-around for illuminator non-periodic bug */ 
     
    360367                minmax[5] = p.width_z * (p.grid_z-1) / p.grid_z; 
    361368                ierr = GeomviewDisplayTriangulation 
    362                   (PETSC_COMM_WORLD, minmax, "Temperature", PETSC_FALSE); CHKERRQ(ierr); 
     369                  (PETSC_COMM_WORLD, Surf, Disp, minmax, "Temperature", 
     370                   PETSC_FALSE); CHKERRQ(ierr); 
    363371              } 
    364372            else 
     
    424432                      { 0., p.width_x, 0., p.width_y, 0., p.width_z }; 
    425433 
    426                     ierr = DATriangulate (box_da, global, TEMPERATURE, minmax, 
    427                                           plots, plot_temps, plot_colors, 
    428                                           PETSC_NULL, PETSC_NULL, PETSC_NULL); 
     434                    ierr = DATriangulate (Surf, box_da, global, TEMPERATURE, 
     435                                          minmax, plots,plot_temps,plot_colors, 
     436                                          PETSC_FALSE,PETSC_FALSE,PETSC_FALSE); 
    429437                    CHKERRQ (ierr); 
    430438                    /* Work-around for illuminator non-periodic bug */ 
     
    433441                    minmax[5] = p.width_z * (p.grid_z-1) / p.grid_z; 
    434442                    ierr = GeomviewDisplayTriangulation 
    435                       (PETSC_COMM_WORLD, minmax, "Temperature", PETSC_FALSE); CHKERRQ(ierr); 
     443                      (PETSC_COMM_WORLD, Surf, Disp, minmax, "Temperature", 
     444                       PETSC_FALSE); CHKERRQ (ierr); 
     445                    ierr = SurfClear (Surf); CHKERRQ (ierr); 
    436446                  } 
    437447              } 
     
    451461    } 
    452462 
     463  ierr = GeomviewEnd (PETSC_COMM_WORLD, Disp); CHKERRQ (ierr); 
    453464  return 0; 
    454465} 
     
    593604  } 
    594605 
    595   DPRINTF ("Starting the Geomview display using Illuminator.\n",0); 
    596   ierr = GeomviewBegin (PETSC_COMM_WORLD); CHKERRQ (ierr); 
    597  
    598606  DPRINTF ("Starting the timestep loop...\n",0); 
    599607  ierr = timestep_loop (box_da, p); 
    600608 
    601609  DPRINTF ("Shutting down.\n",0); 
    602   ierr = GeomviewEnd (PETSC_COMM_WORLD); CHKERRQ (ierr); 
    603610  ierr = DADestroy (box_da); CHKERRQ (ierr); 
    604611  ierr = PetscFinalize (); CHKERRQ (ierr); 
  • trunk/matml/src/castabox/makefile

    r189 r230  
    99 
    1010castabox: castabox.c 
    11         $(CC) $^ -o $@ $(PETSC_DM_LIB) -lluminate $(PETSC_INCLUDE) \ 
    12           -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include #-DDEBUG 
     11        $(CC) $^ -o $@ $(PETSC_DM_LIB_BASIC) -lluminate $(PETSC_INCLUDE) \ 
     12          `pkg-config --cflags gtk+-2.0` #-DDEBUG 
    1313 
    1414clean: