diff options
Diffstat (limited to 'src/EHFinder_FindSurface.F90')
-rw-r--r-- | src/EHFinder_FindSurface.F90 | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/EHFinder_FindSurface.F90 b/src/EHFinder_FindSurface.F90 index bbd9521..221d969 100644 --- a/src/EHFinder_FindSurface.F90 +++ b/src/EHFinder_FindSurface.F90 @@ -21,6 +21,10 @@ subroutine EHFinder_FindSurface(CCTK_ARGUMENTS) CCTK_INT :: interp_handle2 character(len=30) :: info_message + character(len=200) :: surface_interp + CCTK_INT :: surface_interp_len + character(len=7) :: surface_order + CCTK_INT, dimension(4) :: bbox CCTK_INT, dimension(2) :: gsh, lsh, lbnd, ubnd, nghost, maxl @@ -398,18 +402,27 @@ subroutine EHFinder_FindSurface(CCTK_ARGUMENTS) rsurf = zero n_since_last_reduction = -1 - ! Get and interpolation handle for Hermite polynomial interpolation. This - ! is used to avoid problems with non-continuous derivatives in the Newton - ! iteration later on. -! call CCTK_InterpHandle ( interp_handle, "Lagrange polynomial interpolation" ) - call CCTK_InterpHandle ( interp_handle, "Hermite polynomial interpolation" ) + ! Get and interpolation handle for required polynomial interpolation. + ! If Lagrange polynomial interpolation does not work try Hermite + ! polynomial interpolation, which avoids problems with non-continuous + ! derivatives in the Newton iteration later on. + + ! First convert the string parameter to a Fortran string. + call CCTK_FortranString ( surface_interp_len, surface_interpolator, & + surface_interp ) + + ! Then get the hande ... + call CCTK_InterpHandle ( interp_handle, surface_interp(1:surface_interp_len) ) + if ( interp_handle .lt. 0 ) then call CCTK_WARN( 0, "Cannot get handle for interpolation. Forgot to activate an implementation providing interpolation operators??" ) end if - ! For now order=2 is hard wired. -! call Util_TableCreateFromString ( table_handle, "order=3" ) - call Util_TableCreateFromString ( table_handle, "order=2" ) + ! Write the required interpolation order parameter into a fortran string. + write(surface_order,'(a6,i1)') 'order=',surface_interpolation_order + + ! Then create a table from the string. + call Util_TableCreateFromString ( table_handle, surface_order ) if ( table_handle .lt. 0 ) then call CCTK_WARN( 0, "Cannot create parameter table for interpolator" ) end if |