189 real(kind=
rp),
intent(in) :: c
192 if (this%u%size() .gt. 0)
call cmult(this%u%x, c, this%u%size())
193 if (this%v%size() .gt. 0)
call cmult(this%v%x, c, this%v%size())
194 if (this%w%size() .gt. 0)
call cmult(this%w%x, c, this%w%size())
195 if (this%p%size() .gt. 0)
call cmult(this%p%x, c, this%p%size())
196 if (this%t%size() .gt. 0)
call cmult(this%t%x, c, this%t%size())
198 do i = 1, this%n_scalars
199 if (this%s(i)%size() .gt. 0)
call cmult(this%s(i)%x, c, this%s(i)%size())
210 if (this%u%size() .gt. 0)
call add2(this%u%x, fld_data_add%u%x, this%u%size())
211 if (this%v%size() .gt. 0)
call add2(this%v%x, fld_data_add%v%x, this%v%size())
212 if (this%w%size() .gt. 0)
call add2(this%w%x, fld_data_add%w%x, this%w%size())
213 if (this%p%size() .gt. 0)
call add2(this%p%x, fld_data_add%p%x, this%p%size())
214 if (this%t%size() .gt. 0)
call add2(this%t%x, fld_data_add%t%x, this%t%size())
216 do i = 1, this%n_scalars
217 if (this%s(i)%size() .gt. 0)
call add2(this%s(i)%x, fld_data_add%s(i)%x, &
264 type(
dofmap_t),
intent(in),
target :: to_dof
265 type(
mesh_t),
intent(in),
target :: to_msh
266 real(kind=
rp),
intent(in) :: tolerance
270 real(kind=
rp),
allocatable :: x_coords(:,:,:,:), y_coords(:,:,:,:), &
272 real(kind=
rp) :: center_x, center_y, center_z
276 type(
space_t),
pointer :: to_Xh
280 if (.not.
allocated(this%x%x) .or. &
281 .not.
allocated(this%y%x) .or. &
282 .not.
allocated(this%z%x))
call neko_error(
"Unable to retrieve &
283 &mesh information from fld data.")
286 call fld_xh%init(
gll, this%lx, this%ly, this%lz)
290 allocate(x_coords(to_xh%lx, to_xh%ly, to_xh%lz, to_msh%nelv))
291 allocate(y_coords(to_xh%lx, to_xh%ly, to_xh%lz, to_msh%nelv))
292 allocate(z_coords(to_xh%lx, to_xh%ly, to_xh%lz, to_msh%nelv))
298 do e = 1, to_msh%nelv
303 center_x = center_x + to_dof%x(i, 1, 1, e)
304 center_y = center_y + to_dof%y(i, 1, 1, e)
305 center_z = center_z + to_dof%z(i, 1, 1, e)
307 center_x = center_x / to_xh%lxyz
308 center_y = center_y / to_xh%lxyz
309 center_z = center_z / to_xh%lxyz
311 x_coords(i, 1, 1, e) = to_dof%x(i, 1, 1, e) - &
312 tolerance * (to_dof%x(i, 1, 1, e) - center_x)
313 y_coords(i, 1, 1, e) = to_dof%y(i, 1, 1, e) - &
314 tolerance * (to_dof%y(i, 1, 1, e) - center_y)
315 z_coords(i, 1, 1, e) = to_dof%z(i, 1, 1, e) - &
316 tolerance * (to_dof%z(i, 1, 1, e) - center_z)
322 call global_interp%init(this%x%x, this%y%x, this%z%x, this%gdim, &
323 this%nelv, fld_xh, tol = tolerance)
324 call global_interp%find_points(x_coords, y_coords, z_coords, &