Changeset 9514


Ignore:
Timestamp:
Jan 27, 2015, 10:29:26 PM (10 years ago)
Author:
steve
Message:

Adding in setup.py files for each anuga sub module

Location:
trunk/anuga_core/source/anuga
Files:
11 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r9256 r9514  
     1
    12"""Class Quantity - Implements values at each triangular element
    23
     
    844845        msg = ('Exactly one of the arguments numeric, quantity, function, '
    845846               'geospatial_data, or filename must be present.')
    846         assert L.count(None) == len(L)-1, msg
     847
     848        count = 0
     849        for entry in L:
     850            if entry is None:
     851                count = count + 1
     852               
     853        assert count == len(L)-1, msg
    847854
    848855        if location == 'edges':
  • trunk/anuga_core/source/anuga/load_mesh/loadASCII.py

    r9323 r9514  
    663663        #print 'mesh vertex attributes', mesh['vertex_attributes'].shape
    664664       
    665         if (mesh['vertex_attributes'] != None and
     665        if (mesh['vertex_attributes'] is not None and
    666666            (mesh['vertex_attributes'].shape[0] > 0 and
    667667             mesh['vertex_attributes'].shape[1] > 0)):
     
    707707        outfile.variables['triangles'][:] = mesh['triangles']
    708708        outfile.variables['triangle_neighbors'][:] = mesh['triangle_neighbors']
    709         if (mesh['triangle_tags'] != None and
     709        if (mesh['triangle_tags'] is not None and
    710710            (mesh['triangle_tags'].shape[1] > 0)):
    711711            outfile.createDimension('num_of_triangle_tag_chars',
  • trunk/anuga_core/source/anuga/parallel/test/test_all.py

    r9424 r9514  
    2323#List files that should be excluded from the testing process.
    2424#E.g. if they are known to fail and under development
    25 exclude_files = ['test_failure.py', 'test_parallel_boyd_pipe_operator.py', 'test_parallel_boyd_box_op_apron.py']
     25exclude_files = ['test_parallel_boyd_pipe_operator.py', 'test_parallel_boyd_box_op_apron.py']
    2626
    2727# Directories that should not be searched for test files.
  • trunk/anuga_core/source/anuga/parallel/test/test_parallel_boyd_box_operator.py

    r9503 r9514  
    243243
    244244        if verbose: print 'P%d control_data = %s' %(myid, control_data)
    245     else:
     245    else:  # parallel
    246246        stage = domain.get_quantity('stage')
    247247       
     
    265265                if verbose:
    266266                    print 'P%d average stage, control = %s, actual = %s' %(myid, control_data[samples], average_stage)
    267 
    268267                    print 'P%d average xmom, control = %s, actual = %s' %(myid, control_data[samples+1], average_xmom)
    269 
    270268                    print 'P%d average ymom, control = %s, actual = %s' %(myid, control_data[samples+2], average_ymom)
    271 
    272269                    print 'P%d average volume, control = %s, actual = %s' %(myid, control_data[samples+3], average_volume)
    273 
    274270                    print 'P%d average depth, control = %s, actual = %s' %(myid, control_data[samples+4], average_depth)
    275 
    276271
    277272        assert(success)
     
    286281class Test_parallel_boyd_box_operator(unittest.TestCase):
    287282    def test_parallel_operator(self):
    288         #print "Expect this test to fail if not run from the parallel directory."
     283        #print "Expect this test to fail if not run from the parallel/test directory."
    289284        result = os.system("mpirun -np %d python test_parallel_boyd_box_operator.py" % nprocs)
    290285        assert_(result == 0)
  • trunk/anuga_core/source/anuga/utilities/sww_merge.py

    r9375 r9514  
    430430            q = fid.variables[quantity]
    431431            out_s_c_quantities[quantity][ftri_l2g] = \
    432                          num.array(q,dtype=num.float32)[ftri_ids]
     432                         num.array(q).astype(num.float32)[ftri_ids]
    433433
    434434       
     
    439439            for i in range(n_steps):
    440440                out_d_c_quantities[quantity][i][ftri_l2g] = \
    441                            num.array(q[i],dtype=num.float32)[ftri_ids]
     441                           num.array(q[i]).astype(num.float32)[ftri_ids]
    442442
    443443
     
    677677            q = fid.variables[quantity]
    678678            out_s_quantities[quantity][g_vids] = \
    679                          num.array(q,dtype=num.float32)[l_vids]
     679                         num.array(q).astype(num.float32)[l_vids]
     680                         #num.array(q,dtype=num.float32)[l_vids]
    680681
    681682
     
    684685            q = fid.variables[quantity]
    685686            out_s_c_quantities[quantity][f_gids] = \
    686                          num.array(q,dtype=num.float32)[f_ids]
     687                         num.array(q).astype(num.float32)[f_ids]
     688                         #num.array(q,dtype=num.float32)[f_ids]
    687689
    688690       
Note: See TracChangeset for help on using the changeset viewer.