magpicard_initialize Subroutine

public subroutine magpicard_initialize(this, lev)

Arguments

Type IntentOptional AttributesName
class(pf_magpicard_t), intent(inout) :: this
class(pf_level_t), intent(inout) :: lev

Calls

proc~~magpicard_initialize~~CallsGraph proc~magpicard_initialize magpicard_initialize proc~get_commutator_coefs get_commutator_coefs proc~magpicard_initialize->proc~get_commutator_coefs

Contents

Source Code


Source Code

  subroutine magpicard_initialize(this, lev)
    class(pf_magpicard_t), intent(inout) :: this
    class(pf_level_t), intent(inout) :: lev

    integer :: m, nnodes

    this%commutator_coefs = 0.0_pfdp
    this%npieces = 1
    nnodes = lev%nnodes

    allocate(this%dtsdc(nnodes-1))
    this%dtsdc = lev%nodes(2:nnodes) - lev%nodes(1:nnodes-1)   !  SDC time step size (unscaled)

    call get_commutator_coefs(this%qtype, nnodes, this%dt, this%commutator_coefs)

    call lev%ulevel%factory%create_array(this%omega, nnodes-1, &
         lev%index,  lev%shape)

    call lev%ulevel%factory%create_array(this%time_ev_op, nnodes-1, &
         lev%index,  lev%shape)

    do m = 1, nnodes-1
        call this%omega(m)%setval(0.0_pfdp)
        call this%time_ev_op(m)%setval(0.0_pfdp)
    end do

  end subroutine magpicard_initialize