should_calculate_target Function

private pure function should_calculate_target(self, target_id, i_material) result(is_active)

Type Bound

type_controls

Arguments

Type IntentOptional Attributes Name
class(type_controls), intent(in) :: self
integer, intent(in) :: target_id
integer(kind=int32), intent(in) :: i_material

Return Value logical


Called by

proc~~should_calculate_target~~CalledByGraph proc~should_calculate_target type_controls%should_calculate_target proc~process_element_hydraulic_linear_1 process_element_hydraulic_linear_1 proc~process_element_hydraulic_linear_1->proc~should_calculate_target proc~update_type_thermal_crs update_type_thermal_crs proc~update_type_thermal_crs->proc~should_calculate_target interface~update_type_thermal_crs type_thermal_crs%update_type_thermal_crs interface~update_type_thermal_crs->proc~update_type_thermal_crs proc~hydraulic_assemble_system_linear_1 hydraulic_assemble_system_linear_1 proc~hydraulic_assemble_system_linear_1->proc~process_element_hydraulic_linear_1 proc~hydraulic_assemble_system_linear_1_parallel hydraulic_assemble_system_linear_1_parallel proc~hydraulic_assemble_system_linear_1_parallel->proc~process_element_hydraulic_linear_1

Source Code

    pure function should_calculate_target(self, target_id, i_material) result(is_active)
        implicit none
        class(type_controls), intent(in) :: self
        integer, intent(in) :: target_id
        integer(int32), intent(in) :: i_material
        logical :: is_active

        is_active = .false.

        ! 高速な整数比較
        select case (target_id)
        case (calc_thermal)
#ifdef USE_DEBUG
            if (allocated(self%thermal)) then
                if (i_material <= ubound(self%thermal, 1)) then
#endif
                    is_active = self%thermal(i_material)
#ifdef USE_DEBUG
                end if
            end if
#endif

        case (calc_hydraulic)
#ifdef USE_DEBUG
            if (allocated(self%hydraulic)) then
                if (i_material <= ubound(self%hydraulic, 1)) then
#endif
                    is_active = self%hydraulic(i_material)
#ifdef USE_DEBUG
                end if
            end if
#endif

        case (calc_mechanical)
#ifdef USE_DEBUG
            if (allocated(self%mechanical)) then
                if (i_material <= ubound(self%mechanical, 1)) then
#endif
                    is_active = self%mechanical(i_material)
#ifdef USE_DEBUG
                end if
            end if
#endif
        end select
    end function should_calculate_target