aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qlm_calculate.F902
-rw-r--r--src/qlm_import_surface.F9011
-rw-r--r--src/qlm_paramcheck.F907
3 files changed, 11 insertions, 9 deletions
diff --git a/src/qlm_calculate.F90 b/src/qlm_calculate.F90
index e9b602d..44574c6 100644
--- a/src/qlm_calculate.F90
+++ b/src/qlm_calculate.F90
@@ -55,7 +55,7 @@ subroutine qlm_calculate (CCTK_ARGUMENTS)
end if
if (hn > 0) then
- if (surface_index(hn) == -1) then
+ if (surface_index(hn) == -1 .and. CCTK_EQUALS(surface_name(hn), "")) then
qlm_calc_error(hn) = 1
qlm_have_valid_data(hn) = 0
qlm_have_killing_vector(hn) = 0
diff --git a/src/qlm_import_surface.F90 b/src/qlm_import_surface.F90
index d10b736..18173db 100644
--- a/src/qlm_import_surface.F90
+++ b/src/qlm_import_surface.F90
@@ -21,18 +21,19 @@ subroutine qlm_import_surface (CCTK_ARGUMENTS, hn)
call CCTK_INFO ("Importing surface shape")
end if
- if (surface_index(hn) < 0 .or. surface_index(hn) >= nsurfaces) then
+ if ((surface_index(hn) < 0 .or. surface_index(hn) >= nsurfaces) .and. &
+ CCTK_EQUALS(surface_name(hn), "")) then
call CCTK_WARN (0, "Illegal spherical surface index specified")
end if
+ sn = sf_IdFromName(surface_index(hn), surface_name(hn)) + 1
+
if (verbose/=0 .or. veryverbose/=0) then
- write (msg, '("Importing from spherical surface ",i4)') surface_index(hn)
+ write (msg, '("Importing from spherical surface ",a," ",i4)') &
+ surface_name(hn), sn - 1
call CCTK_INFO (msg)
end if
- sn = surface_index(hn) + 1
-
-
if (qlm_calc_error(hn) == 0 .and. cctk_iteration > qlm_iteration(hn)) then
diff --git a/src/qlm_paramcheck.F90 b/src/qlm_paramcheck.F90
index b8a8b8e..2e910a8 100644
--- a/src/qlm_paramcheck.F90
+++ b/src/qlm_paramcheck.F90
@@ -22,18 +22,19 @@ subroutine qlm_paramcheck (CCTK_ARGUMENTS)
do hn = 1, num_surfaces
- if (surface_index(hn) == -1) then
+ if (surface_index(hn) == -1 .and. CCTK_EQUALS(surface_name(hn),"")) then
! no surface selected; everything is fine
goto 9999
end if
- if (surface_index(hn) < 0 .or. surface_index(hn) >= nsurfaces) then
+ if ((surface_index(hn) < 0 .or. surface_index(hn) >= nsurfaces) .and. &
+ CCTK_EQUALS(surface_name(hn), "")) then
write (msg, '("Illegal surface index specified for surface ",i4," (index is ",i4,", must be less than ",i4,")")') hn-1, surface_index(hn), nsurfaces
call CCTK_PARAMWARN (msg)
goto 9999
end if
- sn = surface_index(hn) + 1
+ sn = sf_IdFromName(surface_index(hn), surface_name(hn)) + 1
! Import surface description
qlm_nghoststheta(hn) = nghoststheta(sn)