History log of /petsc/src/snes/tutorials/ex4.c (Results 1 – 7 of 7)
Revision Date Author Comments
# 732aec7a 22-Sep-2024 Satish Balay <balay@mcs.anl.gov>

Merge branch 'jolivet/remove-cast' into 'main'

Use NULL or nullptr instead of casted 0

See merge request petsc/petsc!7857


# c8025a54 21-Sep-2024 Pierre Jolivet <pierre@joliv.et>

Use NULL or nullptr instead of casted 0


# c7fbd2bd 02-Feb-2024 Satish Balay <balay@mcs.anl.gov>

Merge branch 'barry/2024-01-19/typedef-snes-functions' into 'main'

add typedef for functions passed to SNESSetFunction() etc to match approach in TS

See merge request petsc/petsc!7206


# 8434afd1 02-Feb-2024 Barry Smith <bsmith@mcs.anl.gov>

Change the use of the _Fn suffix to indicate a typedef of a function to just Fn

As determined on a vote on GitLab


# 9bcc50f1 20-Jan-2024 Barry Smith <bsmith@mcs.anl.gov>

add typedef for functions passed to SNESSetFunction() etc to match approach in TS

I never liked Jed's use of typedef for function prototypes for a couple of reasons

1) you don't see immediately tha

add typedef for functions passed to SNESSetFunction() etc to match approach in TS

I never liked Jed's use of typedef for function prototypes for a couple of reasons

1) you don't see immediately that the argument to the function is a function pointer instead of standard variable when looking at source
2) you don't see at the exact location in the code the prototype of the function being passed in

but there is something to say for using these typedefs so

I've prototyped the change for SNES but slightly differently than what Jed did for TS

1) I append the typedef with _Ftn to mark that it is a function (helping to relieve the problem 1 above)
2) I made the typedef to be for a function, not a function pointer so it can also be used directly for things like

PETSC_EXTERN SNESJacobian_Ftn SNESComputeJacobianDefault;

I think the TS usage could be switched to this style without user code breakage, and deprecate the current TS typedef

Thoughts?

Just do SNES the same way as TS and live with less clarity?

show more ...


# c8629ca8 17-Dec-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'stefanozampini/minsurf-local' into 'main'

Improve support for nonlinear domain decomposition solvers

See merge request petsc/petsc!7084


# 777c4855 22-Nov-2023 Stefano Zampini <stefano.zampini@gmail.com>

SNES: add test for minimal surface with DMDASNESLocal interface