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

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

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

trunk/esys2/escript/py_src/linearPDEs.py revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/escript/py_src/linearPDEs.py revision 969 by ksteube, Tue Feb 13 23:02:23 2007 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
   
 #  
 #      COPYRIGHT ACcESS 2004 -  All Rights Reserved  
 #  
 #   This software is the property of ACcESS.  No part of this code  
 #   may be copied in any form or by any means without the expressed written  
 #   consent of ACcESS.  Copying, use or modification of this software  
 #   by any unauthorised person is illegal unless that  
 #   person has a software license agreement with ACcESS.  
 #  
2  """  """
3  The module provides an interface to define and solve linear partial  The module provides an interface to define and solve linear partial
4  differential equations (PDEs) within L{escript}. L{linearPDEs} does not provide any  differential equations (PDEs) within L{escript}. L{linearPDEs} does not provide any
5  solver capabilities in itself but hands the PDE over to  solver capabilities in itself but hands the PDE over to
6  the PDE solver library defined through the L{Domain<escript.Domain>} of the PDE.  the PDE solver library defined through the L{Domain<escript.Domain>} of the PDE.
7  The general interface is provided through the L{LinearPDE} class. The  The general interface is provided through the L{LinearPDE} class. The
8  L{AdvectivePDE} which is derived from the L{LinearPDE} class  L{AdvectivePDE} which is derived from the L{LinearPDE} class
9  provides an interface to PDE dominated by its advective terms. The L{Poisson},  provides an interface to PDE dominated by its advective terms. The L{Poisson},
10  L{Helmholtz}, L{LameEquation}  L{Helmholtz}, L{LameEquation}, L{AdvectivePDE}
11  classs which are also derived form the L{LinearPDE} class should be used  classs which are also derived form the L{LinearPDE} class should be used
12  to define of solve these sepecial PDEs.  to define of solve these sepecial PDEs.
13    
14  @var __author__: name of author  @var __author__: name of author
15  @var __licence__: licence agreement  @var __copyright__: copyrights
16    @var __license__: licence agreement
17  @var __url__: url entry point on documentation  @var __url__: url entry point on documentation
18  @var __version__: version  @var __version__: version
19  @var __date__: date of the version  @var __date__: date of the version
# Line 33  import util Line 24  import util
24  import numarray  import numarray
25    
26  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
27  __licence__="contact: esys@access.uq.edu.au"  __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
28  __url__="http://www.iservo.edu.au/esys/escript"                      http://www.access.edu.au
29                    Primary Business: Queensland, Australia"""
30    __license__="""Licensed under the Open Software License version 3.0
31                 http://www.opensource.org/licenses/osl-3.0.php"""
32    __url__="http://www.iservo.edu.au/esys"
33  __version__="$Revision$"  __version__="$Revision$"
34  __date__="$Date$"  __date__="$Date$"
35    
# Line 54  class UndefinedPDEError(ValueError): Line 49  class UndefinedPDEError(ValueError):
49     raised if a PDE is not fully defined yet.     raised if a PDE is not fully defined yet.
50     """     """
51    
52  class PDECoefficient:  class PDECoefficient(object):
53      """      """
54      A class for describing a PDE coefficient      A class for describing a PDE coefficient
55    
# Line 86  class PDECoefficient: Line 81  class PDECoefficient:
81      def __init__(self,where,pattern,altering):      def __init__(self,where,pattern,altering):
82         """         """
83         Initialise a PDE Coefficient type         Initialise a PDE Coefficient type
84          
85         @param where: describes where the coefficient lives         @param where: describes where the coefficient lives
86         @type where: one of L{INTERIOR}, L{BOUNDARY}, L{CONTACT}, L{SOLUTION}, L{REDUCED}         @type where: one of L{INTERIOR}, L{BOUNDARY}, L{CONTACT}, L{SOLUTION}, L{REDUCED}
87         @param pattern: describes the shape of the coefficient and how the shape is build for a given         @param pattern: describes the shape of the coefficient and how the shape is build for a given
88                spatial dimension and numbers of equation and solution in then PDE. For instance,                spatial dimension and numbers of equation and solution in then PDE. For instance,
89                (L{BY_EQUATION},L{BY_SOLUTION},L{BY_DIM}) descrbes a rank 3 coefficient which                (L{BY_EQUATION},L{BY_SOLUTION},L{BY_DIM}) descrbes a rank 3 coefficient which
90                is instanciated as shape (3,2,2) in case of a three equations and two solution components                is instanciated as shape (3,2,2) in case of a three equations and two solution components
# Line 101  class PDECoefficient: Line 96  class PDECoefficient:
96         @type altering: one of L{OPERATOR}, L{RIGHTHANDSIDE}, L{BOTH}         @type altering: one of L{OPERATOR}, L{RIGHTHANDSIDE}, L{BOTH}
97    
98         """         """
99           super(PDECoefficient, self).__init__()
100         self.what=where         self.what=where
101         self.pattern=pattern         self.pattern=pattern
102         self.altering=altering         self.altering=altering
# Line 119  class PDECoefficient: Line 115  class PDECoefficient:
115         @param domain: domain on which the PDE uses the coefficient         @param domain: domain on which the PDE uses the coefficient
116         @type domain: L{Domain<escript.Domain>}         @type domain: L{Domain<escript.Domain>}
117         @param reducedEquationOrder: True to indicate that reduced order is used to represent the equation         @param reducedEquationOrder: True to indicate that reduced order is used to represent the equation
118         @type domain: C{bool}         @type reducedEquationOrder: C{bool}
119         @param reducedSolutionOrder: True to indicate that reduced order is used to represent the solution         @param reducedSolutionOrder: True to indicate that reduced order is used to represent the solution
120         @type domain: C{bool}         @type reducedSolutionOrder: C{bool}
121         @return:  L{FunctionSpace<escript.FunctionSpace>} of the coefficient         @return:  L{FunctionSpace<escript.FunctionSpace>} of the coefficient
122         @rtype:  L{FunctionSpace<escript.FunctionSpace>}         @rtype:  L{FunctionSpace<escript.FunctionSpace>}
123         """         """
124         if self.what==self.INTERIOR:         if self.what==self.INTERIOR:
125              return escript.Function(domain)              return escript.Function(domain)
126         elif self.what==self.BOUNDARY:         elif self.what==self.BOUNDARY:
127              return escript.FunctionOnBoundary(domain)              return escript.FunctionOnBoundary(domain)
128         elif self.what==self.CONTACT:         elif self.what==self.CONTACT:
129              return escript.FunctionOnContactZero(domain)              return escript.FunctionOnContactZero(domain)
130         elif self.what==self.SOLUTION:         elif self.what==self.SOLUTION:
131              if reducedEquationOrder and reducedSolutionOrder:              if reducedEquationOrder and reducedSolutionOrder:
132                  return escript.ReducedSolution(domain)                  return escript.ReducedSolution(domain)
133              else:              else:
134                  return escript.Solution(domain)                  return escript.Solution(domain)
135         elif self.what==self.REDUCED:         elif self.what==self.REDUCED:
136              if reducedEquationOrder and reducedSolutionOrder:              return escript.ReducedSolution(domain)
                 return escript.ReducedSolution(domain)  
             else:  
                 return escript.ReducedSolution(domain)  
