[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 507)

rhaas at tapir.caltech.edu rhaas at tapir.caltech.edu
Thu Apr 18 13:30:02 CDT 2013


User: rhaas
Date: 2013/04/18 01:30 PM

Removed:
 /trunk/src/
  make.code.deps

Modified:
 /trunk/src/
  GRHydro_ENOReconstruct.F90, GRHydro_ENOScalars.F90, GRHydro_Scalars.F90, GRHydro_WENOReconstruct.F90, GRHydro_WENOScalars.F90

Log:
 GRHydro: remove make.code.deps, coeffs_allocated, unused includes

File Changes:

Directory: /trunk/src/
======================

File [modified]: GRHydro_ENOReconstruct.F90
Delta lines: +2 -4
===================================================================
--- trunk/src/GRHydro_ENOReconstruct.F90	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/GRHydro_ENOReconstruct.F90	2013-04-18 18:30:02 UTC (rev 507)
@@ -43,11 +43,10 @@
   CCTK_INT :: i, j, l, m, q, allocstat
   CCTK_REAL :: denominator, numerator, numerator_product
 
-  if(.not.coeffs_allocated) then
+  if(.not.allocated(eno_coeffs)) then
      allocate(eno_coeffs(-1:eno_order - 1, 0:eno_order - 1), STAT=allocstat)
 
      if (allocstat .ne. 0) call CCTK_WARN(0, "Failed to allocate ENO coefficient arrays!")
-     coeffs_allocated = .true.
   endif
 
   do i = -1, eno_order - 1
@@ -128,10 +127,9 @@
 
   CCTK_INT :: deallocstat
 
-  if(coeffs_allocated) then
+  if(allocated(eno_coeffs)) then
      deallocate(eno_coeffs, STAT = deallocstat)
      if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate ENO coefficients.")
-     coeffs_allocated = .false.
   endif
 
 end subroutine GRHydro_ENOShutdown

File [modified]: GRHydro_ENOScalars.F90
Delta lines: +0 -4
===================================================================
--- trunk/src/GRHydro_ENOScalars.F90	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/GRHydro_ENOScalars.F90	2013-04-18 18:30:02 UTC (rev 507)
@@ -8,8 +8,6 @@
  @@*/
 
 #include "cctk.h"
-#include "cctk_Parameters.h"
-#include "cctk_Arguments.h"
 
  module GRHydro_ENOScalars
 
@@ -17,6 +15,4 @@
 
    CCTK_REAL, allocatable :: eno_coeffs(:, :)
    
-   logical, save :: coeffs_allocated = .false.
-
  end module GRHydro_ENOScalars

File [modified]: GRHydro_Scalars.F90
Delta lines: +0 -2
===================================================================
--- trunk/src/GRHydro_Scalars.F90	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/GRHydro_Scalars.F90	2013-04-18 18:30:02 UTC (rev 507)
@@ -9,8 +9,6 @@
  @@*/
 
 #include "cctk.h"
-#include "cctk_Parameters.h"
-#include "cctk_Arguments.h"
 
  module GRHydro_Scalars
 

File [modified]: GRHydro_WENOReconstruct.F90
Delta lines: +2 -4
===================================================================
--- trunk/src/GRHydro_WENOReconstruct.F90	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/GRHydro_WENOReconstruct.F90	2013-04-18 18:30:02 UTC (rev 507)
@@ -42,13 +42,12 @@
 
   CCTK_INT :: allocstat
 
-  if(.not.coeffs_allocated) then
+  if(.not.allocated(weno_coeffs)) then ! uses weno_coeffs as a sentinel
      ! Right now we hardcode to 5th order
      allocate(weno_coeffs(3, 5), STAT=allocstat)
      if (allocstat .ne. 0) call CCTK_WARN(0, "Failed to allocate WENO coefficient arrays!")
      allocate(beta_shu(3, 6), STAT=allocstat)
      if (allocstat .ne. 0) call CCTK_WARN(0, "Failed to allocate smoothness indicator stencil coefficient arrays!")
-     coeffs_allocated = .true.
   endif
 
   ! Set stencils
@@ -119,12 +118,11 @@
 
   CCTK_INT :: deallocstat
 
-  if(coeffs_allocated) then
+  if(allocated(weno_coeffs)) then
      deallocate(weno_coeffs, STAT = deallocstat)
      if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate WENO coefficients.")
      deallocate(beta_shu, STAT = deallocstat)
      if (deallocstat .ne. 0) call CCTK_WARN(0, "Failed to deallocate shu smoothness indicator coefficients.")
-     coeffs_allocated = .false.
   endif
 
 end subroutine GRHydro_WENOShutdown

File [modified]: GRHydro_WENOScalars.F90
Delta lines: +0 -4
===================================================================
--- trunk/src/GRHydro_WENOScalars.F90	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/GRHydro_WENOScalars.F90	2013-04-18 18:30:02 UTC (rev 507)
@@ -8,8 +8,6 @@
  @@*/
 
 #include "cctk.h"
-#include "cctk_Parameters.h"
-#include "cctk_Arguments.h"
 
  module GRHydro_WENOScalars
 
@@ -18,6 +16,4 @@
    CCTK_REAL, allocatable :: weno_coeffs(:, :)
    CCTK_REAL, allocatable :: beta_shu(:, :)
    
-   logical, save :: coeffs_allocated = .false.
-
  end module GRHydro_WENOScalars

File [removed]: make.code.deps
Delta lines: +0 -8
===================================================================
--- trunk/src/make.code.deps	2013-04-13 22:31:17 UTC (rev 506)
+++ trunk/src/make.code.deps	2013-04-18 18:30:02 UTC (rev 507)
@@ -1,8 +0,0 @@
-# Module dependencies for thorn GRHydro
-
-GRHydro_ENOReconstruct.F90.o:		GRHydro_ENOScalars.F90.o
-GRHydro_Eigenproblem.F90.o:		GRHydro_Scalars.F90.o
-GRHydro_Eigenproblem_Marquina.F90.o:	GRHydro_Scalars.F90.o
-GRHydro_PreLoop.F90.o:			GRHydro_Scalars.F90.o
-GRHydro_TVDReconstruct.F90.o:		GRHydro_Scalars.F90.o
-GRHydro_SlopeLimiter.F90.o:		GRHydro_Scalars.F90.o



More information about the Commits mailing list