[petsc-users] about snes

2010-05-06 Thread Leping Chen
petsc teams, When I use SNES, I find my program iterated many times but x vector and residual vector remained unchanged, that is to say,no convergence.I used finite difference jacobian approximations, but I cannot confirm the jacobian matrix structure is right.Whether the matrix structure

[petsc-users] about finite difference jacobian approximations

2010-05-01 Thread Leping Chen
hello, petsc teams, When I use finite difference jacobian approximations, I only find the computation methods and results of jacobian matrix cannot influence iterative process of snes. Is it right? How should I compute the jacobian matrix? thanks, leping 2010-05-01 -- next

[petsc-users] about finite difference jacobian approximations

2010-05-01 Thread Leping Chen
hello, petsc teams, If I want to use finite difference jacobian approximations,how should I define the function FormJacobian()? I don't get analytic jacobians. thanks, leping 2010-05-02 Jed Brown ? 2010-05-02 20:10:20 chenleping; PETSc users list ??? ??? Re:

[petsc-users] about snes and finite difference jacobian approximations

2010-04-30 Thread Leping Chen
Dear petsc teams, When I use snes, I find the Jacobian matrix computation is an imposible misson, however,I don't konw how to use Finite Difference Jacobian Approximations, for example, I modified the example ex1f.F and the function FormJacobian() remain unchanged,as follows, call

[petsc-users] array and vec

2010-04-16 Thread Leping Chen
thanks, but I don't understand VecGetArray(), that is to say, I don't know how to call VecGetArray() when I plan to get any local values of x, Maybe, double precision u(n) Vec x PetscOffset uu_i call VecGetArray(x,u,uu_i,ierr) is it right? it seems don't work. how can I call it?

[petsc-users] about Vecgetarray()

2010-04-16 Thread Leping Chen
petsc teams, if I want create the relation between u() [array] and x [Vec] ,I can do it as follows, #define u(ib) xx_v(xx_i + (ib)) call VecGetArray(x,xx_v,xx_i,ierr) do 30 i=1,n u(i) = 1000.0*i 30 continue call VecRestoreArray(x,xx_v,xx_i,ierr) However, I

[petsc-users] about Vecgetarray()

2010-04-16 Thread Leping Chen
petsc teams, PetscOffset xx_i Vec x double precision u(6) call VecGetArray(x,u,xx_i,ierr) do 30 i=1,n u(i) = 1000.0*i 30 continue call VecRestoreArray(x,u,xx_i,ierr) I don't understand why x cannot be changed when

[petsc-users] array and vec

2010-04-15 Thread Leping Chen
hello, petsc teams, when I use FormFuncion(), I need use a value of x; but x is defined by Vec, I don't know how to get a value of x, for example, the 3rd value. thanks, leping Jed Brown ? 2010-04-16 21:21:47 chenleping; PETSc users list ??? ??? Re: [petsc-users]