/[escript]/trunk/doc/SConscript
ViewVC logotype

Diff of /trunk/doc/SConscript

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

revision 2949 by gross, Thu Feb 25 05:23:11 2010 UTC revision 2950 by gross, Thu Feb 25 07:33:16 2010 UTC
# Line 15  Line 15 
15  import os  import os
16  Import('*')  Import('*')
17    
 #_deps is for files which end in .py and are required for  
 # testing but should not be invoked directly themselves  
 example_deps = ['cookbook/cblib.py',  
   'cookbook/heatrefraction_mesher001.py',  
   'cookbook/heatrefraction_mesher002.py',  
   'cookbook/heatrefraction001.py',  
   'cookbook/heatrefraction002.py',  
 ]  
   
 #  
 # these are the release examples in example sub directory:  
 #  
 example_files_allow_mpi = [  
  'geotutorial/steadystate_variablek.py',  
  'geotutorial/steadystate.py',  
  'geotutorial/forward_euler.py',  
  'geotutorial/myfirstscript.py',  
  'geotutorial/backward_euler.py',  
  'usersguide/lit_driven_cavity.py',  
  'usersguide/mount.py',  
  'usersguide/heatedblock.py',  
  'usersguide/helmholtz.py',  
  'usersguide/fluid.py',  
  'usersguide/poisson.py',  
  'usersguide/diffusion.py',  
  'usersguide/poisson_vtk.py',  
  'usersguide/slip.py',  
  'usersguide/int_save.py',  
 ]  
   
 example_files_no_mpi = [  
 ]  
