Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_material_manager), | intent(inout), | target | :: | self | ||
integer(kind=int32), | intent(in) | :: | region_id | |||
class(abst_sph), | intent(inout), | pointer | :: | sph_ptr |
subroutine get_sph_ptr(self, region_id, sph_ptr) class(type_material_manager), intent(inout), target :: self integer(int32), intent(in) :: region_id class(abst_sph), intent(inout), pointer :: sph_ptr integer(int32) :: model_index model_index = self%region_id_map(region_id) if (model_index == 0) then print *, "Error: Invalid region_id in get_sph_ptr:", region_id nullify (sph_ptr) call exit(-1) end if sph_ptr => self%sph(model_index)%p end subroutine get_sph_ptr