/[escript]/trunk/esys2/doc/user/examples/mytools.py
ViewVC logotype

Diff of /trunk/esys2/doc/user/examples/mytools.py

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

revision 112 by jgs, Thu Jan 27 06:21:59 2005 UTC revision 113 by jgs, Mon Feb 28 07:06:33 2005 UTC
# Line 2  Line 2 
2  from esys.linearPDEs import LinearPDE  from esys.linearPDEs import LinearPDE
3  import numarray  import numarray
4  class Helmholtz(LinearPDE):  class Helmholtz(LinearPDE):
5     def setValue(self,kappa=0,omega=1,f=0,eta=0,g=0)     def setValue(self,kappa=0,omega=1,f=0,eta=0,g=0):
6          # get spatial dimension          # get spatial dimension
7          ndim=self.getDim()          ndim=self.getDim()
8          # get kronecker symbol from numarray: kronecker[i,j]=1 for i=j and =0 else          # get kronecker symbol from numarray: kronecker[i,j]=1 for i=j and =0 else
9          kronecker=numarray.identity(ndim)          kronecker=numarray.identity(ndim)
10          # map kappa, omega, f, eta, g to the coefficients of the general PDE          # map kappa, omega, f, eta, g to the coefficients of the general PDE
         self._setValue(A=kappa*kronecker,D=omega,Y=f,d=eta,y=g)  
11            self._setValue(A=kappa*kronecker,D=omega,Y=f,d=eta,y=g)

Legend:
Removed from v.112  
changed lines
  Added in v.113

  ViewVC Help
Powered by ViewVC 1.1.26