137    
138      def getValue(self):      def getValue(self):
139         """         """
# Line 162  class PDECoefficient: Line 155  class PDECoefficient:
155         @param numSolutions: number of components of the PDE solution         @param numSolutions: number of components of the PDE solution
156         @type numSolutions: C{int}         @type numSolutions: C{int}
157         @param reducedEquationOrder: True to indicate that reduced order is used to represent the equation         @param reducedEquationOrder: True to indicate that reduced order is used to represent the equation
158         @type domain: C{bool}         @type reducedEquationOrder: C{bool}
159         @param reducedSolutionOrder: True to indicate that reduced order is used to represent the solution         @param reducedSolutionOrder: True to indicate that reduced order is used to represent the solution
160         @type domain: C{bool}         @type reducedSolutionOrder: C{bool}
161         @param newValue: number of components of the PDE solution         @param newValue: number of components of the PDE solution
162         @type newValue: any object that can be converted into a L{Data<escript.Data>} object with the appropriate shape and L{FunctionSpace<escript.FunctionSpace>}         @type newValue: any object that can be converted into a L{Data<escript.Data>} object with the appropriate shape and L{FunctionSpace<escript.FunctionSpace>}
163         @raise IllegalCoefficientValue: if the shape of the assigned value does not match the shape of the coefficient         @raise IllegalCoefficientValue: if the shape of the assigned value does not match the shape of the coefficient
# Line 313  class PDECoefficient: Line 306  class PDECoefficient:
306                  s=s+(dim,)                  s=s+(dim,)
307         return s         return s
308    
309  class LinearPDE:  class LinearPDE(object):
310     """     """
311     This class is used to define a general linear, steady, second order PDE     This class is used to define a general linear, steady, second order PDE
312     for an unknown function M{u} on a given domain defined through a L{Domain<escript.Domain>} object.     for an unknown function M{u} on a given domain defined through a L{Domain<escript.Domain>} object.
313    
314     For a single PDE with a solution with a single component the linear PDE is defined in the following form:     For a single PDE with a solution with a single component the linear PDE is defined in the following form:
315      
316     M{-grad(A[j,l]*grad(u)[l]+B[j]u)[j]+C[l]*grad(u)[l]+D*u =-grad(X)[j,j]+Y}     M{-grad(A[j,l]*grad(u)[l]+B[j]u)[j]+C[l]*grad(u)[l]+D*u =-grad(X)[j,j]+Y}
317    
318     where M{grad(F)} denotes the spatial derivative of M{F}. Einstein's summation convention,     where M{grad(F)} denotes the spatial derivative of M{F}. Einstein's summation convention,
319     ie. summation over indexes appearing twice in a term of a sum is performed, is used.     ie. summation over indexes appearing twice in a term of a sum is performed, is used.
320     The coefficients M{A}, M{B}, M{C}, M{D}, M{X} and M{Y} have to be specified through L{Data<escript.Data>} objects in the     The coefficients M{A}, M{B}, M{C}, M{D}, M{X} and M{Y} have to be specified through L{Data<escript.Data>} objects in the
321     L{Function<escript.Function>} on the PDE or objects that can be converted into such L{Data<escript.Data>} objects.     L{Function<escript.Function>} on the PDE or objects that can be converted into such L{Data<escript.Data>} objects.
322     M{A} is a rank two, M{B}, M{C} and M{X} are rank one and M{D} and M{Y} are scalar.     M{A} is a rank two, M{B}, M{C} and M{X} are rank one and M{D} and M{Y} are scalar.
323    
324     The following natural boundary conditions are considered:     The following natural boundary conditions are considered:
325    
326     M{n[j]*(A[i,j]*grad(u)[l]+B[j]*u)+d*u=n[j]*X[j]+y}     M{n[j]*(A[i,j]*grad(u)[l]+B[j]*u)+d*u=n[j]*X[j]+y}
327    
328     where M{n} is the outer normal field calculated by L{getNormal<escript.FunctionSpace.getNormal>} of L{FunctionOnBoundary<escript.FunctionOnBoundary>}.     where M{n} is the outer normal field calculated by L{getNormal<escript.FunctionSpace.getNormal>} of L{FunctionOnBoundary<escript.FunctionOnBoundary>}.
329     Notice that the coefficients M{A}, M{B} and M{X} are defined in the PDE. The coefficients M{d} and M{y} are       Notice that the coefficients M{A}, M{B} and M{X} are defined in the PDE. The coefficients M{d} and M{y} are
330     each a scalar in the L{FunctionOnBoundary<escript.FunctionOnBoundary>}.       each a scalar in the L{FunctionOnBoundary<escript.FunctionOnBoundary>}.
331    
332    
333     Constraints for the solution prescribing the value of the solution at certain locations in the domain. They have the form     Constraints for the solution prescribing the value of the solution at certain locations in the domain. They have the form
# Line 343  class LinearPDE: Line 336  class LinearPDE:
336    
337     M{r} and M{q} are each scalar where M{q} is the characteristic function defining where the constraint is applied.     M{r} and M{q} are each scalar where M{q} is the characteristic function defining where the constraint is applied.
338     The constraints override any other condition set by the PDE or the boundary condition.     The constraints override any other condition set by the PDE or the boundary condition.
339      
340     The PDE is symmetrical if     The PDE is symmetrical if
341    
342     M{A[i,j]=A[j,i]}  and M{B[j]=C[j]}     M{A[i,j]=A[j,i]}  and M{B[j]=C[j]}
343    
344     For a system of PDEs and a solution with several components the PDE has the form     For a system of PDEs and a solution with several components the PDE has the form
345    
346     M{-grad(A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k])[j]+C[i,k,l]*grad(u[k])[l]+D[i,k]*u[k] =-grad(X[i,j])[j]+Y[i] }     M{-grad(A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k])[j]+C[i,k,l]*grad(u[k])[l]+D[i,k]*u[k] =-grad(X[i,j])[j]+Y[i] }
347    
348     M{A} is a ramk four, M{B} and M{C} are each a rank three, M{D} and M{X} are each a rank two and M{Y} is a rank one.     M{A} is a ramk four, M{B} and M{C} are each a rank three, M{D} and M{X} are each a rank two and M{Y} is a rank one.
349     The natural boundary conditions take the form:     The natural boundary conditions take the form:
350    
351     M{n[j]*(A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k])+d[i,k]*u[k]=n[j]*X[i,j]+y[i]}     M{n[j]*(A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k])+d[i,k]*u[k]=n[j]*X[i,j]+y[i]}
# Line 363  class LinearPDE: Line 356  class LinearPDE:
356    
357     M{u[i]=r[i]}  where  M{q[i]>0}     M{u[i]=r[i]}  where  M{q[i]>0}
358    
359     M{r} and M{q} are each rank one. Notice that at some locations not necessarily all components must have a constraint.     M{r} and M{q} are each rank one. Notice that at some locations not necessarily all components must have a constraint.
360    
361     The system of PDEs is symmetrical if     The system of PDEs is symmetrical if
362    
# Line 372  class LinearPDE: Line 365  class LinearPDE:
365          - M{D[i,k]=D[i,k]}          - M{D[i,k]=D[i,k]}
366          - M{d[i,k]=d[k,i]}          - M{d[i,k]=d[k,i]}
367    
368     L{LinearPDE} also supports solution discontinuities over a contact region in the domain. To specify the conditions across the     L{LinearPDE} also supports solution discontinuities over a contact region in the domain. To specify the conditions across the
369     discontinuity we are using the generalised flux M{J} which is in the case of a systems of PDEs and several components of the solution     discontinuity we are using the generalised flux M{J} which is in the case of a systems of PDEs and several components of the solution
370     defined as     defined as
371    
372     M{J[i,j]=A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k]-X[i,j]}     M{J[i,j]=A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]*u[k]-X[i,j]}
373    
# Line 387  class LinearPDE: Line 380  class LinearPDE:
380     the contact condition takes the form     the contact condition takes the form
381    
382     M{n[j]*J0[i,j]=n[j]*J1[i,j]=y_contact[i]- d_contact[i,k]*jump(u)[k]}     M{n[j]*J0[i,j]=n[j]*J1[i,j]=y_contact[i]- d_contact[i,k]*jump(u)[k]}
383      
384     where M{J0} and M{J1} are the fluxes on side 0 and side 1 of the discontinuity, respectively. M{jump(u)}, which is the difference     where M{J0} and M{J1} are the fluxes on side 0 and side 1 of the discontinuity, respectively. M{jump(u)}, which is the difference
385     of the solution at side 1 and at side 0, denotes the jump of M{u} across discontinuity along the normal calcualted by     of the solution at side 1 and at side 0, denotes the jump of M{u} across discontinuity along the normal calcualted by
386     L{jump<util.jump>}.     L{jump<util.jump>}.
387     The coefficient M{d_contact} is a rank two and M{y_contact} is a rank one both in the L{FunctionOnContactZero<escript.FunctionOnContactZero>} or L{FunctionOnContactOne<escript.FunctionOnContactOne>}.     The coefficient M{d_contact} is a rank two and M{y_contact} is a rank one both in the L{FunctionOnContactZero<escript.FunctionOnContactZero>} or L{FunctionOnContactOne<escript.FunctionOnContactOne>}.
388     In case of a single PDE and a single component solution the contact condition takes the form     In case of a single PDE and a single component solution the contact condition takes the form
# Line 403  class LinearPDE: Line 396  class LinearPDE:
396     @cvar DIRECT: The direct solver based on LDU factorization     @cvar DIRECT: The direct solver based on LDU factorization
397     @cvar CHOLEVSKY: The direct solver based on LDLt factorization (can only be applied for symmetric PDEs)     @cvar CHOLEVSKY: The direct solver based on LDLt factorization (can only be applied for symmetric PDEs)
398     @cvar PCG: The preconditioned conjugate gradient method (can only be applied for symmetric PDEs)     @cvar PCG: The preconditioned conjugate gradient method (can only be applied for symmetric PDEs)
399     @cvar CR: The conjugate residual method     @cvar CR: The conjugate residual method
400     @cvar CGS: The conjugate gardient square method     @cvar CGS: The conjugate gardient square method
401     @cvar BICGSTAB: The stabilized BiConjugate Gradient method.     @cvar BICGSTAB: The stabilized BiConjugate Gradient method.
402     @cvar SSOR: The symmetric overrealaxtion method     @cvar SSOR: The symmetric overrealaxtion method
# Line 419  class LinearPDE: Line 412  class LinearPDE:
412     @cvar PASO: PASO solver package     @cvar PASO: PASO solver package
413     @cvar SCSL: SGI SCSL solver library     @cvar SCSL: SGI SCSL solver library
414     @cvar MKL: Intel's MKL solver library     @cvar MKL: Intel's MKL solver library
415     @cvar UMFPACK: the UMFPACK library     @cvar UMFPACK: the UMFPACK library
416       @cvar TRILINOS: the TRILINOS parallel solver class library from Sandia Natl Labs
417     @cvar ITERATIVE: The default iterative solver     @cvar ITERATIVE: The default iterative solver
418       @cvar AMG: algebraic multi grid
419       @cvar RILU: recursive ILU
420    
421     """     """
422     DEFAULT= 0     DEFAULT= 0
# Line 445  class LinearPDE: Line 441  class LinearPDE:
441     UMFPACK= 16     UMFPACK= 16
442     ITERATIVE= 20     ITERATIVE= 20
443     PASO= 21     PASO= 21
444       AMG= 22
445       RILU = 23
446       TRILINOS = 24
447    
448     __TOL=1.e-13     SMALL_TOLERANCE=1.e-13
449     __PACKAGE_KEY="package"     __PACKAGE_KEY="package"
450     __METHOD_KEY="method"     __METHOD_KEY="method"
451     __SYMMETRY_KEY="symmetric"     __SYMMETRY_KEY="symmetric"
452     __TOLERANCE_KEY="tolerance"     __TOLERANCE_KEY="tolerance"
453       __PRECONDITIONER_KEY="preconditioner"
454    
455    
456     def __init__(self,domain,numEquations=None,numSolutions=None,debug=False):     def __init__(self,domain,numEquations=None,numSolutions=None,debug=False):
# Line 466  class LinearPDE: Line 466  class LinearPDE:
466       @param debug: if True debug informations are printed.       @param debug: if True debug informations are printed.
467    
468       """       """
469         super(LinearPDE, self).__init__()
470       #       #
471       #   the coefficients of the general PDE:       #   the coefficients of the general PDE:
472       #       #
# Line 499  class LinearPDE: Line 500  class LinearPDE:
500       self.__tolerance=1.e-8       self.__tolerance=1.e-8
501       self.__solver_method=self.DEFAULT       self.__solver_method=self.DEFAULT
502       self.__solver_package=self.DEFAULT       self.__solver_package=self.DEFAULT
503         self.__preconditioner=self.DEFAULT
504       self.__matrix_type=self.__domain.getSystemMatrixTypeId(self.DEFAULT,self.DEFAULT,False)       self.__matrix_type=self.__domain.getSystemMatrixTypeId(self.DEFAULT,self.DEFAULT,False)
505       self.__sym=False       self.__sym=False
506    
# Line 602  class LinearPDE: Line 604  class LinearPDE:
604       @rtype: L{bool}       @rtype: L{bool}
605       """       """
606       return self.__reduce_solution_order       return self.__reduce_solution_order
607    
608     def getFunctionSpaceForEquation(self):     def getFunctionSpaceForEquation(self):
609       """       """
610       returns the L{FunctionSpace<escript.FunctionSpace>} used to discretize the equation       returns the L{FunctionSpace<escript.FunctionSpace>} used to discretize the equation
# Line 664  class LinearPDE: Line 666  class LinearPDE:
666       @rtype: L{Data<escript.Data>}       @rtype: L{Data<escript.Data>}
667       """       """
668       if u==None:       if u==None:
669            return self.getOperator()*self.getSolution()          return self.getOperator()*self.getSolution()
670       else:       else:
671          self.getOperator()*escript.Data(u,self.getFunctionSpaceForSolution())          return self.getOperator()*escript.Data(u,self.getFunctionSpaceForSolution())
672    
673     def getResidual(self,u=None):     def getResidual(self,u=None):
674       """       """
# Line 698  class LinearPDE: Line 700  class LinearPDE:
700        else:        else:
701           A=self.getCoefficientOfGeneralPDE("A")           A=self.getCoefficientOfGeneralPDE("A")
702           if not A.isEmpty():           if not A.isEmpty():
703              tol=util.Lsup(A)*self.__TOL              tol=util.Lsup(A)*self.SMALL_TOLERANCE
704              if self.getNumSolutions()>1:              if self.getNumSolutions()>1:
705                 for i in range(self.getNumEquations()):                 for i in range(self.getNumEquations()):
706                    for j in range(self.getDim()):                    for j in range(self.getDim()):
# Line 722  class LinearPDE: Line 724  class LinearPDE:
724              if verbose: print "non-symmetric PDE because C is not present but B is"              if verbose: print "non-symmetric PDE because C is not present but B is"
725              out=False              out=False
726           elif not B.isEmpty() and not C.isEmpty():           elif not B.isEmpty() and not C.isEmpty():
727              tol=(util.Lsup(B)+util.Lsup(C))*self.__TOL/2.              tol=(util.Lsup(B)+util.Lsup(C))*self.SMALL_TOLERANCE/2.
728              if self.getNumSolutions()>1:              if self.getNumSolutions()>1:
729                 for i in range(self.getNumEquations()):                 for i in range(self.getNumEquations()):
730                     for j in range(self.getDim()):                     for j in range(self.getDim()):
# Line 738  class LinearPDE: Line 740  class LinearPDE:
740           if self.getNumSolutions()>1:           if self.getNumSolutions()>1:
741             D=self.getCoefficientOfGeneralPDE("D")             D=self.getCoefficientOfGeneralPDE("D")
742             if not D.isEmpty():             if not D.isEmpty():
743               tol=util.Lsup(D)*self.__TOL               tol=util.Lsup(D)*self.SMALL_TOLERANCE
744               for i in range(self.getNumEquations()):               for i in range(self.getNumEquations()):
745                  for k in range(self.getNumSolutions()):                  for k in range(self.getNumSolutions()):
746                    if util.Lsup(D[i,k]-D[k,i])>tol:                    if util.Lsup(D[i,k]-D[k,i])>tol:
# Line 746  class LinearPDE: Line 748  class LinearPDE:
748                        out=False                        out=False
749             d=self.getCoefficientOfGeneralPDE("d")             d=self.getCoefficientOfGeneralPDE("d")
750             if not d.isEmpty():             if not d.isEmpty():
751               tol=util.Lsup(d)*self.__TOL               tol=util.Lsup(d)*self.SMALL_TOLERANCE
752               for i in range(self.getNumEquations()):               for i in range(self.getNumEquations()):
753                  for k in range(self.getNumSolutions()):                  for k in range(self.getNumSolutions()):
754                    if util.Lsup(d[i,k]-d[k,i])>tol:                    if util.Lsup(d[i,k]-d[k,i])>tol:
# Line 754  class LinearPDE: Line 756  class LinearPDE:
756                        out=False                        out=False
757             d_contact=self.getCoefficientOfGeneralPDE("d_contact")             d_contact=self.getCoefficientOfGeneralPDE("d_contact")
758             if not d_contact.isEmpty():             if not d_contact.isEmpty():
759               tol=util.Lsup(d_contact)*self.__TOL               tol=util.Lsup(d_contact)*self.SMALL_TOLERANCE
760               for i in range(self.getNumEquations()):               for i in range(self.getNumEquations()):
761                  for k in range(self.getNumSolutions()):                  for k in range(self.getNumSolutions()):
762                    if util.Lsup(d_contact[i,k]-d_contact[k,i])>tol:                    if util.Lsup(d_contact[i,k]-d_contact[k,i])>tol:
# Line 773  class LinearPDE: Line 775  class LinearPDE:
775         @type verbose: C{bool}         @type verbose: C{bool}
776         @keyword reordering: reordering scheme to be used during elimination. Allowed values are         @keyword reordering: reordering scheme to be used during elimination. Allowed values are
777                              L{NO_REORDERING}, L{MINIMUM_FILL_IN}, L{NESTED_DISSECTION}                              L{NO_REORDERING}, L{MINIMUM_FILL_IN}, L{NESTED_DISSECTION}
        @keyword preconditioner: preconditioner method to be used. Allowed values are  
                                 L{SSOR}, L{ILU0}, L{ILUT}, L{JACOBI}  
