/[escript]/trunk/doc/examples/pyvisi/seriesofreads.py
ViewVC logotype

Diff of /trunk/doc/examples/pyvisi/seriesofreads.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1083 by jongui, Wed Apr 11 06:13:46 2007 UTC revision 1084 by jongui, Thu Apr 12 05:19:22 2007 UTC
# Line 20  JPG_RENDERER = Renderer.ONLINE_JPG Line 20  JPG_RENDERER = Renderer.ONLINE_JPG
20  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
21          y_size = Y_SIZE)          y_size = Y_SIZE)
22    
23  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file. An initial file must always
24    # be assigned when the DataCollector is created, although the same file is
25    # read again in the for-loop.  
26  dc1 = DataCollector(source = Source.XML)  dc1 = DataCollector(source = Source.XML)
27  dc1.setFileName(file_name = PYVISI_EXAMPLE_MESHES_PATH + FIRST_FILE_NAME)  dc1.setFileName(file_name = PYVISI_EXAMPLE_MESHES_PATH + FIRST_FILE_NAME)
28  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_1)  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_1)
# Line 31  mosc1 = Contour(scene = s, data_collecto Line 33  mosc1 = Contour(scene = s, data_collecto
33          outline = True)          outline = True)
34  mosc1.generateContours(0)  mosc1.generateContours(0)
35    
36  # Create a second DataCollector reading from the same XML file.  # Create a second DataCollector reading from the same XML file. An initial
37    # file must always be assigned when the DataCollector is created,
38    # although the same file is read again in the for-loop.  
39  dc2 = DataCollector(source = Source.XML)  dc2 = DataCollector(source = Source.XML)
40  dc2.setFileName(file_name = PYVISI_EXAMPLE_MESHES_PATH + FIRST_FILE_NAME)  dc2.setFileName(file_name = PYVISI_EXAMPLE_MESHES_PATH + FIRST_FILE_NAME)
41  dc2.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_2)  dc2.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_2)
# Line 42  mosc2 = Contour(scene = s, data_collecto Line 46  mosc2 = Contour(scene = s, data_collecto
46          outline = True)          outline = True)
47  mosc2.generateContours(0)  mosc2.generateContours(0)
48    
49  # Render the object.  # Read in one file one after another and render the object.
50  for i in range(99, 104):  for i in range(99, 104):
51      dc1.setFileName(file_name =  PYVISI_EXAMPLE_MESHES_PATH + FILE_2D +      dc1.setFileName(file_name =  PYVISI_EXAMPLE_MESHES_PATH + FILE_2D +
52              "%04d.vtu" % i)              "%04d.vtu" % i)

Legend:
Removed from v.1083  
changed lines
  Added in v.1084

  ViewVC Help
Powered by ViewVC 1.1.26