Actual source code: dapf.c
2: #include <petsc/private/dmdaimpl.h>
4: /*@C
5: DMDACreatePF - Creates an appropriately dimensioned `PF` mathematical function object
6: from a `DMDA`.
8: Collective; No Fortran Support
10: Input Parameter:
11: . da - initial distributed array
13: Output Parameter:
14: . pf - the mathematical function object
16: Level: advanced
18: .seealso: `DM`, `PF`, `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DMCreateGlobalVector()`
19: @*/
20: PetscErrorCode DMDACreatePF(DM da, PF *pf)
21: {
22: DM_DA *dd = (DM_DA *)da->data;
24: PetscFunctionBegin;
27: PetscCall(PFCreate(PetscObjectComm((PetscObject)da), da->dim, dd->w, pf));
28: PetscFunctionReturn(PETSC_SUCCESS);
29: }