/[escript]/branches/symbolic_from_3470/escript/py_src/symbolic/utils.py
ViewVC logotype

Diff of /branches/symbolic_from_3470/escript/py_src/symbolic/utils.py

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

revision 3863 by caltinay, Tue Mar 6 07:28:22 2012 UTC revision 3864 by caltinay, Mon Mar 12 05:18:16 2012 UTC
# Line 166  def getTotalDifferential(f, x, order=0): Line 166  def getTotalDifferential(f, x, order=0):
166                      a[i]=y.subs(z,0) # terms in x and constants                      a[i]=y.subs(z,0) # terms in x and constants
167                      if order>0:                      if order>0:
168                          b[i+j]=y.subs(z,1)-a[i]                          b[i+j]=y.subs(z,1)-a[i]
169          res+=(Symbol(a),)          res+=(Symbol(a, dim=f.getDim(), subs=f.getDataSubstitutions()),)
170          if order>0:          if order>0:
171              res+=(Symbol(b),)              res+=(Symbol(b, dim=f.getDim(), subs=f.getDataSubstitutions()),)
172    
173      elif x.getRank()==1:      elif x.getRank()==1:
174          f=removeFsFromGrad(f)          f=removeFsFromGrad(f)
# Line 197  def getTotalDifferential(f, x, order=0): Line 197  def getTotalDifferential(f, x, order=0):
197                          if order>0:                          if order>0:
198                              b[i+(k,l)]=y.subs(z,1)-a[i+(k,)]                              b[i+(k,l)]=y.subs(z,1)-a[i+(k,)]
199    
200          res+=(Symbol(a),)          res+=(Symbol(a, dim=f.getDim(), subs=f.getDataSubstitutions()),)
201          if order>0:          if order>0:
202             res+=(Symbol(b),)              res+=(Symbol(b, dim=f.getDim(), subs=f.getDataSubstitutions()),)
203    
204      if len(res)==1:      if len(res)==1:
205          return res[0]          return res[0]

Legend:
Removed from v.3863  
changed lines
  Added in v.3864

  ViewVC Help
Powered by ViewVC 1.1.26