From 93f9acdd8e316b02857f3a48ce0f962b6f569d68 Mon Sep 17 00:00:00 2001 From: Giacomo Rossi Date: Mon, 16 Jan 2017 18:12:18 +0100 Subject: [PATCH] Fix smoothness indicators coefficients for S=4 Short description Why: Correct wrong smoothness indicators coefficients for S=4 This change addresses the need by: * Side effects: None --- src/lib/wenoof_smoothness_indicators_js.f90 | 96 ++++++++++++++------- 1 file changed, 64 insertions(+), 32 deletions(-) diff --git a/src/lib/wenoof_smoothness_indicators_js.f90 b/src/lib/wenoof_smoothness_indicators_js.f90 index 1932399..f85cda4 100644 --- a/src/lib/wenoof_smoothness_indicators_js.f90 +++ b/src/lib/wenoof_smoothness_indicators_js.f90 @@ -143,41 +143,73 @@ pure subroutine create(self, constructor) c(0,2,2) = 0._R_P ; c(1,2,2) = 0._R_P ; c(2,2,2) = 10._R_P/3._R_P case(4) ! 7th order ! stencil 0 - ! i*i ; (i-1)*i ; (i-2)*i ; (i-3)*i - c(0,0,0) = 2107._R_P ; c(1,0,0) =-9402._R_P ; c(2,0,0) = 7042._R_P ; c(3,0,0) = -1854._R_P - ! / ; (i-1)*(i-1) ; (i-2)*(i-1) ; (i-3)*(i-1) - c(0,1,0) = 0._R_P ; c(1,1,0) =11003._R_P ; c(2,1,0) =-17246._R_P ; c(3,1,0) = 4642._R_P - ! / ; / ; (i-2)*(i-2) ; (i-3)*(i-2) - c(0,2,0) = 0._R_P ; c(1,2,0) = 0._R_P ; c(2,2,0) = 7043._R_P ; c(3,2,0) = -3882._R_P - ! / ; / ; / ; (i-3)*(i-3) - c(0,3,0) = 0._R_P ; c(1,3,0) = 0._R_P ; c(2,3,0) = 0._R_P ; c(3,3,0) = 547._R_P + ! i*i ; (i-1)*i ; (i-2)*i + c(0,0,0) = 2107._R_P / 240._R_P; c(1,0,0) = -1567._R_P / 40._R_P; c(2,0,0) = 3521._R_P / 120._R_P + ! (i-3)*i + c(3,0,0) = -309._R_P / 40._R_P + ! / ; (i-1)*(i-1) ; (i-2)*(i-1) + c(0,1,0) = 0._R_P ; c(1,1,0) = 11003._R_P / 240._R_P; c(2,1,0) = -8623._R_P / 120._R_P + ! (i-3)*(i-1) + c(3,1,0) = 2321._R_P / 120._R_P + ! / ; / ; (i-2)*(i-2) + c(0,2,0) = 0._R_P ; c(1,2,0) = 0._R_P ; c(2,2,0) = 7043._R_P / 240._R_P + ! (i-3)*(i-2) + c(3,2,0) = -647._R_P / 40._R_P + ! / ; / ; / + c(0,3,0) = 0._R_P ; c(1,3,0) = 0._R_P ; c(2,3,0) = 0._R_P + ! (i-3)*(i-3) + c(3,3,0) = 547._R_P / 240._R_P ! stencil 1 - ! (i+1)*(i+1) ; i*(i+1) ; (i-1)*(i+1) ; (i-2)*(i+1) - c(0,0,1) = 547._R_P; c(1,0,1) =-2522._R_P; c(2,0,1) = 1922._R_P; c(3,0,1) = -494._R_P - ! / ; i*i ; (i-1)*i ; (i-2)*i - c(0,1,1) = 0._R_P; c(1,1,1) = 3443._R_P; c(2,1,1) = -5966._R_P; c(3,1,1) = 1602._R_P - ! / ; / ; (i-1)*(i-1) ; (i-2)*(i-1) - c(0,2,1) = 0._R_P; c(1,2,1) = 0._R_P; c(2,2,1) = 2843._R_P; c(3,2,1) = -1642._R_P - ! / ; / ; / ; (i-2)*(i-2) - c(0,3,1) = 0._R_P; c(1,3,1) = 0._R_P; c(2,3,1) = 0._R_P; c(3,3,1) = 267._R_P + ! (i+1)*(i+1) ; i*(i+1) ; (i-1)*(i+1) + c(0,0,1) = 547._R_P / 240._R_P; c(1,0,1) = -1261._R_P / 120._R_P; c(2,0,1) = 961._R_P / 120._R_P + ! (i-2)*(i+1) + c(3,0,1) = -247._R_P / 120._R_P + ! / ; i*i ; (i-1)*i + c(0,1,1) = 0._R_P ; c(1,1,1) = 3443._R_P / 240._R_P; c(2,1,1) = -2983._R_P / 120._R_P + ! (i-2)*i + c(3,1,1) = 267._R_P / 40._R_P + ! / ; / ; (i-1)*(i-1) + c(0,2,1) = 0._R_P ; c(1,2,1) = 0._R_P ; c(2,2,1) = 2843._R_P / 240._R_P + ! (i-2)*(i-1) + c(3,2,1) = -821._R_P / 120._R_P + ! / ; / ; / + c(0,3,1) = 0._R_P ; c(1,3,1) = 0._R_P ; c(2,3,1) = 0._R_P + ! (i-2)*(i-2) + c(3,3,1) = 89._R_P / 80._R_P ! stencil 2 - ! (i+2)*(i+2) ; (i+1)*(i+2) ; i*(i+2) ; (i-1)*(i+2) - c(0,0,2) = 267._R_P; c(1,0,2) =-1642._R_P; c(2,0,2) = 1602._R_P; c(3,0,2) = -494._R_P - ! / ; (i+1)*(i+1) ; i*(i+1) ; (i-1)*(i+1) - c(0,1,2) = 0._R_P; c(1,1,2) = 2843._R_P; c(2,1,2) = -5966._R_P; c(3,1,2) = 1922._R_P - ! / ; / ; i*i ; (i-1)*i - c(0,2,2) = 0._R_P; c(1,2,2) = 0._R_P; c(2,2,2) = 3443._R_P; c(3,2,2) = -2522._R_P - ! / ; / ; / ; (i-1)*(i-1) - c(0,3,2) = 0._R_P; c(1,3,2) = 0._R_P; c(2,3,2) = 0._R_P; c(3,3,2) = 547._R_P + ! (i+2)*(i+2) ; (i+1)*(i+2) ; i*(i+2) + c(0,0,2) = 89._R_P / 80._R_P; c(1,0,2) = -821._R_P / 120._R_P; c(2,0,2) = 267._R_P / 40._R_P + ! (i-1)*(i+2) + c(3,0,2) = -247._R_P / 120._R_P + ! / ; (i+1)*(i+1) ; i*(i+1) + c(0,1,2) = 0._R_P ; c(1,1,2) = 2843._R_P / 240._R_P; c(2,1,2) = -2983._R_P / 120._R_P + ! (i-1)*(i+1) + c(3,1,2) = 961._R_P / 120._R_P + ! / ; / ; i*i + c(0,2,2) = 0._R_P ; c(1,2,2) = 0._R_P ; c(2,2,2) = 3443._R_P / 240._R_P + ! (i-1)*i + c(3,2,2) = -1261._R_P / 120._R_P + ! / ; / ; / + c(0,3,2) = 0._R_P ; c(1,3,2) = 0._R_P ; c(2,3,2) = 0._R_P + ! (i-1)*(i-1) + c(3,3,2) = 547._R_P / 240._R_P ! stencil 3 - ! (i+3)*(i+3) ; (i+2)*(i+3) ; (i+1)*(i+3) ; i*(i+3) - c(0,0,3) = 547._R_P; c(1,0,3) =-3882._R_P; c(2,0,3) = 4642._R_P; c(3,0,3) = -1854._R_P - ! / ; (i+2)*(i+2) ; (i+1)*(i+2) ; i*(i+2) - c(0,1,3) = 0._R_P; c(1,1,3) = 7043._R_P; c(2,1,3) =-17246._R_P; c(3,1,3) = 7042._R_P - ! / ; / ; (i+1)*(i+1) ; i*(i+1) - c(0,2,3) = 0._R_P; c(1,2,3) = 0._R_P; c(2,2,3) = 11003._R_P; c(3,2,3) = -9402._R_P - ! / ; / ; / ; i*i - c(0,3,3) = 0._R_P; c(1,3,3) = 0._R_P; c(2,3,3) = 0._R_P; c(3,3,3) = 2107._R_P + ! (i+3)*(i+3) ; (i+2)*(i+3) ; (i+1)*(i+3) + c(0,0,3) = 547._R_P / 240._R_P; c(1,0,3) = -647._R_P / 40._R_P; c(2,0,3) = 2321._R_P / 120._R_P + ! i*(i+3) + c(3,0,3) = -309._R_P / 40._R_P + ! / ; (i+2)*(i+2) ; (i+1)*(i+2) + c(0,1,3) = 0._R_P ; c(1,1,3) = 7043._R_P / 240._R_P; c(2,1,3) = -8623._R_P / 120._R_P + ! i*(i+2) + c(3,1,3) = 3521._R_P / 120._R_P + ! / ; / ; (i+1)*(i+1) + c(0,2,3) = 0._R_P ; c(1,2,3) = 0._R_P ; c(2,2,3) = 11003._R_P / 240._R_P + ! i*(i+1) + c(3,2,3) = -1567._R_P / 40._R_P + ! / ; / ; / + c(0,3,3) = 0._R_P ; c(1,3,3) = 0._R_P ; c(2,3,3) = 0._R_P + ! i*i + c(3,3,3) = 2107._R_P / 240._R_P case(5) ! 9th order ! stencil 0 ! i*i ; (i-1)*i ; (i-2)*i