From 08d079459d73a842a006a66141aac494ecfd95cc Mon Sep 17 00:00:00 2001 From: ryoji Date: Fri, 16 Feb 2001 19:37:54 +0000 Subject: For new interp. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/DistortedBHIVP/trunk@18 971fb155-194f-0410-9daf-e2eca44e59f5 --- param.ccl | 4 ++++ src/DistortedBHIVP.F | 25 +++++++++++++++++++++---- test/test_dbh.par | 4 ++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/param.ccl b/param.ccl index 0aaf501..3ad9d25 100644 --- a/param.ccl +++ b/param.ccl @@ -61,5 +61,9 @@ INT nphi "Eta resolution for solve" *:* :: "No restriction" } 5 +INT interpolation_order "Order for interpolation" STEERABLE = ALWAYS +{ + 1:3 :: "Choose between first, second, and third-order" +} 1 diff --git a/src/DistortedBHIVP.F b/src/DistortedBHIVP.F index d01d10f..a57e53a 100644 --- a/src/DistortedBHIVP.F +++ b/src/DistortedBHIVP.F @@ -565,14 +565,31 @@ c Compute eta,q,phi at the each points of cartesian grid enddo enddo - call CCTK_InterpHandle (handle, "simple_local") npoints = nx*ny*nz - call CCTK_Interp (ierror,cctkGH,handle,npoints,3,10,10, - $ ne,nq,np,abseta,q,phi, +! Interpolator handle. + + handle = -1 + + if (interpolation_order .eq. 1) then + call CCTK_InterpHandle (handle, "first-order uniform cartesian") + else if (interpolation_order .eq. 2) then + call CCTK_InterpHandle (handle, "second-order uniform cartesian") + else if (interpolation_order .eq. 3) then + call CCTK_InterpHandle (handle, "third-order uniform cartesian") + endif + + if (handle .lt. 0) then + call CCTK_WARN (0, "Couldn't get handle for interpolation operator") + endif + + + call CCTK_InterpLocal (ierror,cctkGH,handle,npoints,3,10,10, + $ ne,nq,np,etagrd,qgrd,phigrd-pi, + $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL, + $ abseta,q,phi, $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL, - $ etagrd(1),qgrd(1),phigrd(1)-pi,deta,dq,dphi, $ psisph,detapsisph,dqpsisph,dphipsisph,detaetapsisph, $ detaqpsisph,detaphipsisph,dqqpsisph,dqphipsisph,dphiphipsisph, $ CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL,CCTK_VARIABLE_REAL, diff --git a/test/test_dbh.par b/test/test_dbh.par index b4eabc8..bdb7e86 100755 --- a/test/test_dbh.par +++ b/test/test_dbh.par @@ -2,7 +2,7 @@ #!DESC "Initial data for axisymmetric distored black hole" ###################################################################### -ActiveThorns = "time iobasic ADMconstraints pugh pughreduce pughslab interp cartgrid3d einstein ADM DistortedBHIVP ioascii ioutil" +ActiveThorns = "time iobasic ADMconstraints pugh pughreduce pughslab pughinterp cartgrid3d einstein ADM DistortedBHIVP ioascii ioutil" # GENERAL @@ -37,7 +37,7 @@ distortedbhivp::n = 4 distortedbhivp::neta = 102 distortedbhivp::ntheta = 27 distortedbhivp::nphi = 5 -interp::order = 1 +distortedbhivp::interpolation_order = 1 # GAUGE -- cgit v1.2.3