Changeset 3946


Ignore:
Timestamp:
Nov 8, 2006, 5:54:03 PM (16 years ago)
Author:
ole
Message:

Quick fix to get parallel anuga to work with changes from changeset:3945

Location:
anuga_core/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py

    r3928 r3946  
    88"""
    99
     10from Numeric import allclose
    1011from anuga.config import epsilon
    1112
     
    164165                self.tri_full_flag[id] = 0
    165166
     167        # Test the assumption that all full triangles are store before
     168        # the ghost triangles.
     169        assert allclose(self.tri_full_flag[:self.number_of_full_nodes],1)
     170                       
    166171
    167172        #Defaults
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r3930 r3946  
    298298
    299299            if domain.smooth is True:
    300                 fid.createDimension('number_of_points', len(domain.vertexlist))
    301                 #fid.createDimension('number_of_points', self.number_of_nodes)
     300                #fid.createDimension('number_of_points', len(domain.vertexlist))
     301                fid.createDimension('number_of_points', self.domain.number_of_full_nodes)
    302302
    303303                # FIXME(Ole): This will cause sww files for paralle domains to
     
    374374
    375375
     376
    376377        x[:] = X.astype(self.precision)
     378       
    377379        y[:] = Y.astype(self.precision)
    378         z[:] = Z.astype(self.precision)
     380
     381        # FIXME (HACK)
     382        truncation = self.domain.number_of_full_nodes       
     383        print len(z), len(Z), truncation
     384       
     385        z[:] = Z[:truncation].astype(self.precision)
    379386
    380387        #FIXME: Backwards compatibility
    381388        z = fid.variables['z']
    382         z[:] = Z.astype(self.precision)
     389        z[:] = Z[:truncation].astype(self.precision)
    383390        ################################
    384391
     
    491498                A,V = Q.get_vertex_values(xy = False,
    492499                                          precision = self.precision)
     500
     501                # HACK
     502                truncation = self.domain.number_of_full_nodes
     503                A = A[:truncation]
    493504
    494505                #FIXME: Make this general (see below)
  • anuga_core/source/anuga_parallel/build_submesh.py

    r3818 r3946  
    129129def ghost_layer(submesh, mesh, p, tupper, tlower):
    130130
    131     ncoord = len(mesh.coordinates)
    132     ntriangles = len(mesh.triangles)
     131    ncoord = mesh.number_of_nodes
     132    ntriangles = mesh.number_of_triangles
    133133
    134134    # Find the first layer of boundary triangles
     
    191191
    192192    nodelist = reshape(arrayrange(ncoord),(ncoord,1))
    193     tsubnodes = concatenate((nodelist, mesh.coordinates), 1)
     193    tsubnodes = concatenate((nodelist, mesh.get_nodes()), 1)
    194194    subnodes = take(tsubnodes, nonzero(nodemap))
    195195
  • anuga_core/source/anuga_parallel/pmesh_divide.py

    r3591 r3946  
    111111    n_tri = len(domain.triangles)
    112112    if n_procs != 1: #Because metis chokes on it...
    113         n_vert = len(domain.coordinates)
     113        n_vert = domain.number_of_nodes
    114114        t_list = domain.triangles.copy()
    115115        t_list = reshape(t_list, (-1,))
     
    182182    # Extract the node list
    183183   
    184     nodes = domain.coordinates.copy()
     184    nodes = domain.get_nodes().copy()
    185185   
    186186    # Convert the triangle datastructure to be an array type,
Note: See TracChangeset for help on using the changeset viewer.