imk_spreadq0 Subroutine

public subroutine imk_spreadq0(this, lev, t0, flags, step)

Arguments

Type IntentOptional AttributesName
class(pf_imk_t), intent(inout) :: this
class(pf_level_t), intent(inout) :: lev
real(kind=pfdp), intent(in) :: t0
integer, intent(in), optional :: flags
integer, intent(in), optional :: step

Contents

Source Code


Source Code

  subroutine imk_spreadq0(this, lev, t0, flags, step)
    class(pf_imk_t),  intent(inout) :: this
    class(pf_level_t), intent(inout) :: lev
    real(pfdp),        intent(in   ) :: t0
    integer, optional,   intent(in)    :: flags, step

    integer m,p
    !  Stick initial condition into first node slot
    call lev%Q(1)%copy(lev%q0, 1)

    ! set initial omega to 0
    call lev%Q(1)%setval(0.0_pfdp)

    !  Evaluate F at first spot
    call lev%ulevel%sweeper%evaluate(lev, t0, 1)

    ! Spread F and solution to all nodes
    do m = 2, lev%nnodes
       call lev%Q(m)%copy(lev%Q(1), 1)
       call lev%Q(m)%copy(lev%Q(1))
       do p = 1, lev%ulevel%sweeper%npieces
         call lev%F(m,p)%copy(lev%F(1,p))
       end do
    end do

  end subroutine imk_spreadq0