psi_triangle_second Module Function

pure elemental module function psi_triangle_second(self, i, r) result(psi)

Arguments

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

Return Value real(kind=real64)


Called by

proc~~psi_triangle_second~~CalledByGraph proc~psi_triangle_second psi_triangle_second interface~psi_triangle_second type_triangle_second%psi_triangle_second interface~psi_triangle_second->proc~psi_triangle_second proc~is_in_triangle_second is_in_triangle_second proc~is_in_triangle_second->interface~psi_triangle_second interface~is_in_triangle_second type_triangle_second%is_in_triangle_second interface~is_in_triangle_second->proc~is_in_triangle_second

Source Code

    pure elemental module function psi_triangle_second(self, i, r) result(psi)
        implicit none
        class(type_triangle_second), intent(in) :: self
        integer(int32), intent(in) :: i
        type(type_dp_vector_3d), intent(in) :: r
        real(real64) :: psi
        select case (i)
        case (1)
            psi = r%x * (2.0d0 * r%x - 1.0d0)
        case (2)
            psi = r%y * (2.0d0 * r%y - 1.0d0)
        case (3)
            psi = (1.0d0 - r%x - r%y) * (1.0d0 - 2.0d0 * r%x - 2.0d0 * r%y)
        case (4)
            psi = 4.0d0 * r%x * r%y
        case (5)
            psi = 4.0d0 * (1.0d0 - r%x - r%y) * r%y
        case (6)
            psi = 4.0d0 * r%x * (1.0d0 - r%x - r%y)
        case default
            psi = 0.0d0
        end select
    end function psi_triangle_second