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

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

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

revision 2288 by gross, Tue Feb 24 06:11:48 2009 UTC revision 2349 by gross, Mon Mar 30 08:14:23 2009 UTC
# Line 16  http://www.uq.edu.au/esscc Line 16  http://www.uq.edu.au/esscc
16  Primary Business: Queensland, Australia"""  Primary Business: Queensland, Australia"""
17  __license__="""Licensed under the Open Software License version 3.0  __license__="""Licensed under the Open Software License version 3.0
18  http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
19  __url__="http://www.uq.edu.au/esscc/escript-finley"  __url__="https://launchpad.net/escript-finley"
20    
21  """  """
22  Some models for flow  Some models for flow
# Line 327  class DarcyFlow(object): Line 327  class DarcyFlow(object):
327            if self.show_details: print "DarcyFlux: Applying operator"            if self.show_details: print "DarcyFlux: Applying operator"
328            Qdp=self.__Q(dp)            Qdp=self.__Q(dp)
329            self.__pde_v.setValue(Y=-Qdp,X=Data(), r=Data())            self.__pde_v.setValue(Y=-Qdp,X=Data(), r=Data())
330            du=self.__pde_v.getSolution(verbose=self.show_details)            du=self.__pde_v.getSolution(verbose=self.show_details, iter_max = 100000)
331            return Qdp+du            return Qdp+du
332      def __inner_GMRES(self,r,s):      def __inner_GMRES(self,r,s):
333           return util.integrate(util.inner(r,s))           return util.integrate(util.inner(r,s))
# Line 339  class DarcyFlow(object): Line 339  class DarcyFlow(object):
339            self.__pde_p.setTolerance(self.getSubProblemTolerance())            self.__pde_p.setTolerance(self.getSubProblemTolerance())
340            if self.show_details: print "DarcyFlux: Applying preconditioner"            if self.show_details: print "DarcyFlux: Applying preconditioner"
341            self.__pde_p.setValue(X=util.transposed_tensor_mult(self.__permeability,r), Y=Data(), r=Data())            self.__pde_p.setValue(X=util.transposed_tensor_mult(self.__permeability,r), Y=Data(), r=Data())
342            return self.__pde_p.getSolution(verbose=self.show_details)            return self.__pde_p.getSolution(verbose=self.show_details, iter_max = 100000)
343    
344      def getFlux(self,p=None, fixed_flux=Data(), show_details=False):      def getFlux(self,p=None, fixed_flux=Data(), show_details=False):
345          """          """
# Line 366  class DarcyFlow(object): Line 366  class DarcyFlow(object):
366             self.__pde_v.setValue(Y=g)             self.__pde_v.setValue(Y=g)
367          else:          else:
368             self.__pde_v.setValue(Y=g-self.__Q(p))             self.__pde_v.setValue(Y=g-self.__Q(p))
369          return self.__pde_v.getSolution(verbose=show_details)          return self.__pde_v.getSolution(verbose=show_details, iter_max=100000)
370    
371  class StokesProblemCartesian(HomogeneousSaddlePointProblem):  class StokesProblemCartesian(HomogeneousSaddlePointProblem):
372       """       """

Legend:
Removed from v.2288  
changed lines
  Added in v.2349

  ViewVC Help
Powered by ViewVC 1.1.26