Register a host scalar (rank-0 persistent state, e.g. the Chapman
eta_old_chapman_* corner values). Host-only — never device-
mapped, so the write path skips update self for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(restart_registry_t), | intent(inout) | :: | this | |||
| character(len=*), | intent(in) | :: | tag | |||
| real(kind=wp), | intent(in), | target | :: | scal | ||
| logical, | intent(in), | optional | :: | optional |
subroutine registry_register_scalar(this, tag, scal, optional) !! Register a host scalar (rank-0 persistent state, e.g. the Chapman !! `eta_old_chapman_*` corner values). Host-only — never device- !! mapped, so the write path skips `update self` for it. class(restart_registry_t), intent(inout) :: this character(len=*), intent(in) :: tag real(wp), target, intent(in) :: scal logical, intent(in), optional :: optional 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 = 0 this%entries(this%n)%p0 => scal this%entries(this%n)%device_mapped = .false. if (present(optional)) this%entries(this%n)%optional = optional end subroutine registry_register_scalar