Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/test_eval.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/test_eval.py

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

revision 4329, Sun Jul 31 20:51:22 2016 UTC revision 4334, Mon Aug 1 13:07:21 2016 UTC
# Line 175  Line 175 
175      def iter (es):      def iter (es):
176          sum = 0          sum = 0
177          for i in es:          for i in es:
178              sum+=i*i              t=i*i
179                #print "t",t
180                sum+=t
181          #print "\nsum",sum          #print "\nsum",sum
182          rtn  = sqrt(sum)          rtn  = sqrt(sum)
183          #print "\nrtn",rtn          #print "\nrtn",rtn
184          return rtn          return rtn
185      if(field.is_Scalar(fld)):      if(field.is_Scalar(fld)):
186          [] = fty.get_shape(ityp)          [] = fty.get_shape(ityp)
187          return abs(exp)          #print "scalar exp:",exp
188            t =abs(sqrt(exp*exp))
189            #print "t",t
190            return t
191      elif(field.is_Vector(fld)):      elif(field.is_Vector(fld)):
192          [n] = fty.get_shape(ityp)          [n] = fty.get_shape(ityp)
193          rtn = []          rtn = []

Legend:
Removed from v.4329  
changed lines
  Added in v.4334

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0