/[escript]/trunk/escript/py_src/util.py
ViewVC logotype

Diff of /trunk/escript/py_src/util.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1042 by gross, Mon Mar 19 03:50:34 2007 UTC revision 1044 by gross, Mon Mar 19 07:29:31 2007 UTC
# Line 37  def getTagNames(domain): Line 37  def getTagNames(domain):
37    
38            
39      @param domain: a domain object      @param domain: a domain object
40      @type domain: C{escript.Domain}      @type domain: L{escript.Domain}
41      @return: a list of the tag name used by the domain.      @return: a list of the tag name used by the domain.
42      @rtype: C{list} of C{str}      @rtype: C{list} of C{str}
43      """      """
44      return [n.strip() for n in domain.showTagNames().split(",") ]      return [n.strip() for n in domain.showTagNames().split(",") ]
45    
46    def insertTagNames(domain,**kwargs):
47        """
48        inserts tag names into the domain
49    
50        @param domain: a domain object
51        @type domain: C{escript.Domain}
52        @keyword <tag name>: tag key assigned to <tag name>
53        @type <tag name>: C{int}
54        """
55        for  k in kwargs:
56             domain.setTagMap(k,kwargs[k])
57    
58    def insertTaggedValues(target,**kwargs):
59        """
60        inserts tagged values into the tagged using tag names
61    
62        @param target: data to be filled by tagged values
63        @type target: L{escript.Data}
64        @keyword <tag name>: value to be used for <tag name>
65        @type <tag name>: C{float} or {numarray.NumArray}
66        @return: C{target}
67        @rtype: L{escript.Data}
68        """
69        for k in kwargs:
70            target.setTaggedValue(k,kwargs[k])
71        return target
72    
73            
74  def saveVTK(filename,domain=None,**data):  def saveVTK(filename,domain=None,**data):
75      """      """

Legend:
Removed from v.1042  
changed lines
  Added in v.1044

  ViewVC Help
Powered by ViewVC 1.1.26