get_phase_sphs Function

private function get_phase_sphs(self, material_id) result(phase_property)

Type Bound

type_properties_manager

Arguments

Type IntentOptional Attributes Name
class(type_properties_manager), intent(in) :: self
integer(kind=int32), intent(in) :: material_id

Return Value type(type_phase_property)


Calls

proc~~get_phase_sphs~~CallsGraph proc~get_phase_sphs type_properties_manager%get_phase_sphs proc~get_sph_ptr type_material_manager%get_sph_ptr proc~get_phase_sphs->proc~get_sph_ptr

Source Code

    function get_phase_sphs(self, material_id) result(phase_property)
        implicit none
        class(type_properties_manager), intent(in) :: self
        integer(int32), intent(in) :: material_id
        type(type_phase_property) :: phase_property

        class(abst_sph), pointer :: sph_ptr => null()

        sph_ptr => self%materials%get_sph(material_id)

#ifdef USE_DEBUG
        if (.not. associated(sph_ptr)) then
            print *, "Error in get_phase_property: Failed to get specific heat pointer for material_id =", material_id
            stop "FATAL ERROR: SPECIFIC HEAT POINTER NOT FOUND"
        end if
#endif

        phase_property%solid = sph_ptr%material1
        phase_property%water = sph_ptr%material2
        phase_property%ice = sph_ptr%material3
        phase_property%gas = sph_ptr%material4

    end function get_phase_sphs