<p><b>mhoffman@lanl.gov</b> 2012-04-27 09:23:43 -0600 (Fri, 27 Apr 2012)</p><p>BRANCH COMMIT<br>
<br>
Setting the vertexMaskChanged flag to be true for the intital state to ensure that LifeV's mesh 'init' routines get called the first time the LifeV velocity solver is called.<br>
Also removed some code not needed in the mpas sia velocity module.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-27 14:50:39 UTC (rev 1823)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_mpas_core.F        2012-04-27 15:23:43 UTC (rev 1824)
@@ -161,16 +161,19 @@
! Call init routines ====
call land_ice_setup_vertical_coords(mesh)
+
call compute_mesh_scaling(mesh)
-
call mpas_rbf_interp_initialize(mesh)
call mpas_init_reconstruct(mesh)
+
call land_ice_vel_block_init(block, err_tmp)
err = ior(err, err_tmp)
! Initialize state ====
call lice_diagnostic_solve(mesh, state, err)
+ ! Set the initial flag to 1 so LifeV will calculate its mesh information the first time
+ state % vertexMaskChanged % scalar = 1
! Calculate an initial (diagnostic) velocity field consistent with the initial thickness field
! \todo: skip this step if a velocity field was supplied in the I.C. input file
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_sia.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_sia.F        2012-04-27 14:50:39 UTC (rev 1823)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_sia.F        2012-04-27 15:23:43 UTC (rev 1824)
@@ -44,14 +44,8 @@
!
!--------------------------------------------------------------------
- ! halo exchange arrays
- integer, dimension(:), pointer :: sendCellsArray, &
- recvCellsArray, &
- sendVerticesArray, &
- recvVerticesArray, &
- sendEdgesArray, &
- recvEdgesArray
+
!***********************************************************************
contains
@@ -111,44 +105,9 @@
err = 0
- ! Note: the following code assumes that blocklist contains a single block
- ! Significant modification will be needed when multiple blocks per processor
- ! are supported.
- !extract data from domain
- nCellsSolve = domain % blocklist % mesh % nCellsSolve
- nEdgesSolve = domain % blocklist % mesh % nEdgesSolve
- nVerticesSolve = domain % blocklist % mesh % nVerticesSolve
- nCells = domain % blocklist % mesh % nCells
- nEdges = domain % blocklist % mesh % nEdges
- nVertices = domain % blocklist % mesh % nVertices
- nVertLevels = domain % blocklist % mesh % nVertLevels
- cellsOnEdge => domain % blocklist % mesh % cellsOnEdge % array
- cellsOnVertex => domain % blocklist % mesh % cellsOnVertex % array
- verticesOnCell => domain % blocklist % mesh % verticesOnCell % array
- verticesOnEdge => domain % blocklist % mesh % verticesOnEdge % array
-
- xCell => domain % blocklist % mesh % xCell % array
- yCell => domain % blocklist % mesh % yCell % array
- zCell => domain % blocklist % mesh % zCell % array
-
- !allocate(verticesMask(nVertices))
-
- !verticesMask = .true. ! all vertices are part of the domain, since thickness isn't necessarily valid here
-
-
- !build send and receive arrays using exchange_list
-
- call array_from_exchange_list(domain % blocklist % parinfo % verticesToSend, sendVerticesArray)
- call array_from_exchange_list(domain % blocklist % parinfo % verticesToRecv, recvVerticesArray)
- call array_from_exchange_list(domain % blocklist % parinfo % cellsToSend, sendCellsArray)
- call array_from_exchange_list(domain % blocklist % parinfo % cellsToRecv, recvCellsArray)
- call array_from_exchange_list(domain % blocklist % parinfo % edgesToSend, sendEdgesArray)
- call array_from_exchange_list(domain % blocklist % parinfo % edgesToRecv, recvEdgesArray)
-
-
!--------------------------------------------------------------------
end subroutine land_ice_sia_init
@@ -198,12 +157,6 @@
err = 0
- deallocate(sendCellsArray, &
- recvCellsArray, &
- sendVerticesArray, &
- recvVerticesArray, &
- sendEdgesArray, &
- recvEdgesArray)
!--------------------------------------------------------------------
@@ -393,44 +346,8 @@
end subroutine is_edge_ice
- !--------------------------------------------------------------------
- subroutine array_from_exchange_list(exlist, array)
- ! This is identical to the version in land_ice_lifev and should probably put in a common location.
- implicit none
-
- type (exchange_list), pointer, intent(in) :: exlist
- type (exchange_list), pointer :: listPtr
-
- integer, dimension(:), pointer, intent(out) :: array
- integer :: dataSize, offset, i
-
- dataSize = 1 !in first position we will store the size of the vector
- listPtr => exlist
- do while (associated(listPtr))
- dataSize = dataSize + (listPtr % nlist) + 2
- listPtr => listPtr % next
- end do
-
- allocate(array(dataSize))
-
- array(1) = dataSize;
- offset = 2;
- listPtr => exlist
- do while (associated(listPtr))
- array(offset) = listPtr % procID
- offset = offset + 1
- array(offset) = listPtr % nlist
- do i=1,listPtr % nlist
- array(i+offset) = listPtr % list(i) -1
- end do
- offset = offset + listPtr % nlist + 1
- listPtr => listPtr % next
- end do
-
- end subroutine array_from_exchange_list
-
!***********************************************************************
end module land_ice_sia
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F        2012-04-27 14:50:39 UTC (rev 1823)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_time_integration_forwardeuler.F        2012-04-27 15:23:43 UTC (rev 1824)
@@ -144,8 +144,9 @@
else
stateNew % vertexMaskChanged % scalar = 0
endif
+ !print *, 'old flag ', stateOld % vertexMaskChanged % scalar
+ !print *, 'new flag ', stateNew % vertexMaskChanged % scalar
-
! Compute the diagnostic velocity for this time step using the updated (new) state
! Pass in the old velocity to be used as an initial guess for velocity solvers that need one.
normalVelocityNew = normalVelocityOld
</font>
</pre>