778         @keyword iter_max: maximum number of iteration steps allowed.         @keyword iter_max: maximum number of iteration steps allowed.
779         @keyword drop_tolerance: threshold for drupping in L{ILUT}         @keyword drop_tolerance: threshold for drupping in L{ILUT}
780         @keyword drop_storage: maximum of allowed memory in L{ILUT}         @keyword drop_storage: maximum of allowed memory in L{ILUT}
# Line 787  class LinearPDE: Line 787  class LinearPDE:
787               self.__solution=self.copyConstraint(f*mat)               self.__solution=self.copyConstraint(f*mat)
788            else:            else:
789               options[self.__TOLERANCE_KEY]=self.getTolerance()               options[self.__TOLERANCE_KEY]=self.getTolerance()
790               options[self.__METHOD_KEY]=self.getSolverMethod()               options[self.__METHOD_KEY]=self.getSolverMethod()[0]
791                 options[self.__PRECONDITIONER_KEY]=self.getSolverMethod()[1]
792               options[self.__PACKAGE_KEY]=self.getSolverPackage()               options[self.__PACKAGE_KEY]=self.getSolverPackage()
793               options[self.__SYMMETRY_KEY]=self.isSymmetric()               options[self.__SYMMETRY_KEY]=self.isSymmetric()
794               self.trace("PDE is resolved.")               self.trace("PDE is resolved.")
# Line 802  class LinearPDE: Line 803  class LinearPDE:
803    
804       M{J[i,j]=A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]u[k]-X[i,j]}       M{J[i,j]=A[i,j,k,l]*grad(u[k])[l]+B[i,j,k]u[k]-X[i,j]}
805    
806       or       or
807    
808       M{J[j]=A[i,j]*grad(u)[l]+B[j]u-X[j]}       M{J[j]=A[i,j]*grad(u)[l]+B[j]u-X[j]}
809    
# Line 816  class LinearPDE: Line 817  class LinearPDE:
817     # =============================================================================     # =============================================================================
818     #   solver settings:     #   solver settings:
819     # =============================================================================     # =============================================================================
820     def setSolverMethod(self,solver=None):     def setSolverMethod(self,solver=None,preconditioner=None):
821         """         """
822         sets a new solver         sets a new solver
823    
824         @param solver: sets a new solver method.         @param solver: sets a new solver method.
825         @type solver: one of L{DEFAULT}, L{ITERATIVE} L{DIRECT}, L{CHOLEVSKY}, L{PCG}, L{CR}, L{CGS}, L{BICGSTAB}, L{SSOR}, L{GMRES}, L{PRES20}, L{LUMPING}.         @type solver: one of L{DEFAULT}, L{ITERATIVE} L{DIRECT}, L{CHOLEVSKY}, L{PCG}, L{CR}, L{CGS}, L{BICGSTAB}, L{SSOR}, L{GMRES}, L{PRES20}, L{LUMPING}, L{AMG}
826           @param preconditioner: sets a new solver method.
827           @type preconditioner: one of L{DEFAULT}, L{JACOBI} L{ILU0}, L{ILUT},L{SSOR}, L{RILU}
828         """         """
829         if solver==None: solve=self.DEFAULT         if solver==None: solve=self.DEFAULT
830         if not solver==self.getSolverMethod():         if preconditioner==None: preconditioner=self.DEFAULT
831           if not (solver,preconditioner)==self.getSolverMethod():
832             self.__solver_method=solver             self.__solver_method=solver
833               self.__preconditioner=preconditioner
834             self.__checkMatrixType()             self.__checkMatrixType()
835             self.trace("New solver is %s"%self.getSolverMethodName())             self.trace("New solver is %s"%self.getSolverMethodName())
836    
# Line 839  class LinearPDE: Line 844  class LinearPDE:
844    
845         m=self.getSolverMethod()         m=self.getSolverMethod()
846         p=self.getSolverPackage()         p=self.getSolverPackage()
847         if m==self.DEFAULT: method="DEFAULT"         method=""
848         elif m==self.DIRECT: method= "DIRECT"         if m[0]==self.DEFAULT: method="DEFAULT"
849         elif m==self.ITERATIVE: method= "ITERATIVE"         elif m[0]==self.DIRECT: method= "DIRECT"
850         elif m==self.CHOLEVSKY: method= "CHOLEVSKY"         elif m[0]==self.ITERATIVE: method= "ITERATIVE"
851         elif m==self.PCG: method= "PCG"         elif m[0]==self.CHOLEVSKY: method= "CHOLEVSKY"
852         elif m==self.CR: method= "CR"         elif m[0]==self.PCG: method= "PCG"
853         elif m==self.CGS: method= "CGS"         elif m[0]==self.CR: method= "CR"
854         elif m==self.BICGSTAB: method= "BICGSTAB"         elif m[0]==self.CGS: method= "CGS"
855         elif m==self.SSOR: method= "SSOR"         elif m[0]==self.BICGSTAB: method= "BICGSTAB"
856         elif m==self.GMRES: method= "GMRES"         elif m[0]==self.SSOR: method= "SSOR"
857         elif m==self.PRES20: method= "PRES20"         elif m[0]==self.GMRES: method= "GMRES"
858         elif m==self.LUMPING: method= "LUMPING"         elif m[0]==self.PRES20: method= "PRES20"
859         else : method="unknown"         elif m[0]==self.LUMPING: method= "LUMPING"
860           elif m[0]==self.AMG: method= "AMG"
861           if m[1]==self.DEFAULT: method+="+DEFAULT"
862           elif m[1]==self.JACOBI: method+= "+JACOBI"
863           elif m[1]==self.ILU0: method+= "+ILU0"
864           elif m[1]==self.ILUT: method+= "+ILUT"
865           elif m[1]==self.SSOR: method+= "+SSOR"
866           elif m[1]==self.AMG: method+= "+AMG"
867           elif m[1]==self.RILU: method+= "+RILU"
868         if p==self.DEFAULT: package="DEFAULT"         if p==self.DEFAULT: package="DEFAULT"
869         elif p==self.PASO: package= "PASO"         elif p==self.PASO: package= "PASO"
870         elif p==self.MKL: package= "MKL"         elif p==self.MKL: package= "MKL"
871         elif p==self.SCSL: package= "SCSL"         elif p==self.SCSL: package= "SCSL"
872         elif p==self.UMFPACK: package= "UMFPACK"         elif p==self.UMFPACK: package= "UMFPACK"
873           elif p==self.TRILINOS: package= "TRILINOS"
874         else : method="unknown"         else : method="unknown"
875         return "%s solver of %s package"%(method,package)         return "%s solver of %s package"%(method,package)
876    
# Line 865  class LinearPDE: Line 879  class LinearPDE:
879         """         """
880         returns the solver method         returns the solver method
881    
882         @return: the solver method currently be used.         @return: the solver method currently be used.
883         @rtype: C{int}         @rtype: C{int}
884         """         """
885         return self.__solver_method         return self.__solver_method,self.__preconditioner
886    
887     def setSolverPackage(self,package=None):     def setSolverPackage(self,package=None):
888         """         """
889         sets a new solver package         sets a new solver package
890    
891         @param solver: sets a new solver method.         @param package: sets a new solver method.
892         @type solver: one of L{DEFAULT}, L{PASO} L{SCSL}, L{MKL}, L{UMLPACK}         @type package: one of L{DEFAULT}, L{PASO} L{SCSL}, L{MKL}, L{UMFPACK}, L{TRILINOS}
893         """         """
894         if package==None: package=self.DEFAULT         if package==None: package=self.DEFAULT
895         if not package==self.getSolverPackage():         if not package==self.getSolverPackage():
896             self.__solver_method=solver             self.__solver_package=package
897             self.__checkMatrixType()             self.__checkMatrixType()
898             self.trace("New solver is %s"%self.getSolverMethodName())             self.trace("New solver is %s"%self.getSolverMethodName())
899    
# Line 887  class LinearPDE: Line 901  class LinearPDE:
901         """         """
902         returns the package of the solver         returns the package of the solver
903    
904         @return: the solver package currently being used.         @return: the solver package currently being used.
905         @rtype: C{int}         @rtype: C{int}
906         """         """
907         return self.__solver_package         return self.__solver_package
# Line 899  class LinearPDE: Line 913  class LinearPDE:
913        @return: True is lumping is currently used a solver method.        @return: True is lumping is currently used a solver method.
914        @rtype: C{bool}        @rtype: C{bool}
915        """        """
916        return self.getSolverMethod()==self.LUMPING        return self.getSolverMethod()[0]==self.LUMPING
917    
918     def setTolerance(self,tol=1.e-8):     def setTolerance(self,tol=1.e-8):
919         """         """
# Line 912  class LinearPDE: Line 926  class LinearPDE:
926         @param tol: new tolerance for the solver. If the tol is lower then the current tolerence         @param tol: new tolerance for the solver. If the tol is lower then the current tolerence
927                     the system will be resolved.                     the system will be resolved.
928         @type tol: positive C{float}         @type tol: positive C{float}
929         @raise ValueException: if tolerance is not positive.         @raise ValueError: if tolerance is not positive.
930         """         """
931         if not tol>0:         if not tol>0:
932             raise ValueException,"Tolerance as to be positive"             raise ValueError,"Tolerance as to be positive"
933         if tol<self.getTolerance(): self.__invalidateSolution()         if tol<self.getTolerance(): self.__invalidateSolution()
934         self.trace("New tolerance %e"%tol)         self.trace("New tolerance %e"%tol)
935         self.__tolerance=tol         self.__tolerance=tol
# Line 1092  class LinearPDE: Line 1106  class LinearPDE:
1106       """       """
1107       reassess the matrix type and, if a new matrix is needed, resets the system.       reassess the matrix type and, if a new matrix is needed, resets the system.
1108       """       """
1109       new_matrix_type=self.getDomain().getSystemMatrixTypeId(self.getSolverMethod(),self.getSolverPackage(),self.isSymmetric())       new_matrix_type=self.getDomain().getSystemMatrixTypeId(self.getSolverMethod()[0],self.getSolverPackage(),self.isSymmetric())
1110       if not new_matrix_type==self.__matrix_type:       if not new_matrix_type==self.__matrix_type:
1111           self.trace("Matrix type is now %d."%new_matrix_type)           self.trace("Matrix type is now %d."%new_matrix_type)
1112           self.__matrix_type=new_matrix_type           self.__matrix_type=new_matrix_type
# Line 1502  class LinearPDE: Line 1516  class LinearPDE:
1516           r=self.getCoefficientOfGeneralPDE("r")           r=self.getCoefficientOfGeneralPDE("r")
1517           homogeneous_constraint=True           homogeneous_constraint=True
1518           if not q.isEmpty() and not r.isEmpty():           if not q.isEmpty() and not r.isEmpty():
1519               if util.Lsup(q*r)>=1.e-13*util.Lsup(r):               if util.Lsup(q*r)>0.:
1520                 self.trace("Inhomogeneous constraint detected.")                 self.trace("Inhomogeneous constraint detected.")
1521                 self.__invalidateSystem()                 self.__invalidateSystem()
1522    
# Line 1516  class LinearPDE: Line 1530  class LinearPDE:
1530         if not self.__operator_is_Valid or not self.__righthandside_isValid:         if not self.__operator_is_Valid or not self.__righthandside_isValid:
1531            if self.isUsingLumping():            if self.isUsingLumping():
1532                if not self.__operator_is_Valid:                if not self.__operator_is_Valid:
1533                   if not self.getFunctionSpaceForEquation()==self.getFunctionSpaceForSolution(): raise TypeError,"Lumped matrix requires same order for equations and unknowns"                   if not self.getFunctionSpaceForEquation()==self.getFunctionSpaceForSolution():
1534                   if not self.getCoefficientOfGeneralPDE("A").isEmpty(): raise Warning,"Using coefficient A in lumped matrix can produce wrong results"                        raise TypeError,"Lumped matrix requires same order for equations and unknowns"
1535                   if not self.getCoefficientOfGeneralPDE("B").isEmpty(): raise Warning,"Using coefficient B in lumped matrix can produce wrong results"                   if not self.getCoefficientOfGeneralPDE("A").isEmpty():
1536                   if not self.getCoefficientOfGeneralPDE("C").isEmpty(): raise Warning,"Using coefficient C in lumped matrix can produce wrong results"                        raise ValueError,"coefficient A in lumped matrix may not be present."
1537                   mat=self.__getNewOperator()                   if not self.getCoefficientOfGeneralPDE("B").isEmpty():
1538                   self.getDomain().addPDEToSystem(mat,escript.Data(), \                        raise ValueError,"coefficient A in lumped matrix may not be present."
1539                             self.getCoefficientOfGeneralPDE("A"), \                   if not self.getCoefficientOfGeneralPDE("C").isEmpty():
1540                             self.getCoefficientOfGeneralPDE("B"), \                        raise ValueError,"coefficient A in lumped matrix may not be present."
1541                             self.getCoefficientOfGeneralPDE("C"), \                   D=self.getCoefficientOfGeneralPDE("D")
1542                             self.getCoefficientOfGeneralPDE("D"), \                   if not D.isEmpty():
1543                             escript.Data(), \                       if self.getNumSolutions()>1:
1544                             escript.Data(), \                          #D_times_e=util.matrixmult(D,numarray.ones((self.getNumSolutions(),)))
1545                             self.getCoefficientOfGeneralPDE("d"), \                          D_times_e=util.matrix_mult(D,numarray.ones((self.getNumSolutions(),)))
1546                             escript.Data(),\                       else:
1547                             self.getCoefficientOfGeneralPDE("d_contact"), \                          D_times_e=D
1548                             escript.Data())                   else:
1549                   self.__operator=1./(mat*escript.Data(1,(self.getNumSolutions(),),self.getFunctionSpaceForSolution(),True))                      D_times_e=escript.Data()
1550                   del mat                   d=self.getCoefficientOfGeneralPDE("d")
1551                     if not d.isEmpty():
1552                         if self.getNumSolutions()>1:
1553                            #d_times_e=util.matrixmult(d,numarray.ones((self.getNumSolutions(),)))
1554                            d_times_e=util.matrix_mult(d,numarray.ones((self.getNumSolutions(),)))
1555                         else:
1556                            d_times_e=d
1557                     else:
1558                        d_times_e=escript.Data()
1559                     d_contact=self.getCoefficientOfGeneralPDE("d_contact")
1560                     if not d_contact.isEmpty():
1561                         if self.getNumSolutions()>1:
1562                            d_contact_times_e=util.matrixmult(d_contact,numarray.ones((self.getNumSolutions(),)))
1563                         else:
1564                            d_contact_times_e=d_contact
1565                     else:
1566                        d_contact_times_e=escript.Data()
1567        
1568                     self.__operator=self.__getNewRightHandSide()
1569                     self.getDomain().addPDEToRHS(self.__operator, \
1570                                                  escript.Data(), \
1571                                                  D_times_e, \
1572                                                  d_times_e,\
1573                                                  d_contact_times_e)
1574                     self.__operator=1./self.__operator
1575                   self.trace("New lumped operator has been built.")                   self.trace("New lumped operator has been built.")
1576                   self.__operator_is_Valid=True                   self.__operator_is_Valid=True
1577                if not self.__righthandside_isValid:                if not self.__righthandside_isValid:
# Line 1605  class Poisson(LinearPDE): Line 1643  class Poisson(LinearPDE):
1643    
1644     """     """
1645    
1646     def __init__(self,domain,f=escript.Data(),q=escript.Data(),debug=False):     def __init__(self,domain,debug=False):
1647       """       """
1648       initializes a new Poisson equation       initializes a new Poisson equation
1649    
# Line 1614  class Poisson(LinearPDE): Line 1652  class Poisson(LinearPDE):
1652       @param debug: if True debug informations are printed.       @param debug: if True debug informations are printed.
1653    
1654       """       """
1655       LinearPDE.__init__(self,domain,1,1,debug)       super(Poisson, self).__init__(domain,1,1,debug)
1656       self.COEFFICIENTS={"f": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),       self.COEFFICIENTS={"f": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),
1657                            "q": PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH)}                            "q": PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH)}
1658       self.setSymmetryOn()       self.setSymmetryOn()
# Line 1631  class Poisson(LinearPDE): Line 1669  class Poisson(LinearPDE):
1669                 depending of reduced order is used for the representation of the equation.                 depending of reduced order is used for the representation of the equation.
1670       @raise IllegalCoefficient: if an unknown coefficient keyword is used.       @raise IllegalCoefficient: if an unknown coefficient keyword is used.
1671       """       """
1672       LinearPDE.setValue(self,**coefficients)       super(Poisson, self).setValue(**coefficients)
1673    
1674     def getCoefficientOfGeneralPDE(self,name):     def getCoefficientOfGeneralPDE(self,name):
1675       """       """
# Line 1645  class Poisson(LinearPDE): Line 1683  class Poisson(LinearPDE):
1683       @note: This method is called by the assembling routine to map the Possion equation onto the general PDE.       @note: This method is called by the assembling routine to map the Possion equation onto the general PDE.
1684       """       """
1685       if name == "A" :       if name == "A" :
1686           return escript.Data(numarray.identity(self.getDim()),escript.Function(self.getDomain()))           return escript.Data(util.kronecker(self.getDim()),escript.Function(self.getDomain()))
1687       elif name == "B" :       elif name == "B" :
1688           return escript.Data()           return escript.Data()
1689       elif name == "C" :       elif name == "C" :
# Line 1696  class Helmholtz(LinearPDE): Line 1734  class Helmholtz(LinearPDE):
1734       @param debug: if True debug informations are printed.       @param debug: if True debug informations are printed.
1735    
1736       """       """
1737       LinearPDE.__init__(self,domain,1,1,debug)       super(Helmholtz, self).__init__(domain,1,1,debug)
1738       self.COEFFICIENTS={"omega": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.OPERATOR),       self.COEFFICIENTS={"omega": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.OPERATOR),
1739                          "k": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.OPERATOR),                          "k": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.OPERATOR),
1740                          "f": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),                          "f": PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),
# Line 1729  class Helmholtz(LinearPDE): Line 1767  class Helmholtz(LinearPDE):
1767                 depending of reduced order is used for the representation of the equation.                 depending of reduced order is used for the representation of the equation.
1768       @raise IllegalCoefficient: if an unknown coefficient keyword is used.       @raise IllegalCoefficient: if an unknown coefficient keyword is used.
1769       """       """
1770       LinearPDE.setValue(self,**coefficients)       super(Helmholtz, self).setValue(**coefficients)
1771    
1772     def getCoefficientOfGeneralPDE(self,name):     def getCoefficientOfGeneralPDE(self,name):
1773       """       """
# Line 1774  class LameEquation(LinearPDE): Line 1812  class LameEquation(LinearPDE):
1812     """     """
1813     Class to define a Lame equation problem:     Class to define a Lame equation problem:
1814    
1815     M{-grad(S{mu}*(grad(u[i])[j]+grad(u[j])[i]))[j] - grad(S{lambda}*grad(u[j])[i])[j] = F_i -grad(S{sigma}[i,j])[j] }     M{-grad(S{mu}*(grad(u[i])[j]+grad(u[j])[i]))[j] - grad(S{lambda}*grad(u[k])[k])[j] = F_i -grad(S{sigma}[ij])[j] }
1816    
1817     with natural boundary conditons:     with natural boundary conditons:
1818    
1819     M{n[j]*(S{mu}*(grad(u[i])[j]+grad(u[j])[i]) - S{lambda}*grad(u[j])[i]) = f_i -n[j]*S{sigma}[i,j] }     M{n[j]*(S{mu}*(grad(u[i])[j]+grad(u[j])[i]) + S{lambda}*grad(u[k])[k]) = f_i +n[j]*S{sigma}[ij] }
1820    
1821     and constraints:     and constraints:
1822    
# Line 1787  class LameEquation(LinearPDE): Line 1825  class LameEquation(LinearPDE):
1825     """     """
1826    
1827     def __init__(self,domain,debug=False):     def __init__(self,domain,debug=False):
1828         LinearPDE.__init__(self,domain,domain.getDim(),domain.getDim(),debug)        super(LameEquation, self).__init__(domain,\
1829         self.COEFFICIENTS={ "lame_lambda"  : PDECoefficient(PDECoefficient.INTERIOR,(),PDECoefficient.OPERATOR),                                           domain.getDim(),domain.getDim(),debug)
1830          self.COEFFICIENTS={ "lame_lambda"  : PDECoefficient(PDECoefficient.INTERIOR,(),PDECoefficient.OPERATOR),
1831                            "lame_mu"      : PDECoefficient(PDECoefficient.INTERIOR,(),PDECoefficient.OPERATOR),                            "lame_mu"      : PDECoefficient(PDECoefficient.INTERIOR,(),PDECoefficient.OPERATOR),
1832                            "F"            : PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),                            "F"            : PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),
1833                            "sigma"        : PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,PDECoefficient.BY_DIM),PDECoefficient.RIGHTHANDSIDE),                            "sigma"        : PDECoefficient(PDECoefficient.INTERIOR,(PDECoefficient.BY_EQUATION,PDECoefficient.BY_DIM),PDECoefficient.RIGHTHANDSIDE),
1834                            "f"            : PDECoefficient(PDECoefficient.BOUNDARY,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),                            "f"            : PDECoefficient(PDECoefficient.BOUNDARY,(PDECoefficient.BY_EQUATION,),PDECoefficient.RIGHTHANDSIDE),
1835                            "r"            : PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH),                            "r"            : PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH),
1836                            "q"            : PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH)}                            "q"            : PDECoefficient(PDECoefficient.SOLUTION,(PDECoefficient.BY_EQUATION,),PDECoefficient.BOTH)}
1837         self.setSymmetryOn()        self.setSymmetryOn()
1838    
1839     def setValue(self,**coefficients):     def setValues(self,**coefficients):
1840       """       """
1841       sets new values to coefficients       sets new values to coefficients
1842    
# Line 1820  class LameEquation(LinearPDE): Line 1859  class LameEquation(LinearPDE):
1859                 depending of reduced order is used for the representation of the equation.                 depending of reduced order is used for the representation of the equation.
1860       @raise IllegalCoefficient: if an unknown coefficient keyword is used.       @raise IllegalCoefficient: if an unknown coefficient keyword is used.
1861       """       """
1862       LinearPDE.setValue(self,**coefficients)       super(LameEquation, self).setValues(**coefficients)
1863    
1864     def getCoefficientOfGeneralPDE(self,name):     def getCoefficientOfGeneralPDE(self,name):
1865       """       """
# Line 1876  class AdvectivePDE(LinearPDE): Line 1915  class AdvectivePDE(LinearPDE):
1915    
1916     M{Z[j]=C[j]-B[j]}     M{Z[j]=C[j]-B[j]}
1917    
1918     or     or
1919    
1920     M{Z[i,k,l]=C[i,k,l]-B[i,l,k]}     M{Z[i,k,l]=C[i,k,l]-B[i,l,k]}
1921    
1922     To measure the dominance of the advective terms over the diffusive term M{A} the     To measure the dominance of the advective terms over the diffusive term M{A} the
1923     X{Pelclet number} M{P} is used. It is defined as     X{Pelclet number} M{P} is used. It is defined as
1924    
1925     M{P=h|Z|/(2|A|)}     M{P=h|Z|/(2|A|)}
1926    
1927     where M{|.|} denotes the L{length<util.length>} of the arument and M{h} is the local cell size     where M{|.|} denotes the L{length<util.length>} of the arument and M{h} is the local cell size
1928     from L{getSize<escript.Domain.getSize>}. Where M{|A|==0} M{P} is M{S{infinity}}.     from L{getSize<escript.Domain.getSize>}. Where M{|A|==0} M{P} is M{S{infinity}}.
1929    
1930     From the X{Pelclet number} the stabilization parameters M{S{Xi}} and M{S{Xi}} are calculated:     From the X{Pelclet number} the stabilization parameters M{S{Xi}} and M{S{Xi}} are calculated:
# Line 1913  class AdvectivePDE(LinearPDE): Line 1952  class AdvectivePDE(LinearPDE):
1952     """     """
1953     def __init__(self,domain,numEquations=None,numSolutions=None,xi=None,debug=False):     def __init__(self,domain,numEquations=None,numSolutions=None,xi=None,debug=False):
1954        """        """
1955        creates a linear, steady, second order PDE on a L{Domain<escript.Domain>}        creates a linear, steady, second order PDE on a L{Domain<escript.Domain>}
1956    
1957        @param domain: domain of the PDE        @param domain: domain of the PDE
1958        @type domain: L{Domain<escript.Domain>}        @type domain: L{Domain<escript.Domain>}
# Line 1921  class AdvectivePDE(LinearPDE): Line 1960  class AdvectivePDE(LinearPDE):
1960                             is exracted from the PDE coefficients.                             is exracted from the PDE coefficients.
1961        @param numSolutions: number of solution components. If  numSolutions==None the number of solution components        @param numSolutions: number of solution components. If  numSolutions==None the number of solution components
1962                             is exracted from the PDE coefficients.                             is exracted from the PDE coefficients.
1963        @param xi: defines a function which returns for any given Preclet number as L{Scalar<escript.Scalar>} object the        @param xi: defines a function which returns for any given Preclet number as L{Scalar<escript.Scalar>} object the
1964                   M{S{xi}}-value used to define the stabilization parameters. If equal to None, L{ELMAN_RAMAGE} is used.                   M{S{xi}}-value used to define the stabilization parameters. If equal to None, L{ELMAN_RAMAGE} is used.
1965        @type xi: callable object which returns a L{Scalar<escript.Scalar>} object.        @type xi: callable object which returns a L{Scalar<escript.Scalar>} object.
1966        @param debug: if True debug informations are printed.        @param debug: if True debug informations are printed.
1967        """        """
1968          super(AdvectivePDE, self).__init__(domain,\
1969        LinearPDE.__init__(self,domain,numEquations,numSolutions,debug)                                           numEquations,numSolutions,debug)
1970        if xi==None:        if xi==None:
1971           self.__xi=AdvectivePDE.ELMAN_RAMAGE           self.__xi=AdvectivePDE.ELMAN_RAMAGE
1972        else:        else:
# Line 1971  class AdvectivePDE(LinearPDE): Line 2010  class AdvectivePDE(LinearPDE):
2010    
2011        """        """
2012        if "A" in coefficients.keys()   or "B" in coefficients.keys() or "C" in coefficients.keys(): self.__Xi=escript.Data()        if "A" in coefficients.keys()   or "B" in coefficients.keys() or "C" in coefficients.keys(): self.__Xi=escript.Data()
2013        LinearPDE.setValue(self,**coefficients)        super(AdvectivePDE, self).setValue(**coefficients)
2014    
2015     def ELMAN_RAMAGE(self,P):     def ELMAN_RAMAGE(self,P):
2016       """       """
2017       Predefined function to set a values for M{S{xi}} from a Preclet number M{P}.       Predefined function to set a values for M{S{xi}} from a Preclet number M{P}.
2018       This function uses the method suggested by H.C. Elman and A. Ramage, I{SIAM J. Numer. Anal.}, B{40} (2002)       This function uses the method suggested by H.C. Elman and A. Ramage, I{SIAM J. Numer. Anal.}, B{40} (2002)
2019            - M{S{xi}(P)=0} for M{P<1}            - M{S{xi}(P)=0} for M{P<1}
2020            - M{S{xi}(P)=(1-1/P)/2} otherwise            - M{S{xi}(P)=(1-1/P)/2} otherwise
2021    
2022       @param P: Preclet number       @param P: Preclet number
2023       @type P: L{Scalar<escript.Scalar>}       @type P: L{Scalar<escript.Scalar>}
2024       @return: up-wind weightimg factor       @return: up-wind weightimg factor
2025       @rtype: L{Scalar<escript.Scalar>}       @rtype: L{Scalar<escript.Scalar>}
2026       """       """
2027       return (P-1.).wherePositive()*0.5*(1.-1./(P+1.e-15))       return util.wherePositive(P-1.)*0.5*(1.-1./(P+1.e-15))
2028    
2029     def SIMPLIFIED_BROOK_HUGHES(self,P):     def SIMPLIFIED_BROOK_HUGHES(self,P):
2030       """       """
2031       Predefined function to set a values for M{S{xi}} from a Preclet number M{P}.       Predefined function to set a values for M{S{xi}} from a Preclet number M{P}.
2032       The original methods is       The original methods is
2033        
2034       M{S{xi}(P)=coth(P)-1/P}       M{S{xi}(P)=coth(P)-1/P}
2035    
2036       As the evaluation of M{coth} is expensive we are using the approximation:       As the evaluation of M{coth} is expensive we are using the approximation:
2037        
2038           - M{S{xi}(P)=P/3} where M{P<3}           - M{S{xi}(P)=P/3} where M{P<3}
2039           - M{S{xi}(P)=1/2} otherwise           - M{S{xi}(P)=1/2} otherwise
2040    
2041       @param P: Preclet number       @param P: Preclet number
2042       @type P: L{Scalar<escript.Scalar>}       @type P: L{Scalar<escript.Scalar>}
2043       @return: up-wind weightimg factor       @return: up-wind weightimg factor
2044       @rtype: L{Scalar<escript.Scalar>}       @rtype: L{Scalar<escript.Scalar>}
2045       """       """
2046       c=(P-3.).whereNegative()       c=util.whereNegative(P-3.)
2047       return P/6.*c+1./2.*(1.-c)       return P/6.*c+1./2.*(1.-c)
2048    
2049     def HALF(self,P):     def HALF(self,P):
2050       """       """
2051       Predefined function to set value M{1/2} for M{S{xi}}       Predefined function to set value M{1/2} for M{S{xi}}
2052    
2053       @param P: Preclet number       @param P: Preclet number
2054       @type P: L{Scalar<escript.Scalar>}       @type P: L{Scalar<escript.Scalar>}
2055       @return: up-wind weightimg factor       @return: up-wind weightimg factor
2056       @rtype: L{Scalar<escript.Scalar>}       @rtype: L{Scalar<escript.Scalar>}
2057       """       """
2058       return escript.Scalar(0.5,P.getFunctionSpace())       return escript.Scalar(0.5,P.getFunctionSpace())
2059    
    def __calculateXi(self,peclet_factor,Z,h):  
        Z_max=util.Lsup(Z)  
        if Z_max>0.:  
           return h*self.__xi(Z*peclet_factor)/(Z+Z_max*self.__TOL)  
        else:  
           return 0.  
   
