Ignore:
Timestamp:
Oct 24, 2006, 12:59:08 PM (18 years ago)
Author:
ole
Message:

Refactored references to domain.filename away.
Use

domain.set_name()
domain.get_name()

instead.

Location:
anuga_work/development
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/LWRU1/lwru1.py

    r3514 r3846  
    5858import sys, os
    5959base = os.path.basename(sys.argv[0])
    60 domain.filename, _ = os.path.splitext(base)
    61 
     60
     61basename, _ = os.path.splitext(base)
     62domain.set_name(basename)
    6263
    6364#Set initial values
  • anuga_work/development/cairns_2006/run_cairns.py

    r3514 r3846  
    108108
    109109base = os.path.basename(sys.argv[0])
    110 domain.filename, _ = os.path.splitext(base)
     110basename, _ = os.path.splitext(base)
     111domain.set_name(basename)
    111112domain.default_order = 2
    112113domain.store = True    #Store for visualisation purposes
  • anuga_work/development/pyvolution-1d/data_manager.py

    r3535 r3846  
    413413            #remember the old filename, then give domain a
    414414            #name with the extension
    415             old_domain_filename = self.domain.filename
     415            old_domain_filename = self.domain.get_name()
    416416            if not self.recursion:
    417                 self.domain.filename = self.domain.filename+filename_ext
     417                self.domain.set_name(old_domain_filename+filename_ext)
    418418
    419419            #change the domain starttime to the current time
     
    440440            #restore the old starttime and filename
    441441            self.domain.starttime = old_domain_starttime
    442             self.domain.filename = old_domain_filename
     442            self.domain.set_name(old_domain_filename)
    443443        else:
    444444            self.recursion = False
     
    33883388    file_path, filename = path.split(filename)
    33893389    filename, ext = path.splitext(filename)
    3390     domain.filename = filename
     3390    domain.set_name(filename)
    33913391    domain.reduction = mean
    33923392    if verbose == True:print "file_path",file_path
     
    33963396    if verbose == True:
    33973397        print "Output written to " + domain.get_datadir() + sep + \
    3398               domain.filename + "." + domain.format
     3398              domain.get_name() + "." + domain.format
    33993399    sww = get_dataobject(domain)
    34003400    sww.store_connectivity()
  • anuga_work/development/pyvolution-1d/test_shallow_water_1d.py

    r3295 r3846  
    632632                assert not allclose(stage, initial_stage)
    633633
    634         os.remove(domain.filename + '.sww')
     634        os.remove(domain.get_name() + '.sww')
    635635
    636636    #####################################################
  • anuga_work/development/stochastic_study/run_model.py

    r3514 r3846  
    148148
    149149                print 'P%d: Extracting time series for realisation %d from file %s'\
    150                       %(myid, realisation, project.working_dir + domain.filename + '.sww')
    151                 f = file_function(project.working_dir + domain.filename + '.sww',
     150                      %(myid, realisation, project.working_dir +\
     151                        domain.get_name() + '.sww')
     152                f = file_function(project.working_dir +\
     153                                  domain.get_name() + '.sww',
    152154                                  quantities='stage',
    153155                                  interpolation_points=project.gauges,
  • anuga_work/development/stochastic_study/run_simple_model.py

    r3514 r3846  
    150150
    151151        print 'P%d: Extracting time series for realisation %d from file %s'\
    152               %(myid, realisation, project.working_dir + domain.filename + '.sww')
    153         f = file_function(project.working_dir + domain.filename + '.sww',
     152              %(myid, realisation, project.working_dir +\
     153                domain.get_name() + '.sww')
     154        f = file_function(project.working_dir +\
     155                          domain.get_name() + '.sww',
    154156                          quantities='stage',
    155157                          interpolation_points=project.gauges,
Note: See TracChangeset for help on using the changeset viewer.