26 public :: filter_hyperdiff
28 interface filter_hyperdiff
29 module procedure filter_hyperdiff_2d
31 end interface filter_hyperdiff
49 subroutine filter_hyperdiff_2d( &
50 IA, IS, IE, JA, JS, JE, &
58 integer,
intent(in) :: ia, is, ie
59 integer,
intent(in) :: ja, js, je
61 real(RP),
intent(inout) :: data(ia,ja)
63 integer,
intent(in) :: order
64 integer,
intent(in) :: nite
66 real(RP),
intent(in),
optional :: limiter_sign(ia,ja)
68 real(RP),
pointer :: p1(:,:)
69 real(RP),
pointer :: p2(:,:)
70 real(RP),
target :: work1(ia,ja)
71 real(RP),
target :: work2(ia,ja)
80 if ( mod(order,2) .ne. 0 )
then 81 log_error(
"FILTER_hyperdiff_2D", *)
"order must be even" 86 log_error(
"FILTER_hyperdiff_2D", *)
"IS must be >= 2" 90 log_error(
"FILTER_hyperdiff_2D", *)
"IS must be <= IA-1" 94 log_error(
"FILTER_hyperdiff_2D", *)
"JS must be >= 2" 98 log_error(
"FILTER_hyperdiff_2D", *)
"JS must be <= JA-1" 103 limiter =
present( limiter_sign )
108 call comm_vars8(
data(:,:), 1 )
109 call comm_wait (
data(:,:), 1, .true. )
114 work2(i,j) =
data(i,j)
124 p2(i,j) = ( - p1(i+1,j) + p1(i,j)*2.0_rp - p1(i-1,j) &
125 - p1(i,j+1) + p1(i,j)*2.0_rp - p1(i,j-1) ) / 8.0_rp
129 call comm_vars8( p2(:,:), 1 )
130 call comm_wait ( p2(:,:), 1, .true. )
132 if ( mod(n,2) == 0 )
then 144 data(i,j) =
data(i,j) - p1(i,j)
152 data(i,j) = sign( max(
data(i,j) * limiter_sign(i,j), 0.0_rp ), limiter_sign(i,j) )
161 end subroutine filter_hyperdiff_2d
166 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
174 integer,
intent(in) :: KA, KS, KE
175 integer,
intent(in) :: IA, IS, IE
176 integer,
intent(in) :: JA, JS, JE
178 real(RP),
intent(inout) :: data(ka,ia,ja)
180 integer,
intent(in) :: order
181 integer,
intent(in) :: nite
183 real(RP),
intent(in),
optional :: limiter_sign(ka,ia,ja)
185 real(RP) :: work_data(ia,ja)
186 real(RP) :: work_sign(ia,ja)
192 if (
present(limiter_sign) )
then 203 work_data(i,j) =
data(k,i,j)
210 work_sign(i,j) = limiter_sign(k,i,j)
214 call filter_hyperdiff_2d( ia, is, ie, ja, js, je, &
215 work_data(:,:), order, nite, &
216 limiter_sign = work_sign )
220 call filter_hyperdiff_2d( ia, is, ie, ja, js, je, &
221 work_data(:,:), order, nite )
228 data(k,i,j) = work_data(i,j)
subroutine filter_hyperdiff_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, data, order, nite, limiter_sign)
Hyper diffusion filter 3D.
subroutine, public prc_abort
Abort Process.
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
subroutine, public prof_rapend(rapname_base, level)
Save raptime.