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 Not supported from Fortran 19 20 .seealso: `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DMCreateGlobalVector()` 21 @*/ 22 PetscErrorCode DMDACreatePF(DM da,PF *pf) 23 { 24 DM_DA *dd = (DM_DA*)da->data; 25 26 PetscFunctionBegin; 27 PetscValidHeaderSpecificType(da,DM_CLASSID,1,DMDA); 28 PetscValidPointer(pf,2); 29 PetscCall(PFCreate(PetscObjectComm((PetscObject)da),da->dim,dd->w,pf)); 30 PetscFunctionReturn(0); 31 } 32