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 on da

 10:    Input Parameter:
 11: .  da - initial distributed array

 13:    Output Parameter:
 14: .  pf - the mathematical function object

 16:    Level: advanced

 18:    Fortran Note:
 19:    Not supported from Fortran

 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;

 29:   PFCreate(PetscObjectComm((PetscObject)da), da->dim, dd->w, pf);
 30:   return 0;
 31: }