/[escript]/branches/diaplayground/poisson.py
ViewVC logotype

Diff of /branches/diaplayground/poisson.py

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

revision 5065 by caltinay, Fri Jun 20 05:49:52 2014 UTC revision 5095 by caltinay, Fri Jul 11 05:54:25 2014 UTC
# Line 3  from esys.escript.linearPDEs import Line Line 3  from esys.escript.linearPDEs import Line
3  from esys.ripley import Rectangle, Brick  from esys.ripley import Rectangle, Brick
4  from time import time  from time import time
5    
6  BLOCKSIZE=1  BLOCKSIZE=3
7    
8  dom = Rectangle(l0=1.,l1=1.,n0=599, n1=599)  dom = Rectangle(l0=1.,l1=1.,n0=299, n1=299)
9  #dom = Brick(l0=1.,l1=1.,n0=51, n1=51, n2=17)  #dom = Brick(l0=1.,l1=1.,n0=51, n1=51, n2=17)
10  x = dom.getX()  x = dom.getX()
11  gammaD = whereZero(x[0])+whereZero(x[1])  gammaD = whereZero(x[0])+whereZero(x[1])
# Line 22  def solve(target): Line 22  def solve(target):
22          Y_reduced = 1.          Y_reduced = 1.
23      else:      else:
24          for i in range(BLOCKSIZE):          for i in range(BLOCKSIZE):
25              A[i,:,i,:] = kronecker(dom)              A[i,:,i,:] = kronecker(dom)*(i+1)
26              q[i] = gammaD              q[i] = gammaD
27              Y_reduced[i] = 1.              Y_reduced[i] = 1.
28    
# Line 32  def solve(target): Line 32  def solve(target):
32      pde.getSolverOptions().setSolverMethod(SolverOptions.PCG)      pde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
33      pde.getSolverOptions().setSolverTarget(target)      pde.getSolverOptions().setSolverTarget(target)
34      pde.getSolverOptions().setPreconditioner(SolverOptions.NO_PRECONDITIONER)      pde.getSolverOptions().setPreconditioner(SolverOptions.NO_PRECONDITIONER)
35        pde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
36      pde.getSolverOptions().setVerbosityOn()      pde.getSolverOptions().setVerbosityOn()
37      #pde.setDebugOn()      #pde.setDebugOn()
38      #rhs=pde.getRightHandSide()      #rhs=pde.getRightHandSide()

Legend:
Removed from v.5065  
changed lines
  Added in v.5095

  ViewVC Help
Powered by ViewVC 1.1.26