18    
19  haveGMSH=(os.system("gmsh -version")/256==0)    #Do we have gmsh installed?  haveGMSH=(os.system("gmsh -version")/256==0)    #Do we have gmsh installed?
20  haveMPL=False                   #Do we have matplotlib?  haveMPL=False                   #Do we have matplotlib?
# Line 72  else: Line 40  else:
40  if not haveGMSH:  if not haveGMSH:
41     print "gmsh not found"     print "gmsh not found"
42    
43  example_files_allow_mpi.append('cookbook/example01a.py')  example_files_allow_mpi = [ ]
44  example_files_allow_mpi.append('cookbook/twodheatdiffvtk.py')  example_files_no_mpi = [ ]
45  example_files_no_mpi.append('cookbook/wavesolver2d001.py')  example_deps = [ ]
46  example_files_no_mpi.append('cookbook/wavesolver2d002.py')  
47    def sortOutExample(name, needsGMSH=False, needsMPL=False, needsMagicMPL=False, needsGD=False, allowsMPI=True):
48         if needsMagicMPL: needsMPL=True
49  if haveMPL:       if needsGD: needsMPL=True
50     example_files_no_mpi.append('cookbook/example01b.py')       if needsGMSH: allowsMPI=False
51     example_files_no_mpi.append('cookbook/example01c.py')  
52     example_files_no_mpi.append('cookbook/example02.py')       if (not needsGMSH or haveGMSH) and (not needsMPL or haveMPL) and (not needsMagicMPL or mplversion>=mplmagicversion) and (not needsGD or haveGD):
53     if mplversion>=mplmagicversion:            if allowsMPI:
54      example_files_no_mpi.append('cookbook/twodheatdiff001.py')                example_files_allow_mpi.append(name)
55      example_files_no_mpi.append('usersguide/poisson_matplotlib.py')            else:
56      example_files_allow_mpi.append('usersguide/wave.py')                example_files_no_mpi.append(name)
57      if haveGMSH:       else:
58          example_files_no_mpi.append('cookbook/run_heatrefraction.py')            example_deps.append(name)
59  if haveGMSH:  #
60    example_files_no_mpi.append('usersguide/trapezoid.py')  # these are the release examples in example sub directory:
61    example_files_no_mpi.append('usersguide/quad.py')  #
62    example_files_no_mpi.append('usersguide/brick.py')  #_deps is for files which end in .py and are required for
63    example_files_no_mpi.append('usersguide/refine.py')  # testing but should not be invoked directly themselves
64    example_files_no_mpi.append('cookbook/simple_mesher001.py')  
65    example_files_no_mpi.append('cookbook/simple_solver001.py')  sortOutExample( 'usersguide/lit_driven_cavity.py')
66    example_files_no_mpi.append('cookbook/twodheatdiff001.py')  sortOutExample( 'usersguide/mount.py')
67    sortOutExample( 'usersguide/heatedblock.py')
68    sortOutExample( 'usersguide/helmholtz.py')
69    sortOutExample( 'usersguide/fluid.py')
70    sortOutExample( 'usersguide/poisson.py')
71    sortOutExample( 'usersguide/diffusion.py')
72    sortOutExample( 'usersguide/poisson_vtk.py')
73    sortOutExample( 'usersguide/slip.py')
74    sortOutExample( 'usersguide/int_save.py')
75    sortOutExample( 'usersguide/wave.py', needsMPL=True)
76    sortOutExample( 'usersguide/trapezoid.py', needsGMSH=True)
77    sortOutExample( 'usersguide/quad.py', needsGMSH=True)
78    sortOutExample( 'usersguide/brick.py', needsGMSH=True)
79    sortOutExample( 'usersguide/refine.py', needsGMSH=True)
80    sortOutExample( 'usersguide/poisson_matplotlib.py',  needsGD=True, allowsMPI=False)
81    
82    sortOutExample( 'geotutorial/steadystate_variablek.py')
83    sortOutExample( 'geotutorial/steadystate.py')
84    sortOutExample( 'geotutorial/forward_euler.py')
85    sortOutExample( 'geotutorial/myfirstscript.py')
86    sortOutExample( 'geotutorial/backward_euler.py')
87    
88    example_deps.append('cookbook/cblib.py')
89    sortOutExample('cookbook/example01a.py')
90    sortOutExample('cookbook/example01b.py', needsMPL=True)
91    sortOutExample('cookbook/example01c.py', needsMPL=True, allowsMPI=False)
92    sortOutExample('cookbook/example02.py', needsMPL=True, allowsMPI=False)
93    sortOutExample('cookbook/example03a.py', needsGD=True, allowsMPI=False)
94    sortOutExample('cookbook/example03b.py')
95    
96    print example_deps
97    print example_files_allow_mpi
98    print example_files_no_mpi
99    
100    # sortOutExample('cookbook/wavesolver2d001.py', allowsMPI=True)
101    # sortOutExample('cookbook/wavesolver2d002.py', allowsMPI=True)
102    
103    
104    #   if mplversion>=mplmagicversion:
105    #sortOutExample('cookbook/run_heatrefraction.py',  needsMagicMPL=True)
106    #  example_files_no_mpi.append('usersguide/trapezoid.py')
107    #  example_files_no_mpi.append('usersguide/quad.py')
108    #  example_files_no_mpi.append('usersguide/brick.py')
109    #  example_files_no_mpi.append('usersguide/refine.py')
110    #  example_files_no_mpi.append('cookbook/simple_mesher001.py')
111    #  example_files_no_mpi.append('cookbook/simple_solver001.py')
112    #  example_files_no_mpi.append('cookbook/twodheatdiff001.py')
113    
114  # we want to make sure these are still added to the examples bundle even if we can't run them  # we want to make sure these are still added to the examples bundle even if we can't run them
115  if not haveGMSH:  #if not haveGMSH:
116     example_deps.append('cookbook/run_heatrefraction.py')  #   example_deps.append('cookbook/simple_mesher001.py')
117     example_deps.append('usersguide/trapezoid.py')  #   example_deps.append('cookbook/simple_solver001.py')
118     example_deps.append('usersguide/quad.py')  #   example_deps.append('cookbook/twodheatdiff001.py')
119     example_deps.append('usersguide/brick.py')  #if not haveGD:
120     example_deps.append('usersguide/refine.py')  #   example_deps.append('cookbook/twodheatdiff001.py')
121     example_deps.append('cookbook/simple_mesher001.py')  #if not haveMPL:
122     example_deps.append('cookbook/simple_solver001.py')  #   example_deps.append('cookbook/example01b.py')
123     example_deps.append('cookbook/twodheatdiff001.py')  #   example_deps.append('cookbook/example01c.py')
124  if not haveGD:  #   example_deps.append('cookbook/example02.py')
    example_deps.append('cookbook/twodheatdiff001.py')  
    example_deps.append('usersguide/poisson_matplotlib.py')  
    example_deps.append('usersguide/wave.py')  
 if not haveMPL:  
    example_deps.append('cookbook/example01b.py')  
    example_deps.append('cookbook/example01c.py')  
    example_deps.append('cookbook/example02.py')  
125    
126    
127  example_files= example_files_allow_mpi + example_files_no_mpi + example_deps  example_files= example_files_allow_mpi + example_files_no_mpi + example_deps

Legend:
Removed from v.2949  
changed lines
  Added in v.2950

  ViewVC Help
Powered by ViewVC 1.1.26