diff options
Diffstat (limited to 'src/pointwise2.F90')
-rw-r--r-- | src/pointwise2.F90 | 130 |
1 files changed, 87 insertions, 43 deletions
diff --git a/src/pointwise2.F90 b/src/pointwise2.F90 index 85e10c8..d337721 100644 --- a/src/pointwise2.F90 +++ b/src/pointwise2.F90 @@ -20,9 +20,12 @@ module pointwise2 public get_2scalarderivs2 public get_2vectorderivs2 public get_2tensorderivs2 + public get_2scalarderivs3 + public get_2vectorderivs3 + public get_2tensorderivs3 contains #define TGR_INCLUDED -#include "derivs2.F90" +#include "TAT/TGRtensor/src/derivs2.F90" #undef TGR_INCLUDED subroutine calc_2position (shape, i,j, pos) integer, intent(in) :: shape(2) @@ -79,68 +82,109 @@ contains axy(pos) = f(1,2) ayy(pos) = f(2,2) end subroutine set_2tensor - subroutine get_2scalarderivs (a, f, pos, off, dx) - CCTK_REAL, intent(in) :: a(*) - CCTK_REAL, intent(out) :: f(2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) - call get_2derivs (a, f, pos, off, dx) + subroutine get_2scalarderivs (a, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: a(*) + CCTK_REAL, intent(out) :: f(2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order + call get_2derivs (a, f, pos, off, dx, order) end subroutine get_2scalarderivs - subroutine get_2vectorderivs (ax,ay, f, pos, off, dx) - CCTK_REAL, intent(in) :: ax(*),ay(*) - CCTK_REAL, intent(out) :: f(2,2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) + subroutine get_2vectorderivs (ax,ay, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: ax(*),ay(*) + CCTK_REAL, intent(out) :: f(2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order CCTK_REAL :: fx(2),fy(2) - call get_2derivs (ax, fx, pos, off, dx) - call get_2derivs (ay, fy, pos, off, dx) + call get_2derivs (ax, fx, pos, off, dx, order) + call get_2derivs (ay, fy, pos, off, dx, order) f(1,:) = fx f(2,:) = fy end subroutine get_2vectorderivs - subroutine get_2tensorderivs (axx,axy,ayy, f, pos, off, dx) - CCTK_REAL, intent(in) :: axx(*),axy(*),ayy(*) - CCTK_REAL, intent(out) :: f(2,2,2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) + subroutine get_2tensorderivs (axx,axy,ayy, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: axx(*),axy(*),ayy(*) + CCTK_REAL, intent(out) :: f(2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order CCTK_REAL :: fxx(2),fxy(2),fyy(2) - call get_2derivs (axx, fxx, pos, off, dx) - call get_2derivs (axy, fxy, pos, off, dx) - call get_2derivs (ayy, fyy, pos, off, dx) + call get_2derivs (axx, fxx, pos, off, dx, order) + call get_2derivs (axy, fxy, pos, off, dx, order) + call get_2derivs (ayy, fyy, pos, off, dx, order) f(1,1,:) = fxx f(1,2,:) = fxy f(2,1,:) = fxy f(2,2,:) = fyy end subroutine get_2tensorderivs - subroutine get_2scalarderivs2 (a, f, pos, off, dx) - CCTK_REAL, intent(in) :: a(*) - CCTK_REAL, intent(out) :: f(2,2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) - call get_2derivs2 (a, f, pos, off, dx) + subroutine get_2scalarderivs2 (a, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: a(*) + CCTK_REAL, intent(out) :: f(2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order + call get_2derivs2 (a, f, pos, off, dx, order) end subroutine get_2scalarderivs2 - subroutine get_2vectorderivs2 (ax,ay, f, pos, off, dx) - CCTK_REAL, intent(in) :: ax(*),ay(*) - CCTK_REAL, intent(out) :: f(2,2,2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) + subroutine get_2vectorderivs2 (ax,ay, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: ax(*),ay(*) + CCTK_REAL, intent(out) :: f(2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order CCTK_REAL :: fx(2,2),fy(2,2) - call get_2derivs2 (ax, fx, pos, off, dx) - call get_2derivs2 (ay, fy, pos, off, dx) + call get_2derivs2 (ax, fx, pos, off, dx, order) + call get_2derivs2 (ay, fy, pos, off, dx, order) f(1,:,:) = fx f(2,:,:) = fy end subroutine get_2vectorderivs2 - subroutine get_2tensorderivs2 (axx,axy,ayy, f, pos, off, dx) - CCTK_REAL, intent(in) :: axx(*),axy(*),ayy(*) - CCTK_REAL, intent(out) :: f(2,2,2,2) - integer, intent(in) :: pos, off(2) - CCTK_REAL, intent(in) :: dx(2) + subroutine get_2tensorderivs2 (axx,axy,ayy, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: axx(*),axy(*),ayy(*) + CCTK_REAL, intent(out) :: f(2,2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order CCTK_REAL :: fxx(2,2),fxy(2,2),fyy(2,2) - call get_2derivs2 (axx, fxx, pos, off, dx) - call get_2derivs2 (axy, fxy, pos, off, dx) - call get_2derivs2 (ayy, fyy, pos, off, dx) + call get_2derivs2 (axx, fxx, pos, off, dx, order) + call get_2derivs2 (axy, fxy, pos, off, dx, order) + call get_2derivs2 (ayy, fyy, pos, off, dx, order) f(1,1,:,:) = fxx f(1,2,:,:) = fxy f(2,1,:,:) = fxy f(2,2,:,:) = fyy end subroutine get_2tensorderivs2 + subroutine get_2scalarderivs3 (a, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: a(*) + CCTK_REAL, intent(out) :: f(2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order + call get_2derivs3 (a, f, pos, off, dx, order) + end subroutine get_2scalarderivs3 + subroutine get_2vectorderivs3 (ax,ay, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: ax(*),ay(*) + CCTK_REAL, intent(out) :: f(2,2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order + CCTK_REAL :: fx(2,2,2),fy(2,2,2) + call get_2derivs3 (ax, fx, pos, off, dx, order) + call get_2derivs3 (ay, fy, pos, off, dx, order) + f(1,:,:,:) = fx + f(2,:,:,:) = fy + end subroutine get_2vectorderivs3 + subroutine get_2tensorderivs3 (axx,axy,ayy, f, pos, off, dx, order) + CCTK_REAL, intent(in) :: axx(*),axy(*),ayy(*) + CCTK_REAL, intent(out) :: f(2,2,2,2,2) + integer, intent(in) :: pos, off(2) + CCTK_REAL, intent(in) :: dx(2) + integer, intent(in), optional :: order + CCTK_REAL :: fxx(2,2,2),fxy(2,2,2),fyy(2,2,2) + call get_2derivs3 (axx, fxx, pos, off, dx, order) + call get_2derivs3 (axy, fxy, pos, off, dx, order) + call get_2derivs3 (ayy, fyy, pos, off, dx, order) + f(1,1,:,:,:) = fxx + f(1,2,:,:,:) = fxy + f(2,1,:,:,:) = fxy + f(2,2,:,:,:) = fyy + end subroutine get_2tensorderivs3 end module pointwise2 |