Ignore:
Timestamp:
Jul 3, 2007, 1:30:49 PM (17 years ago)
Author:
ole
Message:

Thoughts towards allowing 'polygon' to be specified in set_quantity.
This is far from done.

File:
1 edited

Legend:

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

    r4569 r4579  
    179179                   alpha = None,
    180180                   location = 'vertices',
     181                   polygon = None,
    181182                   indices = None,
    182183                   verbose = False,
     
    262263                  will be left undefined.
    263264
     265
     266        polygon: Restrict update of quantity to locations that fall
     267                 inside polygon. Polygon works by selecting indices
     268                 and calling set_values recursively.
     269
     270        indices: Restrict update of quantity to locations that are
     271                 identified by indices (e.g. node ids if location
     272                 is 'vertices')       
     273       
    264274        verbose: True means that output to stdout is generated
    265275
     
    278288        from types import FloatType, IntType, LongType, ListType, NoneType
    279289        from Numeric import ArrayType
     290
     291
     292        # Polygon situation
     293        #if polygon is not None:
     294        #    if indices is not None:
     295        #        msg = 'Only one of polygon and indices can be specified'
     296        #        raise Exception, msg
     297        #
     298        #    Need to get candidate points. I think we should
     299        #    simplify this whole thing a bit. Do we really need location?
     300        #    point_indices = inside_polygon(points, polygon)
     301
     302
    280303
    281304        #General input checks
     
    388411        """
    389412
     413        # FIXME (Ole): Somehow indices refer to centroids
     414        # rather than vertices as default. See unit test
     415        # test_set_vertex_values_using_general_interface_with_subset(self):
     416       
    390417
    391418        if location == 'centroids':
Note: See TracChangeset for help on using the changeset viewer.