Changeset 4536


Ignore:
Timestamp:
Jun 6, 2007, 5:46:34 PM (17 years ago)
Author:
ole
Message:

Fixed ticket:165 thanks to Duncan's excellent reduction of the problem which
had to do with ghost nodes.

Location:
anuga_core/source/anuga/abstract_2d_finite_volumes
Files:
3 edited

Legend:

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

    r4478 r4536  
    476476
    477477        # Count number of triangles per node
    478         number_of_triangles_per_node = zeros(self.number_of_nodes)
    479         for volume_id, triangle in enumerate(self.triangles):
     478        number_of_triangles_per_node = zeros(self.number_of_full_nodes)
     479        for volume_id, triangle in enumerate(self.get_triangles()):
    480480            for vertex_id in triangle:
    481481                number_of_triangles_per_node[vertex_id] += 1
     
    486486
    487487        # Register (triangle, vertex) indices for each node
    488         vertexlist = [None]*self.number_of_nodes
    489         for volume_id in range(self.number_of_triangles):
     488        vertexlist = [None]*self.number_of_full_nodes
     489        for volume_id in range(self.number_of_full_triangles):
    490490
    491491            a = self.triangles[volume_id, 0]
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r4478 r4536  
    11041104                total = 0.0
    11051105                for index in self.domain.vertex_value_indices:
     1106                    if current_node == N:
     1107                        msg = 'Current node exceeding number of nodes (%d) ' %(N)
     1108                        raise msg
     1109                   
     1110
     1111                   
    11061112                    k += 1
    11071113                   
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity_ext.c

    r4471 r4536  
    231231
    232232  for (i=0; i<N; i++) {
     233 
     234    //if (current_node == N) {
     235    //  printf("Current node exceeding number of nodes (%d)", N);   
     236    //  return 1;
     237    // }
     238   
    233239    index = vertex_value_indices[i];
    234240    k += 1;
     
    366372                                     (double*) A -> data);
    367373
     374        //printf("Error %d", err);
    368375        if (err != 0) {
    369376          PyErr_SetString(PyExc_RuntimeError,
Note: See TracChangeset for help on using the changeset viewer.