[petsc-dev] controlling vector values while doing matrix free operations

Philip, Bobby philipb at ornl.gov
Wed Dec 14 19:34:43 CST 2011


Matt:


From: petsc-dev-bounces at mcs.anl.gov [mailto:petsc-dev-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley
Sent: Wednesday, December 14, 2011 5:15 PM
To: For users of the development version of PETSc
Subject: Re: [petsc-dev] controlling vector values while doing matrix free operations

On Wed, Dec 14, 2011 at 4:07 PM, Philip, Bobby <philipb at ornl.gov<mailto:philipb at ornl.gov>> wrote:
Hi:

When doing the following operation in PETSc using FD approximations to a  Jacobian vector product

J'(u)*a = [J(u+h*a) - J(u)]/h

Usually, we would put in F where you have J.

Actually this is taken from PETSc documentation so you may want to modify it. I normally do use F also.


is there a way for the user to specify that the entries of u+h*a cannot be negative for example?
Browsing the PETSc documentation it was not obvious whether I could do this.

You can do whatever you want in your F function, but you should really investigate SNESVI if
you have bounds on your variables.

I do indeed control F and u but I do not control h*a. This is determined by PETSc. Hence the possibility
exists that u+h*a is outside the domain of the function. This is what I would like to control. Being able to
check whether u+h*a lies in the domain of the function and then potentially modifying it so it does much
in the flavor of the LineSearchPost and PreCheck functions. Any suggestions?

  Thanks,

     Matt

Thanks,
Bobby



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111214/fbd4c521/attachment.html>


More information about the petsc-dev mailing list