[petsc-users] SNESFunction undefined reference
Matthew Knepley
knepley at gmail.com
Thu Apr 10 07:16:17 CDT 2014
On Thu, Apr 10, 2014 at 7:12 AM, Xiangdong <epscodes at gmail.com> wrote:
> I thought it has the same functionality as SNESComputeFunction, but can
> take one more argument ctx.
>
> From the manual pages, SNESFunction and SNESComputeFunction are very
> similar:
>
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESFunction.html
>
This is a manpage for a typedef. We have removed the typedef in the next
release to avoid confusion.
Matt
>
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESComputeFunction.html
>
> Thanks.
>
> Xiangdong
>
>
>
> On Wed, Apr 9, 2014 at 2:15 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>> SNESFunction is not a function. What do you think it is suppose to
>> compute? You provide a function for evaluating the nonlinear function with
>> SNESSetFunction().
>>
>> Barry
>>
>> On Apr 9, 2014, at 11:37 AM, Xiangdong <epscodes at gmail.com> wrote:
>>
>> >
>> >
>> >
>> > On Wed, Apr 9, 2014 at 11:40 AM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>> > On Wed, Apr 9, 2014 at 10:38 AM, Xiangdong <epscodes at gmail.com> wrote:
>> > Hello everyone,
>> >
>> > When add this line to src/ex3.c
>> >
>> > SNESFunction(snes,x,fval,&ctx);
>> >
>> > The compiler complains that undefined reference to `SNESFunction'.
>> >
>> > However, all other snes function calls in ex3 work well. Why is it
>> special for SNESFunction?
>> >
>> > Any suggestions to fix this problem?
>> >
>> > Do you want SNESComputeFunction() ?
>> >
>> > Yes, SNESComputeFunction() works.
>> >
>> > It seems that SNESFunction() can takes one more input argument ctx. Is
>> this function disabled in current release or just a bug in the header file?
>> >
>> > Thanks.
>> >
>> > Xiangdong
>> >
>> >
>> >
>> > Matt
>> >
>> > Thank you.
>> >
>> > Xiangdong
>> >
>> >
>> >
>> > --
>> > 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-users/attachments/20140410/1045d6a3/attachment.html>
More information about the petsc-users
mailing list