2060     def __getXi(self):     def __getXi(self):
2061        if self.__Xi.isEmpty():        if self.__Xi.isEmpty():
2062           B=self.getCoefficient("B")           B=self.getCoefficient("B")
# Line 2034  class AdvectivePDE(LinearPDE): Line 2066  class AdvectivePDE(LinearPDE):
2066           self.__Xi=escript.Scalar(0.,self.getFunctionSpaceForCoefficient("A"))           self.__Xi=escript.Scalar(0.,self.getFunctionSpaceForCoefficient("A"))
2067           if not C.isEmpty() or not B.isEmpty():           if not C.isEmpty() or not B.isEmpty():
2068              if not C.isEmpty() and not B.isEmpty():              if not C.isEmpty() and not B.isEmpty():
                 Z2=escript.Scalar(0,self.getFunctionSpaceForCoefficient("A"))  
2069                  if self.getNumEquations()>1:                  if self.getNumEquations()>1:
2070                     if self.getNumSolutions()>1:                     if self.getNumSolutions()>1:
2071                          flux2=escript.Scalar(0,self.getFunctionSpaceForCoefficient("A"))
2072                        for i in range(self.getNumEquations()):                        for i in range(self.getNumEquations()):
2073                           for k in range(self.getNumSolutions()):                           for k in range(self.getNumSolutions()):
2074                              for l in range(self.getDim()): Z2+=(C[i,k,l]-B[i,l,k])**2                              for l in range(self.getDim()): flux2+=(C[i,k,l]-B[i,l,k])**2
2075                          length_of_flux=util.sqrt(flux2)
2076                          # flux=C-util.reorderComponents(B,[0,2,1])
2077                     else:                     else:
2078                          flux2=escript.Scalar(0,self.getFunctionSpaceForCoefficient("A"))
2079                        for i in range(self.getNumEquations()):                        for i in range(self.getNumEquations()):
2080                           for l in range(self.getDim()): Z2+=(C[i,l]-B[i,l])**2                           for l in range(self.getDim()): flux2+=(C[i,l]-B[i,l])**2
2081                          length_of_flux=util.sqrt(flux2)
2082                          # flux=C-B
2083                  else:                  else:
2084                     if self.getNumSolutions()>1:                     if self.getNumSolutions()>1:
2085                          flux2=escript.Scalar(0,self.getFunctionSpaceForCoefficient("A"))
2086                        for k in range(self.getNumSolutions()):                        for k in range(self.getNumSolutions()):
2087                           for l in range(self.getDim()): Z2+=(C[k,l]-B[l,k])**2                           for l in range(self.getDim()): flux2+=(C[k,l]-B[l,k])**2
2088                          # flux=C-util.reorderComponents(B,[1,0])
2089                          length_of_flux=util.sqrt(flux2)
2090                     else:                     else:
2091                        for l in range(self.getDim()): Z2+=(C[l]-B[l])**2                        length_of_flux=util.length(C-B)
                 length_of_Z=util.sqrt(Z2)  
