On Fri, 16 Apr 2010, Matthew Knepley wrote:

> 2010/4/15 ????Leping Chen? <chenleping at yahoo.cn>
> 
> >  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.
> >
> 
> Exactly as Jed wrote, you can use VecGetArray() to access any local values
> of x.

> > > for following definitions:
> > >
> > > double precision u(n)
> > > Vec  v

Since you are uisng fortran check VecGetArrayF90(). for eg: check
src/vec/vec/examples/tutorials/ex4f90.F

Satish

Reply via email to