Generic routine to spread initial conditions Each sweeper can define its own spreadq0 or use this generic one
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pf_sweeper_t), | intent(in) | :: | this | |||
class(pf_level_t), | intent(inout) | :: | lev | Level on which to spread |
||
real(kind=pfdp), | intent(in) | :: | t0 | time at beginning of interval |
subroutine pf_generic_spreadq0(this,lev, t0)
class(pf_sweeper_t), intent(in) :: this
class(pf_level_t), intent(inout) :: lev !! Level on which to spread
real(pfdp), intent(in) :: t0 !! time at beginning of interval
integer :: m, p
! Stick initial condition into first node slot
call lev%Q(1)%copy(lev%q0)
! 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))
do p = 1, lev%ulevel%sweeper%npieces
call lev%F(m,p)%copy(lev%F(1,p))
end do
end do
end subroutine pf_generic_spreadq0