yep, that's a cut and paste bug. "user" is a common name for a user context.
On Tue, Dec 12, 2023 at 11:17 PM Sanjay Govindjee via petsc-users < petsc-users@mcs.anl.gov> wrote: > did you mean to write > > type (userctx) ctx > > in this example? > > > subroutine func(snes, x, f, ctx, ierr) > SNES snes > Vec x,f > type (userctx) user > PetscErrorCode ierr > ... > > external func > SNESSetFunction(snes, r, func, ctx, ierr) > SNES snes > Vec r > PetscErrorCode ierr > type (userctx) user > > > > > On Tue, Dec 12, 2023 at 7:10 PM Barry Smith <bsm...@petsc.dev> wrote: > >> >> See >> https://petsc.gitlab.io/-/petsc/-/jobs/5739238224/artifacts/public/html/manual/fortran.html#ch-fortran >> and https://gitlab.com/petsc/petsc/-/merge_requests/7114 >> >> >> >> On Dec 12, 2023, at 3:22 PM, Palmer, Bruce J via petsc-users < >> petsc-users@mcs.anl.gov> wrote: >> >> What do you do with something like a void pointer? I’m looking at the >> TaoSetObjectiveAndGradient function and it wants to pass a void *ctx >> pointer. You can set this to null, but apparently you have to specify the >> type. What type should I use? Is there something called PETSC_NULL_VOID or >> PETSC_NULL_CONTEXT or do I use something else? >> >> >> *From: *Matthew Knepley <knep...@gmail.com> >> *Date: *Tuesday, December 12, 2023 at 8:33 AM >> *To: *Palmer, Bruce J <bruce.pal...@pnnl.gov> >> *Cc: *petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov> >> *Subject: *Re: [petsc-users] Fortran Interface >> Check twice before you click! This email originated from outside PNNL. >> >> On Tue, Dec 12, 2023 at 11:27 AM Palmer, Bruce J via petsc-users < >> petsc-users@mcs.anl.gov> wrote: >> >> Does documentation for the PETSc fortran interface still exist? I looked >> at the web pages for 3.20 (petsc.org/release) but if you go under the >> tab C/Fortran API, only descriptions for the C interface are there. >> >> >> I think after the most recent changes, the interface was supposed to be >> very close to C, so we just document the differences on specific pages, and >> put the general stuff here: >> >> https://petsc.org/release/manual/fortran/ >> >> Thanks, >> >> Matt >> >> >> Bruce Palmer >> >> >> >> -- >> 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 >> >> https://www.cse.buffalo.edu/~knepley/ >> <http://www.cse.buffalo.edu/~knepley/> >> >> >>