14 SELECT CASE(des_interp_scheme_enum)
31 use discretelement
, only: max_pip
32 use discretelement
, only: pijk
33 use discretelement
, only: des_pos_new
34 use discretelement
, only: xe, yn, zt
52 DOUBLE PRECISION :: WEIGHT
53 DOUBLE PRECISION :: WEIGHT_I(-1:1)
54 DOUBLE PRECISION :: WEIGHT_J(-1:1)
55 DOUBLE PRECISION :: WEIGHT_K(-1:1)
64 IF(.NOT.is_normal(l)) cycle
73 weight_i( 0) =
one - weight_i(-1) - weight_i(1)
78 weight_j( 0) =
one - weight_j(-1) - weight_j(1)
85 weight_k( 0) =
one - weight_k(-1) - weight_k(1)
101 weight = weight_i(
ic)*weight_j(jc)*weight_k(kc)
102 IF(is_on_mype_plus2layers(i+
ic,j+jc,k+kc))
THEN 103 ijkt = funijk(i+
ic,j+jc,k+kc)
104 IF(fluid_at(ijkt) .OR. cyclic_at(ijkt))
THEN 105 filter_cell(idx,l) = ijkt
108 filter_cell(idx,l) = ijk
112 filter_cell(idx,l) = ijk
134 DOUBLE PRECISION,
INTENT(IN) :: POS1, POS2
135 DOUBLE PRECISION :: OVERLAP, HEIGHT
137 overlap = pos1 - pos2
138 IF(overlap < filter_width_interp)
THEN 139 height = filter_width_interp - overlap
148 include
'functions.inc' 161 use discretelement
, only: max_pip
162 use discretelement
, only: pijk
163 use discretelement
, only: des_pos_new
164 use discretelement
, only: xe, yn, zt
172 use compar, only: funijk_map_c
181 INTEGER :: IC, JC, KC
184 DOUBLE PRECISION :: XC, YC, ZC
185 DOUBLE PRECISION :: WEIGHT
186 DOUBLE PRECISION :: WEIGHT_I(-1:1)
187 DOUBLE PRECISION :: WEIGHT_J(-1:1)
188 DOUBLE PRECISION :: WEIGHT_K(-1:1)
193 IF(.NOT.is_normal(l)) cycle
200 xc = xe(i-1) +
half*dx(i)
201 IF(des_pos_new(l,1) < xe(i-1)+
half*dx(i))
THEN 202 weight_i(-1) = (xc - des_pos_new(l,1))*
odx_e(i-1)
203 weight_i( 0) =
one - weight_i(-1)
206 weight_i( 1) = (des_pos_new(l,1) - xc)*
odx_e(i)
207 weight_i( 0) =
one - weight_i(1)
212 yc = yn(j-1) +
half*dy(j)
213 IF(des_pos_new(l,2) < yn(j-1)+
half*dy(j))
THEN 214 weight_j(-1) = (yc - des_pos_new(l,2))*
ody_n(j-1)
215 weight_j( 0) =
one - weight_j(-1)
218 weight_j( 1) = (des_pos_new(l,2) - yc)*
ody_n(j)
219 weight_j( 0) =
one - weight_j(1)
226 zc = zt(k-1) +
half*dz(k)
227 IF(des_pos_new(l,3) < zt(k-1)+
half*dz(k))
THEN 228 weight_k(-1) = (zc - des_pos_new(l,3))*
odz_t(k-1)
229 weight_k( 0) =
one - weight_k(-1)
232 weight_k( 1) = (des_pos_new(l,3) - zc)*
odz_t(k)
233 weight_k( 0) =
one - weight_k(1)
251 weight = weight_i(
ic)*weight_j(jc)*weight_k(kc)
252 IF(is_on_mype_plus2layers(i+
ic,j+jc,k+kc))
THEN 253 ijkt = funijk_map_c(i+
ic,j+jc,k+kc)
254 IF(fluid_at(ijkt))
THEN 255 filter_cell(idx,l) = ijkt
258 filter_cell(idx,l) = ijk
262 filter_cell(idx,l) = ijk
273 include
'functions.inc' integer, parameter des_interp_gauss
double precision function calc_filter_weights(POS1, POS2)
integer, dimension(:,:), allocatable filter_cell
double precision, parameter one
double precision, dimension(0:dim_j) dy
double precision, dimension(0:dim_k) dz
subroutine calc_interp_weights1
double precision filter_width_interpx3
subroutine calc_interp_weights
integer, parameter des_interp_lhat
double precision, dimension(:), allocatable ody_n
double precision, dimension(:,:), allocatable filter_weight
double precision, dimension(:), allocatable odx_e
integer, parameter des_interp_dpvm
double precision, dimension(0:dim_i) dx
double precision filter_width_interp
double precision, parameter half
double precision oofilter_vol
integer des_interp_scheme_enum
subroutine calc_interp_weights2
double precision, dimension(:), allocatable odz_t
double precision, parameter zero