Lift1D Function

function Lift1D(n, v)

Initialize the lift matrix, , used to compute surface integral terms in the Discontinuous Galerkin formulation.

Arguments

Type IntentOptional AttributesName
integer(kind=ip), intent(in) :: n

The order of the Jacobi polynomials.

real(kind=wp), intent(in), dimension(n+1,n+1):: v

The Vandermonde matrix, .

Return Value real(kind=wp), dimension(n+1,2)

The return value is the lift matrix, , where is a array of the form


Called by

proc~~lift1d~~CalledByGraph proc~lift1d Lift1D proc~init_ref_element init_ref_element proc~init_ref_element->proc~lift1d interface~init_ref_element init_ref_element interface~init_ref_element->proc~init_ref_element interface~ref_element ref_element interface~ref_element->interface~init_ref_element proc~scal_schw_init scal_schw_init proc~scal_schw_init->interface~ref_element program~test test program~test->interface~ref_element interface~scal_schw_init scal_schw_init interface~scal_schw_init->proc~scal_schw_init

Contents

Source Code


Source Code

    function Lift1D ( n, v )
    !! Initialize the lift matrix, \(L_{ij}\), used to compute surface
    !! integral terms in the Discontinuous Galerkin formulation.
      integer(ip), intent(in) :: n
      !! The order of the Jacobi polynomials.
      real(wp), dimension(n+1,n+1), intent(in) :: v
      !! The Vandermonde matrix, \(\mathcal{V}_{ij}\).
      real(wp), dimension(n+1,2) :: Lift1D
      !! The return value is the lift matrix, \(L= \mathcal{V}
      !! \mathcal{V}^{\mathrm{T}}\mathcal{E}\), where \(\mathcal{E}\) is
      !! a \(n+1\times 2\) array of the form
      !! \[
      !!   \begin{pmatrix}
      !!     1 & 0 & \cdots & 0 & 0 \\
      !!     0 & 0 & \cdots & 0 & 1
      !!   \end{pmatrix}
      !! \]

      real(wp), dimension(n+1,2) :: emat
      integer(ip) :: i, j

      emat = 0.0_wp
      emat(1,1) = 1.0_wp
      emat(n+1,2) = 1.0_wp

      Lift1D = matmul(v,matmul(transpose(v),emat))
      return
    end function Lift1D