save Subroutine

public subroutine save(lev, flags)

Save current solution and function value so that future corrections can be computed

Arguments

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

Level to save on

integer, intent(in), optional :: flags

which component to save (state/adjoint)


Contents

Source Code


Source Code

  subroutine save(lev, flags)
    class(pf_level_t), intent(inout) :: lev  !!  Level to save on
    integer, optional, intent(in)   :: flags !!  which component to save (state/adjoint)
    integer :: m, p
    

    if (lev%Finterp) then
       if (allocated(lev%pFflt)) then
          do m = 1, lev%nnodes
             do p = 1,size(lev%F(1,:))
                call lev%pF(m,p)%copy(lev%F(m,p), flags)
             end do
             call lev%pQ(m)%copy(lev%Q(m), flags)
          end do
       end if
    else
       if (allocated(lev%pQ)) then
          do m = 1, lev%nnodes
             call lev%pQ(m)%copy(lev%Q(m), flags)
          end do
       end if
    end if
  end subroutine save