imexQ_integrate Subroutine

public subroutine imexQ_integrate(this, lev, qSDC, fSDC, dt, fintSDC, flags)

Subroutine to compute Picard integral of function values

Arguments

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

Current level

class(pf_encap_t), intent(in) :: qSDC(:)

Solution values

class(pf_encap_t), intent(in) :: fSDC(:,:)

RHS Function values

real(kind=pfdp), intent(in) :: dt

Time step

class(pf_encap_t), intent(inout) :: fintSDC(:)

Integral from t_n to t_m

integer, intent(in), optional :: flags

Contents

Source Code


Source Code

  subroutine imexQ_integrate(this, lev, qSDC, fSDC, dt, fintSDC, flags)
    class(pf_imexQ_t), intent(inout) :: this
    class(pf_level_t), intent(in   ) :: lev          !!  Current level
    class(pf_encap_t), intent(in   ) :: qSDC(:)      !!  Solution values
    class(pf_encap_t), intent(in   ) :: fSDC(:, :)   !!  RHS Function values
    real(pfdp),        intent(in   ) :: dt           !!  Time step
    class(pf_encap_t), intent(inout) :: fintSDC(:)   !!  Integral from t_n to t_m
    integer, optional, intent(in   ) :: flags    

    integer :: n, m

    do n = 1, lev%nnodes-1
       call fintSDC(n)%setval(0.0_pfdp)
       do m = 1, lev%nnodes
          if (this%explicit) &
               call fintSDC(n)%axpy(dt*lev%sdcmats%qmat(n,m), fSDC(m,1))
          if (this%implicit) &
               call fintSDC(n)%axpy(dt*lev%sdcmats%qmat(n,m), fSDC(m,2))
       end do
    end do
  end subroutine imexQ_integrate