2092              elif C.isEmpty():              elif C.isEmpty():
2093                length_of_Z=util.length(B)                length_of_flux=util.length(B)
2094              else:              else:
2095                length_of_Z=util.length(C)                length_of_flux=util.length(C)
2096                flux_max=util.Lsup(length_of_flux)
2097              Z_max=util.Lsup(length_of_Z)              if flux_max>0.:
2098              if Z_max>0.:                if A.isEmpty():
2099                 length_of_A=util.length(A)                    inv_A=1./self.SMALL_TOLERANCE
2100                 A_max=util.Lsup(length_of_A)                    peclet_number=escript.Scalar(inv_A,length_of_flux.getFunctionSpace())
2101                 if A_max>0:                    xi=self.__xi(self,peclet_number)
2102                      inv_A=1./(length_of_A+A_max*self.__TOL)                else:
2103                 else:                    # length_of_A=util.inner(flux,util.tensormutiply(A,flux))
2104                      inv_A=1./self.__TOL                    length_of_A=util.length(A)
2105                 peclet_number=length_of_Z*h/2*inv_A                    A_max=util.Lsup(length_of_A)
2106                 xi=self.__xi(peclet_number)                    if A_max>0:
2107                 self.__Xi=h*xi/(length_of_Z+Z_max*self.__TOL)                         inv_A=1./(length_of_A+A_max*self.SMALL_TOLERANCE)
2108                 self.trace("preclet number = %e"%util.Lsup(peclet_number))                    else:
2109                           inv_A=1./self.SMALL_TOLERANCE
2110                      peclet_number=length_of_flux*h/2*inv_A
2111                      xi=self.__xi(self,peclet_number)
2112                  self.__Xi=h*xi/(length_of_flux+flux_max*self.SMALL_TOLERANCE)
2113                  self.trace("preclet number = %e"%util.Lsup(peclet_number))
2114                else:
2115                  self.__Xi=escript.Scalar(0.,length_of_flux.getFunctionSpace())
2116        return self.__Xi        return self.__Xi
2117    
2118    
# Line 2093  class AdvectivePDE(LinearPDE): Line 2139  class AdvectivePDE(LinearPDE):
2139              Aout=A              Aout=A
2140           else:           else:
2141              if A.isEmpty():              if A.isEmpty():
2142                 Aout=self.createNewCoefficient("A")                 Aout=self.createCoefficientOfGeneralPDE("A")
2143              else:              else:
2144                 Aout=A[:]                 Aout=A[:]
2145              Xi=self.__getXi()              Xi=self.__getXi()
# Line 2103  class AdvectivePDE(LinearPDE): Line 2149  class AdvectivePDE(LinearPDE):
2149                        for k in range(self.getNumSolutions()):                        for k in range(self.getNumSolutions()):
2150                           for l in range(self.getDim()):                           for l in range(self.getDim()):
2151                              if not C.isEmpty() and not B.isEmpty():                              if not C.isEmpty() and not B.isEmpty():
2152                                   # tmp=C-util.reorderComponents(B,[0,2,1])
2153                                   # Aout=Aout+Xi*util.generalTensorProduct(util.reorder(tmp,[1,2,0]),tmp,offset=1)
2154                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*(C[p,i,j]-B[p,j,i])*(C[p,k,l]-B[p,l,k])                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*(C[p,i,j]-B[p,j,i])*(C[p,k,l]-B[p,l,k])
2155                              elif C.isEmpty():                              elif C.isEmpty():
2156                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*B[p,j,i]*B[p,l,k]                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*B[p,j,i]*B[p,l,k]
2157                                   # Aout=Aout+Xi*util.generalTensorProduct(util.reorder(B,[2,1,0]),util.reorder(B,[0,2,1]),offset=1)
2158                              else:                              else:
2159                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*C[p,i,j]*C[p,k,l]                                 for p in range(self.getNumEquations()): Aout[i,j,k,l]+=Xi*C[p,i,j]*C[p,k,l]
2160                                   # Aout=Aout+Xi*util.generalTensorProduct(util.reorder(C,[1,2,0]),C,offset=1)
2161              else:              else:
2162                  for j in range(self.getDim()):                 if not C.isEmpty() and not B.isEmpty():
2163                     for l in range(self.getDim()):                     delta=(C-B)
2164                        if not C.isEmpty() and not B.isEmpty():                     Aout+=util.outer(Xi*delta,delta)
2165                            Aout[j,l]+=Xi*(C[j]-B[j])*(C[l]-B[l])                 elif not B.isEmpty():
2166                        elif C.isEmpty():                     Aout+=util.outer(Xi*B,B)
2167                            Aout[j,l]+=Xi*B[j]*B[l]                 elif not C.isEmpty():
2168                        else:                     Aout+=util.outer(Xi*C,C)
                           Aout[j,l]+=Xi*C[j]*C[l]  
