initialize_global_mats Module Subroutine

subroutine initialize_global_mats(num_nodes, GlobalA, GlobalB, GlobalX)

This routine initalizes the global stiffness matrix, global rhs vector, and global solution vector based on the number of nodes in the system

  • This is a Another bullet point

  • This might be a number 2. Also a number?

Some :

Arguments

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

The number of nodes in the system

real(kind=wp), intent(out), dimension(:,:), allocatable:: GlobalA

Global mass matrix

real(kind=wp), intent(out), dimension(:), allocatable:: GlobalB

Global RHS Vector

real(kind=wp), intent(out), dimension(:), allocatable:: GlobalX

Global solution vector


Contents


Source Code

    module subroutine initialize_global_mats(num_nodes, &
            GlobalA, &
            GlobalB, &
            GlobalX)

        !*  This routine initalizes the global stiffness matrix, global
        !   rhs vector, and global solution vector based on the number of
        !   nodes in the system
        !
        ! * This is a Another                               bullet point
        !
        ! 1. This might be a number 2. Also a number?
        !
        ! Some \( \LaTeX \): $$ \frac{\partial u}{\partial t} = 0 $$

        integer,  intent(in)                                :: num_nodes  !! The number of nodes in the system
        real(wp), intent(out),  dimension(:),   allocatable :: GlobalB    !! Global RHS Vector
        real(wp), intent(out),  dimension(:),   allocatable :: GlobalX    !! Global solution vector
        real(wp), intent(out),  dimension(:,:), allocatable :: GlobalA    !! Global mass matrix

        allocate(GlobalA(num_nodes, num_nodes))
        allocate(GlobalB(num_nodes))
        allocate(GlobalX(num_nodes))

        ! Intial Conditions
        GlobalA = 0._wp
        GlobalX = 0._wp
        GlobalB = 0._wp

        return
    end subroutine initialize_global_mats