[petsc-dev] controlling vector values while doing matrix free operations
Matthew Knepley
knepley at gmail.com
Wed Dec 14 19:41:23 CST 2011
On Wed, Dec 14, 2011 at 7:34 PM, Philip, Bobby <philipb at ornl.gov> wrote:
> 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> 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.
>
This uses F (
http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatCreateMFFD.html#MatCreateMFFD),
where are you looking?
>
>
> **
>
> 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?
>
If all you want to do is project to the positive orthant, you can do that
when computing F. If you want
to maintain the convergence rate of the method, you would need something
like SNESVI.
Matt
> 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****
>
--
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/42474124/attachment.html>
More information about the petsc-dev
mailing list