assembleElementalMatrix1D Module Function

function assembleElementalMatrix1D(N, d1, d2, xy) result(Ie)

Routine to calculate the elemental mass/stiffness matrix based on the derivatives of the basis functions.

Currently only zero-th and first order derivatives are supported. Second order derivatives need to be reduced to first order derivatives in the problem formulation using Green's Theorem (i.e. derivation by parts)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: N

Number of nodes in basis function

integer, intent(in) :: d1

Derivative of the first basis function

integer, intent(in) :: d2

Derivative of the second basis function

real(kind=wp), intent(in), dimension(N):: xy

Coordinates of the 1D line element

Return Value real(kind=wp), dimension(N,N)

Output elemental matrix


Calls

proc~~assembleelementalmatrix1d~~CallsGraph proc~assembleelementalmatrix1d assembleElementalMatrix1D proc~integrate_basis_1d_ie integrate_basis_1d_Ie proc~assembleelementalmatrix1d->proc~integrate_basis_1d_ie interface~integrate integrate proc~integrate_basis_1d_ie->interface~integrate getalpha getalpha proc~integrate_basis_1d_ie->getalpha proc~integrate2d integrate2D interface~integrate->proc~integrate2d proc~integrate1d integrate1D interface~integrate->proc~integrate1d interface~gaussquad gaussquad proc~integrate2d->interface~gaussquad proc~integrate1d->interface~gaussquad proc~gaussquad gaussquad interface~gaussquad->proc~gaussquad proc~gaussquad_rosetta gaussquad_rosetta proc~gaussquad->proc~gaussquad_rosetta

Contents


Source Code

    module function assembleElementalMatrix1D(N, d1, d2, xy) result(Ie)

        !*  Routine to calculate the elemental mass/stiffness matrix
        !   based on the derivatives of the basis functions.
        !
        !   Currently only zero-th and first order derivatives are
        !   supported. Second order derivatives need to be reduced to
        !   first order derivatives in the problem formulation using
        !   Green's Theorem (i.e. derivation by parts)

        integer,  intent(in)                    :: N        !! Number of nodes in basis function
        integer,  intent(in)                    :: d1       !! Derivative of the first basis function
        integer,  intent(in)                    :: d2       !! Derivative of the second basis function
        real(wp), intent(in),   dimension(N)    :: xy       !! Coordinates of the 1D line element
        real(wp),               dimension(N,N)  :: Ie       !! Output elemental matrix

        integer :: ii, jj, order

        Ie = 0._wp

        order = N-1

        do ii = 1, N
            Ie(ii, :) = [( integrate_basis_1d_Ie(order, ii, jj, d1, d2, xy), jj = 1, order+1 )]
        enddo

        return
    end function assembleElementalMatrix1D