Skip to content

Commit

Permalink
Add time=0 to profile output
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Jan 30, 2023
1 parent 343d8ff commit f71a40c
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 54 deletions.
19 changes: 15 additions & 4 deletions src/lib_profile.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ subroutine run_profile(bbq_in)

! Initaly setup the composition
out% xa = in(1)% xa
! Add initial line
call output_profile(fout, total_time, in(1), out)

do i=1,profile_in% num_loops

do j=1,num_lines
in(j)% xa = out% xa
call do_profile_burn(in(j), out, bbq_in, total_time, fout, ierr )
Expand Down Expand Up @@ -126,16 +127,26 @@ subroutine do_profile_burn(in, out, bbq_in, total_time, fout, ierr)
call do_burn(in, out, bbq_in, ierr )
if(ierr/=0) return

total_time = total_time + in% time
call output_profile(fout, total_time,in,out)


end subroutine do_profile_burn

subroutine output_profile(fout,total_time, in, out)
type(inputs_t) :: in
type(outputs_t) :: out
real(dp) :: total_time
integer :: fout, j

write(fout,'(4(1pe26.16,1X))', ROUND='COMPATIBLE',ADVANCE='no') total_time, in% time, in% logT, in% logRho

do j=1, size(in% xa)
write(fout,'(1pe26.16,1X)', ROUND='COMPATIBLE',ADVANCE='no') out% xa(j)
end do
write(fout,*)

total_time = total_time + in% time

end subroutine do_profile_burn
end subroutine output_profile


end module profile_lib
Loading

0 comments on commit f71a40c

Please sign in to comment.