Commits

Richard Mills committed d78e899

Finished converting DMDALocalToLocalBegin()/End() to internal functions (DMLocalToLocalBegin()/End() should now be used) and deprecated this interface.

  • Participants
  • Parent commits 6373109
  • Branches rmills/dm-localtolocal

Comments (0)

Files changed (6)

File include/petscdm.h

 PETSC_EXTERN PetscErrorCode DMGlobalToLocalEnd(DM,Vec,InsertMode,Vec);
 PETSC_EXTERN PetscErrorCode DMLocalToGlobalBegin(DM,Vec,InsertMode,Vec);
 PETSC_EXTERN PetscErrorCode DMLocalToGlobalEnd(DM,Vec,InsertMode,Vec);
+PETSC_EXTERN PetscErrorCode DMLocalToLocalBegin(DM,Vec,InsertMode,Vec);
+PETSC_EXTERN PetscErrorCode DMLocalToLocalEnd(DM,Vec,InsertMode,Vec);
 PETSC_EXTERN PetscErrorCode DMConvert(DM,DMType,DM*);
 
 PETSC_EXTERN PetscErrorCode DMGetCoordinateDM(DM,DM*);

File include/petscdmda.h

 PETSC_EXTERN PetscErrorCode DMDAGlobalToNaturalEnd(DM,Vec,InsertMode,Vec);
 PETSC_EXTERN PetscErrorCode DMDANaturalToGlobalBegin(DM,Vec,InsertMode,Vec);
 PETSC_EXTERN PetscErrorCode DMDANaturalToGlobalEnd(DM,Vec,InsertMode,Vec);
-PETSC_EXTERN PetscErrorCode DMDALocalToLocalBegin(DM,Vec,InsertMode,Vec);
-PETSC_EXTERN PetscErrorCode DMDALocalToLocalEnd(DM,Vec,InsertMode,Vec);
+PETSC_DEPRECATED("Use DMLocalToLocalBegin()") PETSC_STATIC_INLINE PetscErrorCode DMDALocalToLocalBegin(DM dm,Vec g,InsertMode mode,Vec l) {return DMLocalToLocalBegin(dm,g,mode,l);}
+PETSC_DEPRECATED("Use DMLocalToLocalEnd()") PETSC_STATIC_INLINE PetscErrorCode DMDALocalToLocalEnd(DM dm,Vec g,InsertMode mode,Vec l) {return DMLocalToLocalEnd(dm,g,mode,l);}
 PETSC_EXTERN PetscErrorCode DMDACreateNaturalVector(DM,Vec *);
 
 PETSC_EXTERN PetscErrorCode DMDAGetCorners(DM,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*);

File src/dm/impls/da/dacreate.c

 extern PetscErrorCode  DMGlobalToLocalEnd_DA(DM,Vec,InsertMode,Vec);
 extern PetscErrorCode  DMLocalToGlobalBegin_DA(DM,Vec,InsertMode,Vec);
 extern PetscErrorCode  DMLocalToGlobalEnd_DA(DM,Vec,InsertMode,Vec);
+extern PetscErrorCode  DMLocalToLocalBegin_DA(DM,Vec,InsertMode,Vec);
+extern PetscErrorCode  DMLocalToLocalEnd_DA(DM,Vec,InsertMode,Vec);
 extern PetscErrorCode  DMCreateInterpolation_DA(DM,DM,Mat*,Vec*);
 extern PetscErrorCode  DMCreateColoring_DA(DM,ISColoringType,MatType,ISColoring*);
 extern PetscErrorCode  DMCreateMatrix_DA(DM,MatType,Mat*);
   da->ops->globaltolocalend            = DMGlobalToLocalEnd_DA;
   da->ops->localtoglobalbegin          = DMLocalToGlobalBegin_DA;
   da->ops->localtoglobalend            = DMLocalToGlobalEnd_DA;
+  da->ops->localtolocalbegin           = DMLocalToLocalBegin_DA;
+  da->ops->localtolocalend             = DMLocalToLocalEnd_DA;
   da->ops->createglobalvector          = DMCreateGlobalVector_DA;
   da->ops->createlocalvector           = DMCreateLocalVector_DA;
   da->ops->createinterpolation         = DMCreateInterpolation_DA;

File src/dm/impls/da/daltol.c

 #include <petsc-private/dmdaimpl.h>    /*I   "petscdmda.h"   I*/
 
 #undef __FUNCT__
-#define __FUNCT__ "DMDALocalToLocalCreate"
+#define __FUNCT__ "DMLocalToLocalCreate_DA"
 /*
-   DMDALocalToLocalCreate - Creates the local to local scatter
+   DMLocalToLocalCreate_DA - Creates the local to local scatter
 
    Collective on DMDA
 
 .  da - the distributed array
 
 */
