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 4188, Mon Jul 11 23:21:11 2016 UTC revision 4210, Thu Jul 14 18:01:19 2016 UTC
# Line 176  Line 176 
176          sum = 0          sum = 0
177          for i in es:          for i in es:
178              sum+=i*i              sum+=i*i
179          print "\nsum",sum          #print "\nsum",sum
180          rtn  = (sum)**0.5          rtn  = (sum)**0.5
181          print "\nrtn",rtn          #print "\nrtn",rtn
182          return rtn          return rtn
183      if(field.is_Scalar(fld)):      if(field.is_Scalar(fld)):
184          [] = fty.get_shape(ityp)          [] = fty.get_shape(ityp)
# Line 804  Line 804 
804  def eval_mat_d2(pos0, pos1, mat):  def eval_mat_d2(pos0, pos1, mat):
805      #print "eval_vec_d2 vec:",vec      #print "eval_vec_d2 vec:",vec
806      rtn = []      rtn = []
807      print "eval_mat_d2 mat",mat      #print "eval_mat_d2 mat",mat
808      for i in mat:      for i in mat:
809          for v in i:          for v in i:
810              rtn.append(eval_d2(pos0, pos1, v))              rtn.append(eval_d2(pos0, pos1, v))
# Line 932  Line 932 
932      # print "inside eval exp:", field.toStr(app.exp[0])      # print "inside eval exp:", field.toStr(app.exp[0])
933      #apply.toStr(app)      #apply.toStr(app)
934      (otyp1, ortn) = sort(app) #apply operations to expressions      (otyp1, ortn) = sort(app) #apply operations to expressions
935      print "ortn",ortn      #print "ortn",ortn
936      rtn = probeField(otyp1, pos, ortn) #evaluate expression at positions      rtn = probeField(otyp1, pos, ortn) #evaluate expression at positions
937      print "rtn", rtn      #print "rtn", rtn
938      return rtn      return rtn

Legend:
Removed from v.4188  
changed lines
  Added in v.4210

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