Re: [petsc-users] SNESFunction undefined reference

2014-04-10 Thread Matthew Knepley
On Thu, Apr 10, 2014 at 7:12 AM, Xiangdong 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/manua

Re: [petsc-users] SNESFunction undefined reference

2014-04-10 Thread Xiangdong
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 http://www.mcs.anl.gov/petsc/petsc-

Re: [petsc-users] SNESFunction undefined reference

2014-04-09 Thread Barry Smith
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 wrote: > > > > On Wed, Apr 9, 2014 at 11:40 AM, Matthew Knepley wrote: > On W

Re: [petsc-users] SNESFunction undefined reference

2014-04-09 Thread Matthew Knepley
On Wed, Apr 9, 2014 at 11:37 AM, Xiangdong wrote: > > On Wed, Apr 9, 2014 at 11:40 AM, Matthew Knepley wrote: > >> On Wed, Apr 9, 2014 at 10:38 AM, Xiangdong wrote: >> >>> Hello everyone, >>> >>> When add this line to src/ex3.c >>> >>> SNESFunction(snes,x,fval,&ctx); >>> >>> The compiler complai

Re: [petsc-users] SNESFunction undefined reference

2014-04-09 Thread Xiangdong
On Wed, Apr 9, 2014 at 11:40 AM, Matthew Knepley wrote: > On Wed, Apr 9, 2014 at 10:38 AM, Xiangdong 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

Re: [petsc-users] SNESFunction undefined reference

2014-04-09 Thread Matthew Knepley
On Wed, Apr 9, 2014 at 10:38 AM, Xiangdong 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 S

[petsc-users] SNESFunction undefined reference

2014-04-09 Thread Xiangdong
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? Thank you. Xian