<p><b>ringler@lanl.gov</b> 2011-03-23 16:27:25 -0600 (Wed, 23 Mar 2011)</p><p><br>
check point for solver<br>
</p><hr noshade><pre><font color="gray">Modified: branches/pv_based_swm/mpas/src/operators/module_poisson_solver.F
===================================================================
--- branches/pv_based_swm/mpas/src/operators/module_poisson_solver.F        2011-03-23 21:50:35 UTC (rev 762)
+++ branches/pv_based_swm/mpas/src/operators/module_poisson_solver.F        2011-03-23 22:27:25 UTC (rev 763)
@@ -3,10 +3,11 @@
   use grid_types
   use configure
   use constants
+  use dmpar
 
   implicit none
 
-  public :: init_poisson, gs_iteration
+  public :: init_poisson, gs_iteration, poisson
 
   contains
 
@@ -53,6 +54,46 @@
   end subroutine init_poisson
 
 
+  subroutine poisson(domain)
+
+    implicit none
+
+    type (domain_type), intent(inout) :: domain
+
+    integer :: iteration
+    logical :: converge
+    type (block_type), pointer :: block
+  
+    iteration = 0
+    converge = .false.
+
+    do while (.not.converge)
+    iteration = iteration + 1
+
+    block =&gt; domain % blocklist
+    do while (associated(block))
+
+       call gs_iteration(1, block % state % time_levs(2) % state, block % mesh)
+
+       if(mod(iteration,100).eq.0) call compute_poisson_error(block % state % time_levs(2) % state, block % mesh, converge)
+
+       call dmpar_exch_halo_field2dReal(domain % dminfo, block % state % time_levs(2) % state % psi % array(:,:), &amp;
+                                            block % mesh % nVertLevels, block % mesh % nCells, &amp;
+                                            block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+
+       call dmpar_exch_halo_field2dReal(domain % dminfo, block % state % time_levs(2) % state % chi % array(:,:), &amp;
+                                            block % mesh % nVertLevels, block % mesh % nCells, &amp;
+                                            block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+
+       block =&gt; block % next
+
+    end do
+  
+    end do
+
+  end subroutine poisson
+
+
   subroutine gs_iteration(nIter, state, grid)
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   ! Purpose: do nIter iteration using Guass Seidel to solve
@@ -116,4 +157,60 @@
 
   end subroutine gs_iteration
 
+
+
+  subroutine compute_poisson_error(state, grid, converge)
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  ! Purpose: compute error in poisson solver
+  !
+  ! Input: psi, chi, vorticity and divergence
+  !
+  ! Output: converge (true or false)
+  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+    implicit none
+
+    type (state_type), intent(in) :: state
+    type (mesh_type), intent(in) :: grid
+    logical, intent(out) :: converge
+
+    integer :: nCellsSolve
+    integer, dimension(:), pointer :: nEdgesOnCell
+    integer, dimension(:,:), pointer :: cellsOnCell
+    integer :: iCell, jCell, iter, k, j, nVertLevels
+    real (kind=RKIND), dimension(:), pointer :: areaCell
+    real (kind=RKIND), dimension(:,:), pointer :: vorticity, divergence, psi, chi
+    real (kind=RKIND), dimension(:,:), pointer :: poisson_weights
+    real (kind=RKIND) :: error_psi, error_chi
+
+    cellsOnCell   =&gt; grid % cellsOnCell % array
+    nEdgesOnCell  =&gt; grid % nEdgesOnCell % array
+    areaCell      =&gt; grid % areaCell % array
+    nCellsSolve   =  grid % nCellsSolve
+    nVertLevels   =  grid % nVertLevels
+
+    vorticity  =&gt; state % vorticity % array
+    divergence =&gt; state % divergence % array
+    psi        =&gt; state % psi % array
+    chi        =&gt; state % vorticity % array
+
+
+    error_psi = 0.0; error_chi = 0.0
+    do iCell=1,nCellsSolve
+
+
+
+
+
+
+    enddo
+    
+
+
+
+    converge = .false.
+
+
+  end subroutine compute_poisson_error
+
 end module poisson_solver

</font>
</pre>