Changeset 1745


Ignore:
Timestamp:
Aug 23, 2005, 3:31:11 PM (19 years ago)
Author:
ole
Message:

Truncation of Numeric arguments to caching

Location:
inundation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/caching/caching.py

    r130 r1745  
    22402240      argstr = argstr + "'"+str(args)+"'"
    22412241    else:
     2242      #FIXME Have a truncation for large Numeric arrays before using str()
     2243      import Numeric
     2244      if type(args) == Numeric.ArrayType:
     2245        if len(args.flat) > textwidth:
     2246          args = 'Array: %s' %args.shape
     2247
    22422248      argstr = argstr + str(args)
    22432249  else:
  • inundation/validation/LWRU2/lwru2.py

    r1744 r1745  
    1111
    1212
    13 read_mesh = False
     13read_mesh = True  #Use large unstructured mesh generated from create_mesh.py
     14#read_mesh = False  #Use small structured mesh
    1415
    1516import sys
     
    9394if read_mesh is True:
    9495    print 'Creating domain from', filenames.mesh_filename
    95     domain = pmesh_to_domain_instance(filenames.mesh_filename, Domain)   
     96    #domain = pmesh_to_domain_instance(filenames.mesh_filename, Domain)
     97
     98    domain = cache(pmesh_to_domain_instance,
     99                   (filenames.mesh_filename, Domain),
     100                   dependencies = [filenames.mesh_filename])
     101
     102
     103   
    96104else:   
    97105    print 'Creating regular mesh'
Note: See TracChangeset for help on using the changeset viewer.