jacobian_side_second Module Function

pure elemental module function jacobian_side_second(self, i, j, r) result(jacobian)

Arguments

Type IntentOptional Attributes Name
class(type_side_second), intent(in) :: self
integer(kind=int32), intent(in) :: i
integer(kind=int32), intent(in) :: j
type(type_dp_vector_3d), intent(in) :: r

Return Value real(kind=real64)


Calls

proc~~jacobian_side_second~~CallsGraph proc~jacobian_side_second jacobian_side_second interface~dpsi_side_second type_side_second%dpsi_side_second proc~jacobian_side_second->interface~dpsi_side_second proc~get_coordinate abst_mesh%get_coordinate proc~jacobian_side_second->proc~get_coordinate proc~get_num_nodes~3 abst_mesh%get_num_nodes proc~jacobian_side_second->proc~get_num_nodes~3 proc~dpsi_side_second dpsi_side_second interface~dpsi_side_second->proc~dpsi_side_second

Called by

proc~~jacobian_side_second~~CalledByGraph proc~jacobian_side_second jacobian_side_second interface~jacobian_side_second type_side_second%jacobian_side_second interface~jacobian_side_second->proc~jacobian_side_second proc~jacobian_det_side_second jacobian_det_side_second proc~jacobian_det_side_second->interface~jacobian_side_second interface~jacobian_det_side_second type_side_second%jacobian_det_side_second interface~jacobian_det_side_second->proc~jacobian_det_side_second proc~get_length_side_second get_length_side_second proc~get_length_side_second->interface~jacobian_det_side_second interface~get_length_side_second type_side_second%get_length_side_second interface~get_length_side_second->proc~get_length_side_second

Source Code

    pure elemental module function jacobian_side_second(self, i, j, r) result(jacobian)
        implicit none
        class(type_side_second), intent(in) :: self
        integer(int32), intent(in) :: i ! Global coordinate direction (1=x, 2=y, 3=z)
        integer(int32), intent(in) :: j ! Local coordinate direction (1=ξ)
        type(type_dp_vector_3d), intent(in) :: r
        real(real64) :: jacobian

        integer(int32) :: k
        real(real64) :: dpsi_val
        type(type_dp_vector_3d) :: coord

        jacobian = 0.0d0

        ! The Jacobian is defined as J = sum(dNi/dξ * xi) over all nodes
        if (j == 1) then
            do k = 1, self%get_num_nodes()
                ! Get the shape function derivative at point r
                dpsi_val = self%dpsi(k, 1, r)
                ! Get the coordinates of node k
                coord = self%get_coordinate(k)

                select case (i)
                case (1) ! x-component
                    jacobian = jacobian + dpsi_val * coord%x
                case (2) ! y-component
                    jacobian = jacobian + dpsi_val * coord%y
                case (3) ! z-component
                    jacobian = jacobian + dpsi_val * coord%z
                end select
            end do
        end if

    end function jacobian_side_second