Commits

Matt Knepley  committed 7606a07

DM: Fixed DMDASetDim() in examples

  • Participants
  • Parent commits 954b179

Comments (0)

Files changed (4)

File src/dm/examples/tutorials/ex19.c

   /* Build of the DMDA -- 1D -- boundary_none */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"1D -- DM_BOUNDARY_NONE\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 1);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 1);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, 1, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 1);CHKERRQ(ierr);
   /* Build of the DMDA -- 1D -- boundary_ghosted */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"1D -- DM_BOUNDARY_GHOSTED\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 1);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 1);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, 1, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 1D -- boundary_periodic */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"1D -- DM_BOUNDARY_PERIODIC\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 1);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 1);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, 1, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 2D -- boundary_none */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"2D -- DM_BOUNDARY_NONE\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 2);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 2);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 2D -- boundary_ghosted */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"2D -- DM_BOUNDARY_GHOSTED\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 2);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 2);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 2D -- boundary_periodic */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"2D -- DM_BOUNDARY_PERIODIC\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 2);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 2);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, 1);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 3D -- boundary_none */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"3D -- DM_BOUNDARY_NONE\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 3);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, -8);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 3D -- boundary_ghosted */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"3D -- DM_BOUNDARY_GHOSTED\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 3);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, -8);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);
   /* Build of the DMDA -- 3D -- boundary_periodic */
   ierr = PetscPrintf(PETSC_COMM_WORLD,"3D -- DM_BOUNDARY_PERIODIC\n");CHKERRQ(ierr);
   ierr = DMDACreate(PETSC_COMM_WORLD, &da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da, 3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da, 3);CHKERRQ(ierr);
   ierr = DMDASetSizes(da, -8, -8, -8);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC);CHKERRQ(ierr);
   ierr = DMDASetDof(da, 2);CHKERRQ(ierr);

File src/ksp/ksp/examples/tests/ex32.c

   ierr = PetscOptionsGetBool(NULL,"-trans",&trans,NULL);CHKERRQ(ierr);
 
   ierr = DMDACreate(PETSC_COMM_WORLD,&da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da,3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da,3);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetStencilType(da,DMDA_STENCIL_STAR);CHKERRQ(ierr);
   ierr = DMDASetSizes(da,M,M,M);CHKERRQ(ierr);

File src/ksp/ksp/examples/tests/ex35.c

   ierr = PetscOptionsGetInt(NULL,"-dof",&dof,NULL);CHKERRQ(ierr);
 
   ierr = DMDACreate(PETSC_COMM_WORLD,&da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da,3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da,3);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetStencilType(da,DMDA_STENCIL_STAR);CHKERRQ(ierr);
   ierr = DMDASetSizes(da,3,3,3);CHKERRQ(ierr);

File src/mat/examples/tests/ex129.c

   ierr = PetscOptionsGetInt(NULL,"-M",&M,NULL);CHKERRQ(ierr);
 
   ierr = DMDACreate(PETSC_COMM_WORLD,&da);CHKERRQ(ierr);
-  ierr = DMDASetDim(da,3);CHKERRQ(ierr);
+  ierr = DMSetDimension(da,3);CHKERRQ(ierr);
   ierr = DMDASetBoundaryType(da,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE);CHKERRQ(ierr);
   ierr = DMDASetStencilType(da,DMDA_STENCIL_STAR);CHKERRQ(ierr);
   ierr = DMDASetSizes(da,M,M,M);CHKERRQ(ierr);