1 2 #include <petsc/private/dmdaimpl.h> /*I "petscdmda.h" I*/ 3 4 /*@C 5 DMDACreatePF - Creates an appropriately dimensioned `PF` mathematical function object 6 from a DMDA. 7 8 Collective on da 9 10 Input Parameter: 11 . da - initial distributed array 12 13 Output Parameter: 14 . pf - the mathematical function object 15 16 Level: advanced 17 18 Fortran Note: 19 Not supported from Fortran 20 21 .seealso: `DM`, `PF`, `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DMCreateGlobalVector()` 22 @*/ 23 PetscErrorCode DMDACreatePF(DM da, PF *pf) 24 { 25 DM_DA *dd = (DM_DA *)da->data; 26 27 PetscFunctionBegin; 28 PetscValidHeaderSpecificType(da, DM_CLASSID, 1, DMDA); 29 PetscValidPointer(pf, 2); 30 PetscCall(PFCreate(PetscObjectComm((PetscObject)da), da->dim, dd->w, pf)); 31 PetscFunctionReturn(PETSC_SUCCESS); 32 } 33