diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES index 72f98c217d..f2cb4f5e12 100644 --- a/src/DEPENDENCIES +++ b/src/DEPENDENCIES @@ -180,6 +180,8 @@ physics.o: search.o physics.o: string.o physics.o: tally.o +plot_header.o: constants.o + plot.o: constants.o plot.o: error.o plot.o: geometry.o diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 36ff24fd36..3a7bb02806 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1127,6 +1127,10 @@ contains pl % id = plot_(i) % id pl % aspect = plot_(i) % aspect + ! Set output file path + pl % path_plot = trim(path_input) // trim(to_str(pl % id)) // & + "_" // trim(plot_(i) % filename) // ".ppm" + ! Copy plot pixel size if (size(plot_(i) % pixels) == 2) then pl % pixels = plot_(i) % pixels diff --git a/src/plot.F90 b/src/plot.F90 index ef93fecf4f..61d0ea74dd 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -151,10 +151,8 @@ contains type(Image), intent(in) :: img integer :: i, j - character(MAX_LINE_LEN) :: path_plot ! unit for binary plot file - path_plot = trim(path_input) // "slice" // trim(to_str(pl % id)) // ".ppm" - open(UNIT=UNIT_PLOT, FILE=path_plot) + open(UNIT=UNIT_PLOT, FILE=pl % path_plot) write(UNIT_PLOT, '(A2)') 'P6' write(UNIT_PLOT, '(I0,'' '',I0)') img%width, img%height diff --git a/src/plot_header.F90 b/src/plot_header.F90 index b2f849ea99..294a7d0f5d 100644 --- a/src/plot_header.F90 +++ b/src/plot_header.F90 @@ -1,5 +1,7 @@ module plot_header + use constants + implicit none !=============================================================================== @@ -16,6 +18,7 @@ module plot_header type Plot integer :: id ! Unique ID + character(MAX_LINE_LEN) :: path_plot ! path for plot file integer :: type ! Type integer :: color_by ! quantity to color regions by real(8) :: origin(3) ! xyz center of plot location diff --git a/src/xml-fortran/templates/plots_t.xml b/src/xml-fortran/templates/plots_t.xml index e3f6903fe6..f01a21a836 100644 --- a/src/xml-fortran/templates/plots_t.xml +++ b/src/xml-fortran/templates/plots_t.xml @@ -15,6 +15,7 @@ +