9 #include "sll_working_precision.h"
26 sll_real64,
allocatable :: scratch(:)
29 sll_int32 :: double_iters
43 sll_int32,
intent( in ) :: iterations
44 sll_int32,
intent( in ) :: n_dofs
45 sll_int32,
optional,
intent( in ) :: mode
47 self%iterations = iterations
49 allocate( self%scratch(n_dofs) )
51 if (mod(iterations, 2) .eq. 1 )
then
53 self%double_iters = iterations/2
56 self%double_iters = iterations/2
65 sll_real64,
intent(in) :: field_in(:)
66 sll_real64,
intent(out) :: field_out(:)
70 if ( self%odd .eqv. .true. )
then
77 do iter=1,self%double_iters
86 sll_real64,
intent(inout) :: field(:)
90 do iter=1,self%double_iters
95 if ( self%odd .eqv. .true. )
then
103 sll_real64,
intent(in) :: field_in(:)
104 sll_real64,
intent(out) :: field_out(:)
105 sll_int32,
intent(in) :: n_dofs
110 field_out(1) = 0.25_f64*( field_in(1)*2.0_f64 + &
111 field_in(n_dofs)+field_in(2))
113 field_out(j) = 0.25_f64*( field_in(j)*2.0_f64 + &
114 field_in(j-1)+field_in(j+1))
116 field_out(n_dofs) = 0.25_f64*( field_in(n_dofs)*2.0_f64 + &
117 field_in(n_dofs-1)+field_in(1))
Binomial filter for smooting of fields.
subroutine sll_s_binomial_filter(field_in, field_out, n_dofs)
subroutine init_binomial(self, iterations, n_dofs, mode)
subroutine apply_binomial(self, field_in, field_out)
subroutine apply_inplace_binomial(self, field)