Commits

Richard Mills  committed e722c2f Merge

Automerge.

  • Participants
  • Parent commits 571b6ad, 916b452

Comments (0)

Files changed (1)

File src/pflotran/discretization.F90

                            dm_ptr%ugdm,ndof,option)
       call DMShellCreate(option%mycomm,dm_ptr%dm,ierr)
       call DMShellSetGlobalToLocalVecScatter(dm_ptr%dm,dm_ptr%ugdm%scatter_gtol,ierr)
+      call DMShellSetLocalToGlobalVecScatter(dm_ptr%dm,dm_ptr%ugdm%scatter_ltog,ierr)
+      call DMShellSetLocalToLocalVecScatter(dm_ptr%dm,dm_ptr%ugdm%scatter_ltol,ierr)
   end select
 
 end subroutine DiscretizationCreateDM
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMLocalToGlobalBegin(dm_ptr%dm,local_vec,INSERT_VALUES,global_vec,ierr)
-      call DMLocalToGlobalEnd(dm_ptr%dm,local_vec,INSERT_VALUES,global_vec,ierr)
-   case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterBegin(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec, &
-                           INSERT_VALUES,SCATTER_FORWARD,ierr)
-      call VecScatterEnd(dm_ptr%ugdm%scatter_ltog,local_vec,global_vec, &
-                         INSERT_VALUES,SCATTER_FORWARD,ierr)
-  end select
-  
+  call DMLocalToGlobalBegin(dm_ptr%dm,local_vec,INSERT_VALUES,global_vec,ierr)
+  call DMLocalToGlobalEnd(dm_ptr%dm,local_vec,INSERT_VALUES,global_vec,ierr)
+ 
 end subroutine DiscretizationLocalToGlobal
   
 ! ************************************************************************** !
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMDALocalToLocalBegin(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
-      call DMDALocalToLocalEnd(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
-    case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterBegin(dm_ptr%ugdm%scatter_ltol,local_vec1,local_vec2, &
-                           INSERT_VALUES,SCATTER_FORWARD,ierr)
-      call VecScatterEnd(dm_ptr%ugdm%scatter_ltol,local_vec1,local_vec2, &
-                         INSERT_VALUES,SCATTER_FORWARD,ierr)    
-  end select
+  call DMLocalToLocalBegin(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
+  call DMLocalToLocalEnd(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
   
 end subroutine DiscretizationLocalToLocal
   
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMGlobalToLocalBegin(dm_ptr%dm,global_vec,INSERT_VALUES,local_vec,ierr)
-    case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterBegin(dm_ptr%ugdm%scatter_gtol,global_vec,local_vec, &
-                           INSERT_VALUES,SCATTER_FORWARD,ierr)
-  end select
+  call DMGlobalToLocalBegin(dm_ptr%dm,global_vec,INSERT_VALUES,local_vec,ierr)
   
 end subroutine DiscretizationGlobalToLocalBegin
   
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMGlobalToLocalEnd(dm_ptr%dm,global_vec,INSERT_VALUES,local_vec,ierr)
-    case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterEnd(dm_ptr%ugdm%scatter_gtol,global_vec,local_vec, &
-                         INSERT_VALUES,SCATTER_FORWARD,ierr)
-  end select
-  
+  call DMGlobalToLocalEnd(dm_ptr%dm,global_vec,INSERT_VALUES,local_vec,ierr)
+ 
 end subroutine DiscretizationGlobalToLocalEnd
   
 ! ************************************************************************** !
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMDALocalToLocalBegin(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
-    case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterBegin(dm_ptr%ugdm%scatter_ltol,local_vec1,local_vec2, &
-                           INSERT_VALUES,SCATTER_FORWARD,ierr)
-  end select
+  call DMLocalToLocalBegin(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
 
 end subroutine DiscretizationLocalToLocalBegin
   
   
   dm_ptr => DiscretizationGetDMPtrFromIndex(discretization,dm_index)
   
-  select case(discretization%itype)
-    case(STRUCTURED_GRID,STRUCTURED_GRID_MIMETIC)
-      call DMDALocalToLocalEnd(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
-    case(UNSTRUCTURED_GRID,UNSTRUCTURED_GRID_MIMETIC)
-      call VecScatterEnd(dm_ptr%ugdm%scatter_ltol,local_vec1,local_vec2, &
-                         INSERT_VALUES,SCATTER_FORWARD,ierr)    
-  end select
+  call DMLocalToLocalEnd(dm_ptr%dm,local_vec1,INSERT_VALUES,local_vec2,ierr)
 
 end subroutine DiscretizationLocalToLocalEnd