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

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

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

revision 107 by jgs, Wed Dec 15 07:08:39 2004 UTC revision 108 by jgs, Thu Jan 27 06:21:59 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          self._setValue(A=kappa*numarray.identity(self.getDim()),D=omega,Y=f,d=eta,y=g)          # get spatial dimension
7            ndim=self.getDim()
8            # get kronecker symbol from numarray: kronecker[i,j]=1 for i=j and =0 else
9            kronecker=numarray.identity(ndim)
10            # map kappa, omega, f, eta, g to the coefficients of the general PDE
11            self._setValue(A=kappa*kronecker,D=omega,Y=f,d=eta,y=g)

Legend:
Removed from v.107  
changed lines
  Added in v.108

  ViewVC Help
Powered by ViewVC 1.1.26