[petsc-users] A flag for FormFunction.
Barry Smith
bsmith at mcs.anl.gov
Thu Jan 14 09:29:33 CST 2010
There really isn't a mechanism to know by whom a function is called.
Do you want this so you know when the function is being called
directly vs when it is being called in computing a Jacobian derivative
with finite differencing? Do you want the function to do something
different in the two cases?
Barry
On Jan 14, 2010, at 9:14 AM, (Rebecca) Xuefei YUAN wrote:
> Dear all,
>
> I would like to setup a flag for the FormFunction like:
>
> if (FormFunction is called by SNESComputeFunction){
> flag = 1;
> }else{
> flag = 0;
> }
>
> Is there any way I can know which function called FormFunction? I
> can tell very clear in debug mode, but I need this information in
> the code.
>
> Thanks very much!
>
> Rebecca
>
More information about the petsc-users
mailing list