aboutsummaryrefslogtreecommitdiff
path: root/src/Derivatives2_mixed.F90
diff options
context:
space:
mode:
authordiener <diener@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2007-10-18 13:35:10 +0000
committerdiener <diener@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2007-10-18 13:35:10 +0000
commit93d997291d78ca3cebf36f33673b75ffcd8a4ba6 (patch)
tree6d0ddee0fd79d43d43600e9cf4456d06735158ab /src/Derivatives2_mixed.F90
parent2a45c231d2a5b7a1e29faaf599f3a19cf91b9293 (diff)
Make 2nd derivative interface consistent with FiniteDifferencing and
FourierDifferencing, providing a routine to return mixed derivatives obtained by applying two succesive 1st derivatives in different directions. Not tested yet, but compiles. git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/SummationByParts/trunk@87 f69c4107-0314-4c4f-9ad4-17e986b73f4a
Diffstat (limited to 'src/Derivatives2_mixed.F90')
-rw-r--r--src/Derivatives2_mixed.F9029
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Derivatives2_mixed.F90 b/src/Derivatives2_mixed.F90
new file mode 100644
index 0000000..7c9e644
--- /dev/null
+++ b/src/Derivatives2_mixed.F90
@@ -0,0 +1,29 @@
+#include "cctk.h"
+#include "cctk_Functions.h"
+#include "cctk_Parameters.h"
+
+
+subroutine deriv2_mixed ( cctkGH, dir1, dir2, var, ni, nj, nk, &
+ dvar2, table_handle )
+
+ implicit none
+
+ DECLARE_CCTK_FUNCTIONS
+ DECLARE_CCTK_PARAMETERS
+
+ CCTK_POINTER, intent(IN) :: cctkGH
+ CCTK_INT, intent(IN) :: dir1, dir2
+ CCTK_REAL, dimension(ni,nj,nk), intent(IN) :: var
+ CCTK_INT, intent(IN) :: ni, nj, nk
+ CCTK_REAL, dimension(ni,nj,nk), intent(OUT) :: dvar2
+ CCTK_INT, intent(IN) :: table_handle
+ CCTK_REAL, dimension(:,:,:), allocatable :: tmp
+
+ allocate ( tmp(ni,nj,nk) )
+
+ call Diff_gv ( cctkGH, dir1, var, tmp, table_handle)
+ call Diff_gv ( cctkGH, dir2, tmp, dvar2, table_handle )
+
+ deallocate ( tmp )
+
+end subroutine deriv2_mixed