get_vhc_ptr Subroutine

private subroutine get_vhc_ptr(self, region_id, vhc_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_vhc), intent(inout), pointer :: vhc_ptr

Called by

proc~~get_vhc_ptr~~CalledByGraph proc~get_vhc_ptr type_material_manager%get_vhc_ptr none~get_vhc type_material_manager%get_vhc none~get_vhc->proc~get_vhc_ptr proc~calculate_heat_capacity_holder calculate_heat_capacity_holder proc~calculate_heat_capacity_holder->none~get_vhc proc~calculate_heat_capacity_ptr calculate_heat_capacity_ptr proc~calculate_heat_capacity_ptr->none~get_vhc

Source Code

    subroutine get_vhc_ptr(self, region_id, vhc_ptr)
        class(type_material_manager), intent(inout), target :: self
        integer(int32), intent(in) :: region_id
        class(abst_vhc), intent(inout), pointer :: vhc_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_vhc_ptr:", region_id
            nullify (vhc_ptr)
            call exit(-1)
        end if

        vhc_ptr => self%vhc(model_index)%p

    end subroutine get_vhc_ptr