aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2013-04-18 18:30:02 +0000
committerrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2013-04-18 18:30:02 +0000
commitf472b6ed6ed46b64bad1c32901e2619f71cbeb3c (patch)
tree8b6a89cc4346b2cd7cbec8c29abcd542287368d2
parent69594ec9302a4787bcf82ebe22873a84dc45c15f (diff)
GRHydro: remove make.code.deps, coeffs_allocated, unused includes
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@507 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r--src/GRHydro_ENOReconstruct.F906
-rw-r--r--src/GRHydro_ENOScalars.F904
-rw-r--r--src/GRHydro_Scalars.F902
-rw-r--r--src/GRHydro_WENOReconstruct.F906
-rw-r--r--src/GRHydro_WENOScalars.F904
-rw-r--r--src/make.code.deps8
6 files changed, 4 insertions, 26 deletions
diff --git a/src/GRHydro_ENOReconstruct.F90 b/src/GRHydro_ENOReconstruct.F90
index 169af04..49ca734 100644
--- a/src/GRHydro_ENOReconstruct.F90
+++ b/src/GRHydro_ENOReconstruct.F90
@@ -43,11 +43,10 @@ subroutine GRHydro_ENOSetup(CCTK_ARGUMENTS)
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 @@ subroutine GRHydro_ENOShutdown(CCTK_ARGUMENTS)
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
diff --git a/src/GRHydro_ENOScalars.F90 b/src/GRHydro_ENOScalars.F90
index 7815347..eab1a97 100644
--- a/src/GRHydro_ENOScalars.F90
+++ b/src/GRHydro_ENOScalars.F90
@@ -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
diff --git a/src/GRHydro_Scalars.F90 b/src/GRHydro_Scalars.F90
index 37d4626..0bc658f 100644
--- a/src/GRHydro_Scalars.F90
+++ b/src/GRHydro_Scalars.F90
@@ -9,8 +9,6 @@
@@*/
#include "cctk.h"
-#include "cctk_Parameters.h"
-#include "cctk_Arguments.h"
module GRHydro_Scalars
diff --git a/src/GRHydro_WENOReconstruct.F90 b/src/GRHydro_WENOReconstruct.F90
index 5f368c0..64b5d18 100644
--- a/src/GRHydro_WENOReconstruct.F90
+++ b/src/GRHydro_WENOReconstruct.F90
@@ -42,13 +42,12 @@ subroutine GRHydro_WENOSetup(CCTK_ARGUMENTS)
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 @@ subroutine GRHydro_WENOShutdown(CCTK_ARGUMENTS)
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
diff --git a/src/GRHydro_WENOScalars.F90 b/src/GRHydro_WENOScalars.F90
index 2aee7f1..804a9ad 100644
--- a/src/GRHydro_WENOScalars.F90
+++ b/src/GRHydro_WENOScalars.F90
@@ -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
diff --git a/src/make.code.deps b/src/make.code.deps
deleted file mode 100644
index ac36140..0000000
--- a/src/make.code.deps
+++ /dev/null
@@ -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