/[escript]/trunk/downunder/py_src/inversioncostfunctions.py
ViewVC logotype

Diff of /trunk/downunder/py_src/inversioncostfunctions.py

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

revision 4748 by gross, Sat Mar 8 00:56:37 2014 UTC revision 4749 by sshaw, Fri Mar 14 03:05:07 2014 UTC
# Line 14  Line 14 
14  #  #
15  ##############################################################################  ##############################################################################
16    
17    from __future__ import print_function
18    
19  """Cost functions for inversions with one or more forward models"""  """Cost functions for inversions with one or more forward models"""
20    
21  __copyright__="""Copyright (c) 2003-2014 by University of Queensland  __copyright__="""Copyright (c) 2003-2014 by University of Queensland
# Line 495  class InversionCostFunction(MeteredCostF Line 497  class InversionCostFunction(MeteredCostF
497                      idx_m=self.mappings[j][1] # run through all level sets k prop j is depending on:                      idx_m=self.mappings[j][1] # run through all level sets k prop j is depending on:
498                      if p_diffs[idx_f[j]].getRank() == 0 :                      if p_diffs[idx_f[j]].getRank() == 0 :
499                          if idx_m: # this case is not needed (really?)                          if idx_m: # this case is not needed (really?)
500                              print "something wrong A"                              print("something wrong A")
501                              tmp=Ys[s]*p_diffs[idx_f[j]] * mu # tmp[k] = dJ_f/d_prop[j] * d prop[j]/d m[idx_m[k]]                              tmp=Ys[s]*p_diffs[idx_f[j]] * mu # tmp[k] = dJ_f/d_prop[j] * d prop[j]/d m[idx_m[k]]
502                              for k in range(len(idx_m)):                              for k in range(len(idx_m)):
503                                  Y[idx_m[k]]+=tmp[k] # dJ_f /d m[idx_m[k]] = tmp[k]                                  Y[idx_m[k]]+=tmp[k] # dJ_f /d m[idx_m[k]] = tmp[k]

Legend:
Removed from v.4748  
changed lines
  Added in v.4749

  ViewVC Help
Powered by ViewVC 1.1.26