-PetscErrorCode  DMDALocalToLocalCreate(DM da)
+PetscErrorCode  DMLocalToLocalCreate_DA(DM da)
 {
   PetscErrorCode ierr;
   PetscInt       *idx,left,j,count,up,down,i,bottom,top,k;
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "DMDALocalToLocalBegin"
-/*@
-   DMDALocalToLocalBegin - Maps from a local vector (including ghost points
+#define __FUNCT__ "DMLocalToLocalBegin_DA"
+/*
+   DMLocalToLocalBegin_DA - Maps from a local vector (including ghost points
    that contain irrelevant values) to another local vector where the ghost
-   points in the second are set correctly. Must be followed by DMDALocalToLocalEnd().
+   points in the second are set correctly. Must be followed by DMLocalToLocalEnd_DA().
 
    Neighbor-wise Collective on DMDA and Vec
 
    Output Parameter:
 .  l  - the local vector with correct ghost values
 
-   Level: intermediate
-
    Notes:
    The local vectors used here need not be the same as those
    obtained from DMCreateLocalVector(), BUT they
    must have the same parallel data layout; they could, for example, be
    obtained with VecDuplicate() from the DMDA originating vectors.
 
-.keywords: distributed array, local-to-local, begin
-
-.seealso: DMDALocalToLocalEnd(), DMLocalToGlobalBegin()
-@*/
-PetscErrorCode  DMDALocalToLocalBegin(DM da,Vec g,InsertMode mode,Vec l)
+*/
+PetscErrorCode  DMLocalToLocalBegin_DA(DM da,Vec g,InsertMode mode,Vec l)
 {
   PetscErrorCode ierr;
   DM_DA          *dd = (DM_DA*)da->data;
   PetscFunctionBegin;
   PetscValidHeaderSpecific(da,DM_CLASSID,1);
   if (!dd->ltol) {
-    ierr = DMDALocalToLocalCreate(da);CHKERRQ(ierr);
+    ierr = DMLocalToLocalCreate_DA(da);CHKERRQ(ierr);
   }
   ierr = VecScatterBegin(dd->ltol,g,l,mode,SCATTER_FORWARD);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 #undef __FUNCT__
-#define __FUNCT__ "DMDALocalToLocalEnd"
-/*@
-   DMDALocalToLocalEnd - Maps from a local vector (including ghost points
+#define __FUNCT__ "DMLocalToLocalEnd_DA"
+/*
+   DMLocalToLocalEnd_DA - Maps from a local vector (including ghost points
    that contain irrelevant values) to another local vector where the ghost
    points in the second are set correctly.  Must be preceeded by
-   DMDALocalToLocalBegin().
+   DMLocalToLocalBegin_DA().
 
    Neighbor-wise Collective on DMDA and Vec
 
    Output Parameter:
 .  l  - the local vector with correct ghost values
 
-   Level: intermediate
-
    Note:
    The local vectors used here need not be the same as those
    obtained from DMCreateLocalVector(), BUT they
    must have the same parallel data layout; they could, for example, be
    obtained with VecDuplicate() from the DMDA originating vectors.
 
-.keywords: distributed array, local-to-local, end
-
-.seealso: DMDALocalToLocalBegin(), DMLocalToGlobalBegin()
-@*/
-PetscErrorCode  DMDALocalToLocalEnd(DM da,Vec g,InsertMode mode,Vec l)
+*/
+PetscErrorCode  DMLocalToLocalEnd_DA(DM da,Vec g,InsertMode mode,Vec l)
 {
   PetscErrorCode ierr;
   DM_DA          *dd = (DM_DA*)da->data;

File src/dm/impls/da/dascatter.c

 */
 
 #include <petsc-private/dmdaimpl.h>    /*I   "petscdmda.h"   I*/
-extern PetscErrorCode DMDALocalToLocalCreate(DM);
+extern PetscErrorCode DMLocalToLocalCreate_DA(DM);
 
 #undef __FUNCT__
 #define __FUNCT__ "DMDAGetScatter"
   if (gtol) *gtol = dd->gtol;
   if (ltol) {
     if (!dd->ltol) {
-      ierr = DMDALocalToLocalCreate(da);CHKERRQ(ierr);
+      ierr = DMLocalToLocalCreate_DA(da);CHKERRQ(ierr);
     }
     *ltol = dd->ltol;
   }

File src/dm/interface/dm.c

 /*@
    DMLocalToLocalBegin - Maps from a local vector (including ghost points
    that contain irrelevant values) to another local vector where the ghost
-   points in the second are set correctly. Must be followed by DMDALocalToLocalEnd().
+   points in the second are set correctly. Must be followed by DMLocalToLocalEnd().
 
    Neighbor-wise Collective on DM and Vec
 
 /*@
    DMLocalToLocalEnd - Maps from a local vector (including ghost points
    that contain irrelevant values) to another local vector where the ghost
-   points in the second are set correctly. Must be preceded by DMDALocalToLocalBegin().
+   points in the second are set correctly. Must be preceded by DMLocalToLocalBegin().
 
    Neighbor-wise Collective on DM and Vec