<p><b>mperego@fsu.edu</b> 2012-05-22 12:29:36 -0600 (Tue, 22 May 2012)</p><p>BRANCH COMMIT<br>
land_ice<br>
Introduce flag USE_PHG for compiling functions of the Stokes Solver that require PHG library<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/implement_core/src/core_land_ice/Makefile
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/Makefile        2012-05-22 16:27:19 UTC (rev 1928)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/Makefile        2012-05-22 18:29:36 UTC (rev 1929)
@@ -1,10 +1,14 @@
# Check for LifeV
-ifeq "$(LIFEV)" "true"
+ifeq "$(LIFEV)" "true"
LIFEVFLAG = -DUSE_LIFEV
- override CPPFLAGS += $(LIFEVFLAG)
endif # LIFEV IF
+ifeq "$(PHG)" "true"
+ LIFEVFLAG += -DUSE_PHG
+endif # PHG IF
+override CPPFLAGS += $(LIFEVFLAG)
+
.SUFFIXES: .F .o
OBJS =         mpas_land_ice_mpas_core.o \
Modified: branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F
===================================================================
--- branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F        2012-05-22 16:27:19 UTC (rev 1928)
+++ branches/land_ice_projects/implement_core/src/core_land_ice/mpas_land_ice_lifev.F        2012-05-22 18:29:36 UTC (rev 1929)
@@ -101,7 +101,10 @@
!call lifeV and set the grid of the velocity solver
call velocity_solver_init_mpi(domain % dminfo % comm)
-
+#else
+ write(*,*) "LifeV needed to run L1L2, FO and Stokes models"
+ err = 1
+ return
#endif
!--------------------------------------------------------------------
@@ -156,6 +159,10 @@
#ifdef USE_LIFEV
! This call is needed for using any of the LifeV velocity solvers
call velocity_solver_finalize()
+#else
+ write(*,*) "LifeV needed to run L1L2, FO and Stokes models"
+ err = 1
+ return
#endif
!--------------------------------------------------------------------
@@ -266,6 +273,10 @@
        cellsOnEdge, cellsOnVertex, verticesOnCell, verticesOnEdge, xCell, yCell, zCell, &
        sendCellsArray, recvCellsArray, sendEdgesArray, recvEdgesArray, sendVerticesArray, recvVerticesArray)
call mpas_timer_stop("velocity_solver_set_grid_data")
+#else
+ write(*,*) "LifeV needed to run L1L2, FO and Stokes models"
+ err = 1
+ return
#endif
!these can be deallocated because they have been copied on the c++ side
@@ -366,12 +377,18 @@
call velocity_solver_init_FO(LayerThicknessFractions)
call mpas_timer_stop("velocity_solver_init_FO")
case ('Stokes')
+#ifdef USE_PHG
call mpas_timer_start("velocity_solver_extrude_3d_grid")
call velocity_solver_extrude_3d_grid(LayerThicknessFractions, lowerSurface, thickness)
call mpas_timer_stop("velocity_solver_extrude_3d_grid")
call mpas_timer_start("velocity_solver_init_stokes")
call velocity_solver_init_stokes(LayerThicknessFractions)
call mpas_timer_stop("velocity_solver_init_stokes")
+#else
+        write(*,*) "PHG library needed to run stokes"
+        err = 1
+        return
+#endif
end select
endif
@@ -395,11 +412,21 @@
call velocity_solver_export_FO_velocity()
call mpas_timer_stop("velocity_solver export")
case ('Stokes')
- call mpas_timer_start("stokes")
! call stokes
- call mpas_timer_stop("stokes")
+#ifdef USE_PHG
+ call mpas_timer_start("velocity_solver_solve_stokes")
+ call velocity_solver_solve_stokes(lowerSurface, thickness, beta, tracers(index_temperature,:,:), normalVelocity)
+ call mpas_timer_stop("velocity_solver_solve_stokes")
+#else
+        write(*,*) "PHG library needed to run stokes"
+        err = 1
+        return
+#endif
end select
-
+#else
+ write(*,*) "LifeV needed to run L1L2, FO and Stokes models"
+ err = 1
+ return
#endif
!--------------------------------------------------------------------
</font>
</pre>