/[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 3989 by jfenwick, Fri Sep 21 02:47:54 2012 UTC revision 3990 by caltinay, Tue Sep 25 05:03:20 2012 UTC
# Line 58  class DarcyFlow(object): Line 58  class DarcyFlow(object):
58     SMOOTH="SMOOTH"     SMOOTH="SMOOTH"
59     def __init__(self, domain, useReduced=False, solver="POST", verbose=False, w=1.):     def __init__(self, domain, useReduced=False, solver="POST", verbose=False, w=1.):
60        """        """
61        initializes the Darcy flux problem        initializes the Darcy flux problem.
62    
63        :param domain: domain of the problem        :param domain: domain of the problem
64        :type domain: `Domain`        :type domain: `Domain`
65        :param useReduced: uses reduced oreder on flux and pressure        :param useReduced: uses reduced oreder on flux and pressure
66        :type useReduced: ``bool``        :type useReduced: ``bool``
67        :param solver: solver method        :param solver: solver method
68        :type solver: in [`DarcyFlow.EVAL`, `DarcyFlow.POST',  `DarcyFlow.SMOOTH' ]        :type solver: in [`DarcyFlow.EVAL`, `DarcyFlow.POST`, `DarcyFlow.SMOOTH` ]
69        :param verbose: if ``True`` some information on the iteration progress are printed.        :param verbose: if ``True`` some information on the iteration progress are printed.
70        :type verbose: ``bool``        :type verbose: ``bool``
71        :param w: weighting factor for `DarcyFlow.POST` solver        :param w: weighting factor for `DarcyFlow.POST` solver
# Line 288  class DarcyFlow(object): Line 289  class DarcyFlow(object):
289          p_hydrostatic=p_ref+util.inner(self.__permeability_invXg_ref, self.__pde_p.getFunctionSpaceForCoefficient("q").getX() - self.ref_point)          p_hydrostatic=p_ref+util.inner(self.__permeability_invXg_ref, self.__pde_p.getFunctionSpaceForCoefficient("q").getX() - self.ref_point)
290          return self._getFlux(p-p_hydrostatic, u0)          return self._getFlux(p-p_hydrostatic, u0)
291    
292     def _getFlux(self,pp, u0=None):     def _getFlux(self, pp, u0=None):
293          """          """
294          returns the flux for a given pressure ``p`` where the flux is equal to ``u0``          returns the flux for a given pressure ``pp`` where the flux is equal to
295          on locations where ``location_of_fixed_flux`` is positive (see `setValue`).          ``u0`` on locations where ``location_of_fixed_flux`` is positive (see
296          Notice that ``g`` is used, see `setValue`.          `setValue`). Notice that ``g`` is used, see `setValue`.
297    
298          :param p: pressure.          :param pp: pressure.
299          :type p: scalar value on the domain (e.g. `escript.Data`).          :type pp: scalar value on the domain (i.e. `escript.Data`).
300          :param u0: flux on the locations of the domain marked be ``location_of_fixed_flux``.          :param u0: flux on the locations of the domain marked in ``location_of_fixed_flux``.
301          :type u0: vector values on the domain (e.g. `escript.Data`) or ``None``          :type u0: vector values on the domain (i.e. `escript.Data`) or ``None``
302          :return: flux          :return: flux
303          :rtype: `escript.Data`          :rtype: `escript.Data`
304          """          """
# Line 552  class StokesProblemCartesian(Homogeneous Line 553  class StokesProblemCartesian(Homogeneous
553       def solve_prec(self,Bv, tol):       def solve_prec(self,Bv, tol):
554           """           """
555           applies preconditioner for for *BA^{-1}B^** to *Bv*           applies preconditioner for for *BA^{-1}B^** to *Bv*
556           with accuracy `self.getSubProblemTolerance()`           with accuracy ``self.getSubProblemTolerance()``
557    
558           :param Bv: velocity increment           :param Bv: velocity increment
559           :return: *p=P(Bv)* where *P^{-1}* is an approximation of *BA^{-1}B^ * )*           :return: *p=P(Bv)* where *P^{-1}* is an approximation of *BA^{-1}B^ * )*

Legend:
Removed from v.3989  
changed lines
  Added in v.3990

  ViewVC Help
Powered by ViewVC 1.1.26