2169           return Aout           return Aout
2170       elif name == "B" :       elif name == "B" :
2171             # return self.getCoefficient("B")
2172           B=self.getCoefficient("B")           B=self.getCoefficient("B")
2173           C=self.getCoefficient("C")           C=self.getCoefficient("C")
2174           D=self.getCoefficient("D")           D=self.getCoefficient("D")
# Line 2127  class AdvectivePDE(LinearPDE): Line 2177  class AdvectivePDE(LinearPDE):
2177           else:           else:
2178              Xi=self.__getXi()              Xi=self.__getXi()
2179              if B.isEmpty():              if B.isEmpty():
2180                  Bout=self.createNewCoefficient("B")                  Bout=self.createCoefficientOfGeneralPDE("B")
2181              else:              else:
2182                  Bout=B[:]                  Bout=B[:]
2183              if self.getNumEquations()>1:              if self.getNumEquations()>1:
# Line 2137  class AdvectivePDE(LinearPDE): Line 2187  class AdvectivePDE(LinearPDE):
2187                       for i in range(self.getNumEquations()):                       for i in range(self.getNumEquations()):
2188                          for j in range(self.getDim()):                          for j in range(self.getDim()):
2189                             Bout[i,j,k]+=tmp*C[p,i,j]                             Bout[i,j,k]+=tmp*C[p,i,j]
2190                               # Bout=Bout+Xi*util.generalTensorProduct(util.reorder(C,[1,2,0]),D,offset=1)
2191              else:              else:
2192                 tmp=Xi*D                 Bout+=(Xi*D)*C
                for j in range(self.getDim()): Bout[j]+=tmp*C[j]  
