- Timestamp:
- Apr 24, 2009, 5:22:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/abstract_2d_finite_volumes/domain.py
r6553 r6902 92 92 """ 93 93 94 number_of_full_nodes=None 95 number_of_full_triangles=None 96 94 97 # Determine whether source is a mesh filename or coordinates 95 98 if type(source) == types.StringType: … … 117 120 118 121 # Expose Mesh attributes (FIXME: Maybe turn into methods) 122 self.triangles = self.mesh.triangles 119 123 self.centroid_coordinates = self.mesh.centroid_coordinates 120 124 self.vertex_coordinates = self.mesh.vertex_coordinates … … 205 209 # the ghost triangles. 206 210 if not num.allclose(self.tri_full_flag[:self.number_of_full_nodes], 1): 207 print ('WARNING: ' 208 'Not all full triangles are store before ghost triangles') 211 if self.numproc>1: 212 print ('WARNING: ' 213 'Not all full triangles are store before ghost triangles') 209 214 210 215 # Defaults … … 306 311 def get_normal(self, *args, **kwargs): 307 312 return self.mesh.get_normal(*args, **kwargs) 313 def get_triangle_containing_point(self, *args, **kwargs): 314 return self.mesh.get_triangle_containing_point(*args, **kwargs) 308 315 309 316 def get_intersecting_segments(self, *args, **kwargs): … … 1745 1752 1746 1753 ## 1747 # @brief ??1754 # @brief Sequential update of ghost cells 1748 1755 def update_ghosts(self): 1749 pass 1750 1756 # We must send the information from the full cells and 1757 # receive the information for the ghost cells 1758 # We have a list with ghosts expecting updates 1759 1760 from Numeric import take,put 1761 1762 1763 #Update of ghost cells 1764 iproc = self.processor 1765 if self.full_send_dict.has_key(iproc): 1766 1767 # now store full as local id, global id, value 1768 Idf = self.full_send_dict[iproc][0] 1769 1770 # now store ghost as local id, global id, value 1771 Idg = self.ghost_recv_dict[iproc][0] 1772 1773 for i, q in enumerate(self.conserved_quantities): 1774 Q_cv = self.quantities[q].centroid_values 1775 put(Q_cv, Idg, take(Q_cv, Idf)) 1776 1777 1751 1778 ## 1752 1779 # @brief Extrapolate conserved quantities from centroid to vertices
Note: See TracChangeset
for help on using the changeset viewer.