64 real(kind=
rp),
pointer :: tlag(:) => null()
65 real(kind=
rp),
pointer :: dtlag(:) => null()
86 real(kind=
dp) :: t = 0d0
98 real(kind=
rp),
pointer :: msh_x(:,:,:,:) => null()
99 real(kind=
rp),
pointer :: msh_y(:,:,:,:) => null()
100 real(kind=
rp),
pointer :: msh_z(:,:,:,:) => null()
101 real(kind=
rp),
pointer :: pivot_pos(:) => null()
102 real(kind=
rp),
pointer :: pivot_vel_lag(:,:) => null()
103 real(kind=
rp),
pointer :: blag(:,:,:,:) => null()
104 real(kind=
rp),
pointer :: blaglag(:,:,:,:) => null()
105 real(kind=
rp),
pointer :: basis_pos(:) => null()
106 real(kind=
rp),
pointer :: basis_vel_lag(:,:) => null()
194 class(
chkp_t),
intent(inout) :: this
198 associate(u => this%u, v => this%v, w => this%w, &
199 ulag => this%ulag, vlag => this%vlag, wlag => this%wlag, &
202 if (
associated(this%u) .and.
associated(this%v) .and. &
203 associated(this%w) .and.
associated(this%p))
then
210 if (
associated(this%ulag) .and.
associated(this%vlag) .and. &
211 associated(this%wlag))
then
228 if (
associated(this%s))
then
237 if (
associated(this%wm_x) .and.
associated(this%wm_y) .and. &
238 associated(this%wm_z))
then
243 if (
associated(this%wm_x_lag) .and.
associated(this%wm_y_lag) &
244 .and.
associated(this%wm_z_lag))
then
264 do i = 1, this%scalar_lags%size()
268 slag => this%scalar_lags%get(i)
269 slag_size = slag%size()
277 if (
allocated(this%scalar_abx1) .and.
allocated(this%scalar_abx2))
then
278 do i = 1,
size(this%scalar_abx1)
286 call device_sync(glb_cmd_queue)
293 class(
chkp_t),
intent(inout) :: this
296 if (neko_bcknd_device .eq. 1)
then
297 associate(u => this%u, v => this%v, w => this%w, &
298 ulag => this%ulag, vlag => this%vlag, wlag => this%wlag, &
301 if (
associated(this%u) .and.
associated(this%v) .and. &
302 associated(this%w))
then
303 call u%copy_from(host_to_device, sync = .false.)
304 call v%copy_from(host_to_device, sync = .false.)
305 call w%copy_from(host_to_device, sync = .false.)
306 call p%copy_from(host_to_device, sync = .false.)
309 if (
associated(this%ulag) .and.
associated(this%vlag) .and. &
310 associated(this%wlag))
then
311 call ulag%lf(1)%copy_from(host_to_device, sync = .false.)
312 call ulag%lf(2)%copy_from(host_to_device, sync = .false.)
314 call vlag%lf(1)%copy_from(host_to_device, sync = .false.)
315 call vlag%lf(2)%copy_from(host_to_device, sync = .false.)
317 call wlag%lf(1)%copy_from(host_to_device, sync = .false.)
318 call wlag%lf(2)%copy_from(host_to_device, sync = .false.)
321 if (
associated(this%s))
then
322 call this%s%copy_from(host_to_device, sync = .false.)
324 call this%slag%lf(1)%copy_from(host_to_device, sync = .false.)
325 call this%slag%lf(2)%copy_from(host_to_device, sync = .false.)
326 call this%abs1%copy_from(host_to_device, sync = .false.)
327 call this%abs2%copy_from(host_to_device, sync = .false.)
331 if (
associated(this%wm_x) .and.
associated(this%wm_y) .and. &
332 associated(this%wm_z))
then
333 call this%wm_x%copy_from(host_to_device, sync = .false.)
334 call this%wm_y%copy_from(host_to_device, sync = .false.)
335 call this%wm_z%copy_from(host_to_device, sync = .false.)
336 if (
associated(this%wm_x_lag) .and.
associated(this%wm_y_lag) .and. &
337 associated(this%wm_z_lag))
then
338 call this%wm_x_lag%lf(1)%copy_from(host_to_device, &
340 call this%wm_x_lag%lf(2)%copy_from(host_to_device, &
343 call this%wm_y_lag%lf(1)%copy_from(host_to_device, &
345 call this%wm_y_lag%lf(2)%copy_from(host_to_device, &
348 call this%wm_z_lag%lf(1)%copy_from(host_to_device, &
350 call this%wm_z_lag%lf(2)%copy_from(host_to_device, &
356 if (
allocated(this%scalar_lags%items) .and. &
357 this%scalar_lags%size() > 0)
then
358 do i = 1, this%scalar_lags%size()
360 type(field_series_t),
pointer :: slag
361 integer :: slag_size, dof_size
362 slag => this%scalar_lags%get(i)
363 slag_size = slag%size()
364 dof_size = slag%f%dof%size()
366 call slag%lf(j)%copy_from(host_to_device, sync = .false.)
373 if (
allocated(this%scalar_abx1) .and.
allocated(this%scalar_abx2))
then
374 do i = 1,
size(this%scalar_abx1)
375 call this%scalar_abx1(i)%ptr%copy_from(host_to_device, &
377 call this%scalar_abx2(i)%ptr%copy_from(host_to_device, &
444 subroutine chkp_add_ale(this, x, y, z, Blag, Blaglag, wm_x, wm_y, wm_z, &
445 wm_x_lag, wm_y_lag, wm_z_lag, pivot_pos, pivot_vel_lag, basis_pos, &
447 class(
chkp_t),
intent(inout) :: this
448 type(field_t),
target,
intent(in) :: wm_x, wm_y, wm_z
449 real(kind=rp),
intent(in),
pointer :: pivot_pos(:), pivot_vel_lag(:,:)
450 type(field_series_t),
target,
intent(in) :: wm_x_lag, wm_y_lag, wm_z_lag
451 real(kind=rp),
intent(in),
pointer :: x(:,:,:,:), y(:,:,:,:), z(:,:,:,:)
452 real(kind=rp),
pointer,
intent(in) :: blag(:,:,:,:), blaglag(:,:,:,:)
453 real(kind=rp),
intent(in),
pointer :: basis_pos(:)
454 real(kind=rp),
intent(in),
pointer :: basis_vel_lag(:,:)
462 this%wm_x_lag => wm_x_lag
463 this%wm_y_lag => wm_y_lag
464 this%wm_z_lag => wm_z_lag
466 this%Blaglag => blaglag
467 this%pivot_pos => pivot_pos
468 this%pivot_vel_lag => pivot_vel_lag
469 this%basis_pos => basis_pos
470 this%basis_vel_lag => basis_vel_lag
subroutine chkp_add_ale(this, x, y, z, blag, blaglag, wm_x, wm_y, wm_z, wm_x_lag, wm_y_lag, wm_z_lag, pivot_pos, pivot_vel_lag, basis_pos, basis_vel_lag)
Add mesh velocity and other required variables to checkpointing for ALE.