2193           return Bout           return Bout
2194       elif name == "C" :       elif name == "C" :
2195             # return self.getCoefficient("C")
2196           B=self.getCoefficient("B")           B=self.getCoefficient("B")
2197           C=self.getCoefficient("C")           C=self.getCoefficient("C")
2198           D=self.getCoefficient("D")           D=self.getCoefficient("D")
# Line 2150  class AdvectivePDE(LinearPDE): Line 2201  class AdvectivePDE(LinearPDE):
2201           else:           else:
2202              Xi=self.__getXi()              Xi=self.__getXi()
2203              if C.isEmpty():              if C.isEmpty():
2204                  Cout=self.createNewCoefficient("C")                  Cout=self.createCoefficientOfGeneralPDE("C")
2205              else:              else:
2206                  Cout=C[:]                  Cout=C[:]
2207              if self.getNumEquations()>1:              if self.getNumEquations()>1:
# Line 2160  class AdvectivePDE(LinearPDE): Line 2211  class AdvectivePDE(LinearPDE):
2211                        for i in range(self.getNumEquations()):                        for i in range(self.getNumEquations()):
2212                          for l in range(self.getDim()):                          for l in range(self.getDim()):
2213                                   Cout[i,k,l]+=tmp*B[p,l,i]                                   Cout[i,k,l]+=tmp*B[p,l,i]
2214                                     # Cout=Cout+Xi*B[p,l,i]*D[p,k]
2215              else:              else:
2216                 tmp=Xi*D                 Cout+=(Xi*D)*B
                for j in range(self.getDim()): Cout[j]+=tmp*B[j]  
