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