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

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

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

revision 4012 by caltinay, Wed Oct 3 02:25:10 2012 UTC revision 4034 by caltinay, Thu Oct 25 02:54:01 2012 UTC
# Line 113  class GravityModel(ForwardModel): Line 113  class GravityModel(ForwardModel):
113          return phi, -grad(phi)          return phi, -grad(phi)
114    
115      def getPotential(self, rho):      def getPotential(self, rho):
116          self.__pde.setValue(Y=(-4*PI*self.__G) * rho, X=Data(), X_reduced=Data())          self.__pde.resetRightHandSideCoefficients()
117            self.__pde.setValue(Y=-4.*PI*self.__G*rho)
118          phi=self.__pde.getSolution()          phi=self.__pde.getSolution()
119          return phi          return phi
120    
# Line 128  class GravityModel(ForwardModel): Line 129  class GravityModel(ForwardModel):
129          for s in xrange(len(self.__chi)):          for s in xrange(len(self.__chi)):
130              Z = self.__chi[s] * (-gravity_force+self.__g[s]) + Z              Z = self.__chi[s] * (-gravity_force+self.__g[s]) + Z
131    
132          self.__pde.setValue(Y=Data(), X=Z)          self.__pde.resetRightHandSideCoefficients()
133            self.__pde.setValue(X=Z)
134          ZT=self.__pde.getSolution()          ZT=self.__pde.getSolution()
135          return ZT*(-4*PI*self.__G)          return ZT*(-4*PI*self.__G)
136    

Legend:
Removed from v.4012  
changed lines
  Added in v.4034

  ViewVC Help
Powered by ViewVC 1.1.26