2217           return Cout           return Cout
2218       elif name == "D" :       elif name == "D" :
2219           return self.getCoefficient("D")           return self.getCoefficient("D")
2220       elif name == "X" :       elif name == "X" :
2221             # return self.getCoefficient("X")
2222           X=self.getCoefficient("X")           X=self.getCoefficient("X")
2223           Y=self.getCoefficient("Y")           Y=self.getCoefficient("Y")
2224           B=self.getCoefficient("B")           B=self.getCoefficient("B")
# Line 2175  class AdvectivePDE(LinearPDE): Line 2227  class AdvectivePDE(LinearPDE):
2227              Xout=X              Xout=X
2228           else:           else:
2229              if X.isEmpty():              if X.isEmpty():
2230                  Xout=self.createNewCoefficient("X")                  Xout=self.createCoefficientOfGeneralPDE("X")
2231              else:              else:
2232                  Xout=X[:]                  Xout=X[:]
2233              Xi=self.__getXi()              Xi=self.__getXi()
# Line 2186  class AdvectivePDE(LinearPDE): Line 2238  class AdvectivePDE(LinearPDE):
2238                         for j in range(self.getDim()):                         for j in range(self.getDim()):
2239                            if not C.isEmpty() and not B.isEmpty():                            if not C.isEmpty() and not B.isEmpty():
2240                               Xout[i,j]+=tmp*(C[p,i,j]-B[p,j,i])                               Xout[i,j]+=tmp*(C[p,i,j]-B[p,j,i])
2241                                 # Xout=X_out+Xi*util.inner(Y,C-util.reorderComponents(B,[0,2,1]),offset=1)
2242                            elif C.isEmpty():                            elif C.isEmpty():
2243                               Xout[i,j]-=tmp*B[p,j,i]                               Xout[i,j]-=tmp*B[p,j,i]
2244                                 # Xout=X_out-Xi*util.inner(Y,util.reorderComponents(B,[0,2,1]),offset=1)
2245                            else:                            else:
2246                               Xout[i,j]+=tmp*C[p,i,j]                               Xout[i,j]+=tmp*C[p,i,j]
2247                                 # Xout=X_out+Xi*util.inner(Y,C,offset=1)
2248              else:              else:
2249                   tmp=Xi*Y                if not C.isEmpty() and not B.isEmpty():
2250                   for j in range(self.getDim()):                  Xout+=(Xi*Y)*(C-B)
2251                      if not C.isEmpty() and not B.isEmpty():                elif C.isEmpty():
2252                         Xout[j]+=tmp*(C[j]-B[j])                  Xout-=(Xi*Y)*B
2253                      elif C.isEmpty():                else:
2254                         Xout[j]-=tmp*B[j]                  Xout+=(Xi*Y)*C
                     else:  
                        Xout[j]+=tmp*C[j]  
2255           return Xout           return Xout
2256       elif name == "Y" :       elif name == "Y" :
2257           return self.getCoefficient("Y")           return self.getCoefficient("Y")
# Line 2217  class AdvectivePDE(LinearPDE): Line 2270  class AdvectivePDE(LinearPDE):
2270       else:       else:
2271          raise IllegalCoefficient,"illegal coefficient %s requested for general PDE."%name          raise IllegalCoefficient,"illegal coefficient %s requested for general PDE."%name
2272    
   
2273  # $Log$  # $Log$
2274    # Revision 1.14  2005/09/22 01:54:57  jgs
2275    # Merge of development branch dev-02 back to main trunk on 2005-09-22
2276    #
2277  # Revision 1.13  2005/09/15 03:44:19  jgs  # Revision 1.13  2005/09/15 03:44:19  jgs
2278  # Merge of development branch dev-02 back to main trunk on 2005-09-15  # Merge of development branch dev-02 back to main trunk on 2005-09-15
2279  #  #
# Line 2231  class AdvectivePDE(LinearPDE): Line 2286  class AdvectivePDE(LinearPDE):
2286  # Revision 1.10  2005/08/12 01:45:36  jgs  # Revision 1.10  2005/08/12 01:45:36  jgs
2287  # erge of development branch dev-02 back to main trunk on 2005-08-12  # erge of development branch dev-02 back to main trunk on 2005-08-12
2288  #  #
2289    # Revision 1.9.2.17  2005/09/21 07:03:33  matt
2290    # PDECoefficient and LinearPDE are now new style classes (introduced in Python
2291    # 2.2). Classes Poisson, Helmholtz, LameEquation and AdvectivePDE have been
2292    # modified to instead use portable/cooperative "super" calls to extend base
2293    # class methods.
2294    #
2295    # Revision 1.9.2.16  2005/09/16 01:54:37  matt
2296    # Removed redundant if-loop.
2297    #
2298  # Revision 1.9.2.15  2005/09/14 08:09:18  matt  # Revision 1.9.2.15  2005/09/14 08:09:18  matt
2299  # Added "REDUCED" solution PDECoefficient descriptors for LinearPDEs.  # Added "REDUCED" solution PDECoefficient descriptors for LinearPDEs.
2300  #  #

Legend:
Removed from v.150  
changed lines
  Added in v.969

  ViewVC Help
Powered by ViewVC 1.1.26