export an iteration from the solver
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nlesolver_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
real(kind=wp), | intent(in), | dimension(:) | :: | f | ||
integer, | intent(in) | :: | iter |
iteration number |
subroutine halo_export(me,x,f,iter) use iso_fortran_env, ip => int64 implicit none class(nlesolver_type),intent(inout) :: me real(wp),dimension(:),intent(in) :: x real(wp),dimension(:),intent(in) :: f integer,intent(in) :: iter !! iteration number integer(ip),save :: count_start, count_end, count_rate call system_clock(count = count_end, count_rate=count_rate) if (iter==1) then write(*,'(A4,1X,*(A30,1X))') 'ITER', 'NORM(X)', 'NORM(F)', 'DT(sec)' end if if (iter==1) then write(*,'(I4,1X,2(F30.16,1X),a1)') iter, norm2(x), norm2(f), '' else write(*,'(I4,1X,2(F30.16,1X),*(I30,1x))') iter, norm2(x), norm2(f), & int((count_end-count_start)/real(count_rate,wp), ip) end if !write(*,'(I4,1X,*(F30.16,1X))') iter, x count_start = count_end end subroutine halo_export