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

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

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

revision 6668 by jfenwick, Wed Feb 7 02:12:08 2018 UTC revision 6669 by uqagarro, Sun Apr 29 23:40:55 2018 UTC
# Line 163  class PDECoef(object): Line 163  class PDECoef(object):
163         self.__complex = isComplex         self.__complex = isComplex
164         self.resetValue()         self.resetValue()
165    
166      def isComplex(sef):      def isComplex(self):
167          """          """
168          Returns true if the coefficient is complex          Returns true if the coefficient is complex
169          """          """
# Line 1738  class LinearPDE(LinearProblem): Line 1738  class LinearPDE(LinearProblem):
1738         y_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),         y_dirac=PDECoef(PDECoef.DIRACDELTA,(PDECoef.BY_EQUATION,),PDECoef.RIGHTHANDSIDE, isComplex),
1739         r=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.RIGHTHANDSIDE, isComplex),         r=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.RIGHTHANDSIDE, isComplex),
1740         q=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.BOTH, False) )         q=PDECoef(PDECoef.SOLUTION,(PDECoef.BY_SOLUTION,),PDECoef.BOTH, False) )
1741        
1742     def __str__(self):     def __str__(self):
1743       """       """
1744       Returns the string representation of the PDE.       Returns the string representation of the PDE.
# Line 2131  class LinearPDE(LinearProblem): Line 2131  class LinearPDE(LinearProblem):
2131                 representation of the equation                 representation of the equation
2132        :raise IllegalCoefficient: if an unknown coefficient keyword is used        :raise IllegalCoefficient: if an unknown coefficient keyword is used
2133        """        """
2134    
2135        super(LinearPDE,self).setValue(**coefficients)        super(LinearPDE,self).setValue(**coefficients)
2136        # check if the systrem is inhomogeneous:        # check if the systrem is inhomogeneous:
2137        if len(coefficients)>0 and not self.isUsingLumping():        if len(coefficients)>0 and not self.isUsingLumping():
2138           q=self.getCoefficient("q")           q=self.getCoefficient("q")
2139             #if not isinstance(q, list):
2140                #raise KeyError("q paramter '%s' shouldn't be a symbol."%q)
2141           r=self.getCoefficient("r")           r=self.getCoefficient("r")
2142           if not q.isEmpty() and not r.isEmpty():           if not q.isEmpty() and not r.isEmpty():
2143               if util.Lsup(q*r)>0.:               if util.Lsup(q*r)>0.:

Legend:
Removed from v.6668  
changed lines
  Added in v.6669

  ViewVC Help
Powered by ViewVC 1.1.26