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

SCM Repository

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

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

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

revision 4410, Fri Aug 12 18:28:32 2016 UTC revision 4411, Fri Aug 12 18:28:57 2016 UTC
# Line 113  Line 113 
113  # outSize-samples  # outSize-samples
114  # orig- name of synthetic field created with coefficients  # orig- name of synthetic field created with coefficients
115  def createSingleField(itype,outSize,orig,  coeff):  def createSingleField(itype,outSize,orig,  coeff):
116      print "inside create singlefield: "+orig+" ty: "+itype.name,"coeff:",coeff      # print "inside create singlefield: "+orig+" ty: "+itype.name,"coeff:",coeff
117      outputnrrd=orig+".nrrd"      outputnrrd=orig+".nrrd"
118      sout=str(outSize)      sout=str(outSize)
119      def get_Params():      def get_Params():
# Line 227  Line 227 
227      p_Orig=  e_Orig+".diderot"      p_Orig=  e_Orig+".diderot"
228      #compile program      #compile program
229      os.system("cp symb/"+ p_Orig +" "+ p_Orig)      os.system("cp symb/"+ p_Orig +" "+ p_Orig)
230      print "create field C",(branch+p_Orig)      #print "create field C",(branch+p_Orig)
231      os.system(branch+p_Orig)      os.system(branch+p_Orig)
232      #execute program      #execute program
233      #print "create field D"      #print "create field D"
# Line 251  Line 251 
251      #itypes = apply.get_types(app)      #itypes = apply.get_types(app)
252      #exps =  apply.get_exps(app)      #exps =  apply.get_exps(app)
253      flds = apply.get_all_Fields(appC)      flds = apply.get_all_Fields(appC)
254      print "all the fields that need to be created", flds      #print "all the fields that need to be created", flds
255      itypes = []      itypes = []
256      exps = []      exps = []
257      # print "fields-length", len(flds)      # print "fields-length", len(flds)
# Line 260  Line 260 
260          itypes.append(i.fldty)          itypes.append(i.fldty)
261          print "j:",j,"itypes",itypes[j].name          print "j:",j,"itypes",itypes[j].name
262      exps = flds      exps = flds
263      print "exps", exps      #print "exps", exps
264      print "coeffs", coeffs      #print "coeffs", coeffs
265      print "itypes", itypes      #print "itypes", itypes
266      for (i,c,s)in zip(exps, coeffs,itypes):      for (i,c,s)in zip(exps, coeffs,itypes):
267          # print field.toStr(i)          # print field.toStr(i)
268          print "zipping"  
         print "i", i.name  
269          if(field.get_isField(i)): # not a tensor type          if(field.get_isField(i)): # not a tensor type
             print "creating field", i.inputfile  
270              createSingleField(s,outSize,i.inputfile, c)              createSingleField(s,outSize,i.inputfile, c)
     print "returning from create field"  

Legend:
Removed from v.4410  
changed lines
  Added in v.4411

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