Changeset 3447 for inundation/pyvolution/domain.py
- Timestamp:
- Aug 2, 2006, 5:14:16 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/domain.py
r3085 r3447 15 15 from pyvolution.generic_boundary_conditions import Transmissive_boundary 16 16 from pyvolution.pmesh2domain import pmesh_to_domain 17 from pyvolution.region import Set_region as region_set_region 17 18 18 19 import types … … 424 425 425 426 426 def set_region(self, functions): 427 def set_region(self, *args, **kwargs): 428 """ 429 This method is used to set quantities based on a regional tag. 430 431 It is most often called with the following parameters; 432 (self, tag, quantity, X, location='vertices') 433 tag: the name of the regional tag used to specify the region 434 quantity: Name of quantity to change 435 X: const or function - how the quantity is changed 436 location: Where values are to be stored. 437 Permissible options are: vertices, centroid and unique vertices 438 439 A callable region class or a list of callable region classes 440 can also be passed into this function. 441 """ 442 #print "*args", args 443 #print "**kwargs", kwargs 444 if len(args) == 1: 445 self._set_region(*args, **kwargs) 446 else: 447 #Assume it is arguments for the region.set_region function 448 func = region_set_region(*args, **kwargs) 449 self._set_region(func) 450 451 452 def _set_region(self, functions): 427 453 # The order of functions in the list is used. 428 454 if type(functions) not in [types.ListType,types.TupleType]: … … 432 458 function(tag, self.tagged_elements[tag], self) 433 459 434 #Do we need to do this sort of thing?435 #self = function(tag, self.tagged_elements[tag], self)436 460 437 461 #MISC
Note: See TracChangeset
for help on using the changeset viewer.