get_length_side_first Module Function

pure module function get_length_side_first(self) result(length)

Arguments

Type IntentOptional Attributes Name
class(type_side_first), intent(in) :: self

Return Value real(kind=real64)


Calls

proc~~get_length_side_first~~CallsGraph proc~get_length_side_first get_length_side_first proc~get_coordinate abst_mesh%get_coordinate proc~get_length_side_first->proc~get_coordinate

Called by

proc~~get_length_side_first~~CalledByGraph proc~get_length_side_first get_length_side_first interface~get_length_side_first type_side_first%get_length_side_first interface~get_length_side_first->proc~get_length_side_first proc~jacobian_det_side_first jacobian_det_side_first proc~jacobian_det_side_first->interface~get_length_side_first interface~jacobian_det_side_first type_side_first%jacobian_det_side_first interface~jacobian_det_side_first->proc~jacobian_det_side_first

Source Code

    module pure function get_length_side_first(self) result(length)
        implicit none
        class(type_side_first), intent(in) :: self
        real(real64) :: length

        type(type_dp_vector_3d) :: coord1
        type(type_dp_vector_3d) :: coord2
        type(type_dp_vector_3d) :: delta

        ! オブジェクト自身が持つ get_coordinate メソッドを使用して節点座標を取得
        coord1 = self%get_coordinate(1)
        coord2 = self%get_coordinate(2)

        ! 2点間のベクトルを計算
        delta = coord2 - coord1

        ! ユークリッド距離(ベクトルの大きさ)を計算
        length = sqrt(delta%x**2 + delta%y**2 + delta%z**2)

    end function get_length_side_first