Register a rank-2 owned field. arr is the full (ghosted)
host array; the owned slice is (ng+1:ng+nx_phys, ng+1:ng+ny_phys).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | tag | |||
| real(kind=wp), | intent(in), | target | :: | arr(:,:) | ||
| integer, | intent(in) | :: | ng | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| logical, | intent(in), | optional | :: | optional | ||
| logical, | intent(in), | optional | :: | device_mapped |
subroutine registry_register_2d(this, tag, arr, ng, nx_phys, ny_phys, optional, device_mapped) !! Register a rank-2 owned field. `arr` is the full (ghosted) !! host array; the owned slice is `(ng+1:ng+nx_phys, ng+1:ng+ny_phys)`. class(restart_registry_t), intent(inout) :: this character(len=*), intent(in) :: tag real(wp), target, intent(in) :: arr(:, :) integer, intent(in) :: ng, nx_phys, ny_phys logical, intent(in), optional :: optional, device_mapped if (this%n >= MAX_RESTART_ENTRIES) then call logger%error("restart registry full ("//to_string(MAX_RESTART_ENTRIES)// & " entries); bump MAX_RESTART_ENTRIES") error stop "restart registry overflow" end if this%n = this%n + 1 this%entries(this%n)%tag = tag this%entries(this%n)%rank = 2 this%entries(this%n)%p2 => arr this%entries(this%n)%ng = ng this%entries(this%n)%nx_phys = nx_phys this%entries(this%n)%ny_phys = ny_phys this%entries(this%n)%nk = 0 if (present(optional)) this%entries(this%n)%optional = optional if (present(device_mapped)) this%entries(this%n)%device_mapped = device_mapped end subroutine registry_register_2d