Ignore:
Timestamp:
Jun 6, 2010, 10:48:41 PM (14 years ago)
Author:
steve
Message:

Setting up test function for Quantity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anuga_1d/domain.py

    r6694 r7793  
    112112        self.build_tagged_elements_dictionary(tagged_elements)
    113113       
    114         from quantity import Quantity, Conserved_quantity
    115         #from quantity_domain import Quantity, Conserved_quantity
     114        from quantity import Quantity
     115
    116116       
    117117        #List of quantity names entering
     
    592592            return self.vertices[elem_id,vertex]
    593593
    594     def get_area(self, elem_id):
    595         """Return area of element id
    596         """
    597 
    598         return self.areas[elem_id]
     594    def get_area(self, elem_id=None):
     595        """Return total domain area or area of element id
     596        """
     597
     598        if elem_id is None:
     599            return sum(self.areas)
     600        else:
     601            return self.areas[elem_id]
    599602
    600603    def get_quantity(self, name, location='vertices', indices = None):
Note: See TracChangeset for help on using the changeset viewer.