/[escript]/trunk/escript/py_src/flows.py
ViewVC logotype

Diff of /trunk/escript/py_src/flows.py

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

revision 1552 by gross, Thu May 8 08:52:41 2008 UTC revision 1554 by artak, Fri May 9 02:50:49 2008 UTC
# Line 82  class StokesProblemCartesian(Homogeneous Line 82  class StokesProblemCartesian(Homogeneous
82          for j in range(self.domain.getDim()):          for j in range(self.domain.getDim()):
83              A[i,j,j,i] += 1.              A[i,j,j,i] += 1.
84              A[i,j,i,j] += 1.              A[i,j,i,j] += 1.
85      self.__pde_prec.setValue(D=1/eta) #1./self.eta      self.__pde_prec.setValue(D=1/self.eta)
86          self.__pde_u.setValue(A=A*self.eta,q=fixed_u_mask,Y=f,y=surface_stress)          self.__pde_u.setValue(A=A*self.eta,q=fixed_u_mask,Y=f,y=surface_stress)
87    
88        def B(self,arg):        def B(self,arg):
# Line 124  class StokesProblemCartesian(Homogeneous Line 124  class StokesProblemCartesian(Homogeneous
124       #proj=Projector(domain=self.domain, reduce = True, fast=False)       #proj=Projector(domain=self.domain, reduce = True, fast=False)
125           self.__pde_prec.setTolerance(self.getSubProblemTolerance())           self.__pde_prec.setTolerance(self.getSubProblemTolerance())
126           self.__pde_prec.setValue(Y=p)           self.__pde_prec.setValue(Y=p)
127             q=self.__pde_prec.getSolution(verbose=self.show_details)
128             return q
129    
130          def solve_prec1(self,p):
131         #proj=Projector(domain=self.domain, reduce = True, fast=False)
132             self.__pde_prec.setTolerance(self.getSubProblemTolerance())
133             self.__pde_prec.setValue(Y=p)
134           q=self.__pde_prec.getSolution(verbose=self.show_details)           q=self.__pde_prec.getSolution(verbose=self.show_details)
135       q0=util.interpolate(q,Function(self.domain))       q0=util.interpolate(q,Function(self.domain))
136           q-=(1/self.vol)*util.integrate(q0)           q-=(1/self.vol)*util.integrate(q0)

Legend:
Removed from v.1552  
changed lines
  Added in v.1554

  ViewVC Help
Powered by ViewVC 1.1.26