get_thc_ptr Subroutine

private subroutine get_thc_ptr(self, region_id, thc_ptr)

Type Bound

type_material_manager

Arguments

Type IntentOptional Attributes Name
class(type_material_manager), intent(inout), target :: self
integer(kind=int32), intent(in) :: region_id
class(abst_thc), intent(inout), pointer :: thc_ptr

Called by

proc~~get_thc_ptr~~CalledByGraph proc~get_thc_ptr type_material_manager%get_thc_ptr none~get_thc type_material_manager%get_thc none~get_thc->proc~get_thc_ptr proc~calculate_thc_holder calculate_thc_holder proc~calculate_thc_holder->none~get_thc proc~calculate_thc_ptr calculate_thc_ptr proc~calculate_thc_ptr->none~get_thc

Source Code

    subroutine get_thc_ptr(self, region_id, thc_ptr)
        class(type_material_manager), intent(inout), target :: self
        integer(int32), intent(in) :: region_id
        class(abst_thc), intent(inout), pointer :: thc_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_thc_ptr:", region_id
            nullify (thc_ptr)
            call exit(-1)
        end if

        thc_ptr => self%thc(model_index)%p

    end subroutine get_thc_ptr