mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Changed Plot derived type to PlotSlice and plotter module to plot.
This commit is contained in:
parent
68698091b0
commit
b85ef9ae76
6 changed files with 22 additions and 19 deletions
|
|
@ -10,7 +10,7 @@ module global
|
|||
use material_header, only: Material
|
||||
use mesh_header, only: StructuredMesh
|
||||
use particle_header, only: Particle
|
||||
use plot_header, only: Plot
|
||||
use plot_header, only: PlotSlice
|
||||
use set_header, only: SetInt
|
||||
use source_header, only: ExtSource
|
||||
use tally_header, only: TallyObject, TallyMap, TallyResult
|
||||
|
|
@ -36,12 +36,12 @@ module global
|
|||
! GEOMETRY-RELATED VARIABLES
|
||||
|
||||
! Main arrays
|
||||
type(Cell), allocatable, target :: cells(:)
|
||||
type(Universe), allocatable, target :: universes(:)
|
||||
type(Lattice), allocatable, target :: lattices(:)
|
||||
type(Surface), allocatable, target :: surfaces(:)
|
||||
type(Material), allocatable, target :: materials(:)
|
||||
type(Plot), allocatable, target :: plots(:)
|
||||
type(Cell), allocatable, target :: cells(:)
|
||||
type(Universe), allocatable, target :: universes(:)
|
||||
type(Lattice), allocatable, target :: lattices(:)
|
||||
type(Surface), allocatable, target :: surfaces(:)
|
||||
type(Material), allocatable, target :: materials(:)
|
||||
type(PlotSlice), allocatable, target :: plots(:)
|
||||
|
||||
! Size of main arrays
|
||||
integer :: n_cells ! # of cells
|
||||
|
|
|
|||
|
|
@ -1983,7 +1983,7 @@ contains
|
|||
integer n_cols, col_id
|
||||
logical :: file_exists ! does plots.xml file exist?
|
||||
character(MAX_LINE_LEN) :: filename ! absolute path to plots.xml
|
||||
type(Plot), pointer :: pl => null()
|
||||
type(PlotSlice), pointer :: pl => null()
|
||||
|
||||
! Check if plots.xml exists
|
||||
filename = trim(path_input) // "plots.xml"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ program main
|
|||
use fixed_source, only: run_fixedsource
|
||||
use global
|
||||
use initialize, only: initialize_run
|
||||
use plotter, only: run_plot
|
||||
use plot, only: run_plot
|
||||
|
||||
implicit none
|
||||
|
||||
|
|
|
|||
|
|
@ -1303,7 +1303,7 @@ contains
|
|||
subroutine print_plot()
|
||||
|
||||
integer :: i ! loop index for plots
|
||||
type(Plot), pointer :: pl => null()
|
||||
type(PlotSlice), pointer :: pl => null()
|
||||
|
||||
! Display header for plotting
|
||||
call header("PLOTTING SUMMARY")
|
||||
|
|
|
|||
12
src/plot.F90
12
src/plot.F90
|
|
@ -1,4 +1,4 @@
|
|||
module plotter
|
||||
module plot
|
||||
|
||||
use constants
|
||||
use error, only: fatal_error
|
||||
|
|
@ -24,7 +24,7 @@ contains
|
|||
subroutine run_plot()
|
||||
|
||||
integer :: i ! loop index for plots
|
||||
type(Plot), pointer :: pl => null()
|
||||
type(PlotSlice), pointer :: pl => null()
|
||||
|
||||
do i = 1, n_plots
|
||||
pl => plots(i)
|
||||
|
|
@ -48,7 +48,7 @@ contains
|
|||
|
||||
subroutine create_ppm(pl)
|
||||
|
||||
type(Plot), pointer :: pl
|
||||
type(PlotSlice), pointer :: pl
|
||||
|
||||
integer :: in_i
|
||||
integer :: out_i
|
||||
|
|
@ -163,8 +163,8 @@ contains
|
|||
|
||||
subroutine output_ppm(pl, img)
|
||||
|
||||
type(Plot), pointer :: pl
|
||||
type(Image), intent(in) :: img
|
||||
type(PlotSlice), pointer :: pl
|
||||
type(Image), intent(in) :: img
|
||||
|
||||
integer :: i ! loop index for height
|
||||
integer :: j ! loop index for width
|
||||
|
|
@ -190,4 +190,4 @@ contains
|
|||
|
||||
end subroutine output_ppm
|
||||
|
||||
end module plotter
|
||||
end module plot
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ module plot_header
|
|||
end type ObjectColor
|
||||
|
||||
!===============================================================================
|
||||
! PLOT holds plot information
|
||||
! PLOTSLICE holds plot information
|
||||
!===============================================================================
|
||||
|
||||
type Plot
|
||||
type PlotSlice
|
||||
integer :: id ! Unique ID
|
||||
character(MAX_LINE_LEN) :: path_plot ! path for plot file
|
||||
integer :: type ! Type
|
||||
|
|
@ -27,15 +27,18 @@ module plot_header
|
|||
integer :: pixels(2) ! pixel width/height of plot slice
|
||||
type(ObjectColor) :: not_found ! color for positions where no cell found
|
||||
type(ObjectColor), allocatable :: colors(:) ! colors of cells/mats
|
||||
end type Plot
|
||||
end type PlotSlice
|
||||
|
||||
! Plot type -- note that only slice plots are implemented currently
|
||||
integer, parameter :: PLOT_TYPE_SLICE = 1
|
||||
integer, parameter :: PLOT_TYPE_POINTS = 2
|
||||
|
||||
! Plot basis plane
|
||||
integer, parameter :: PLOT_BASIS_XY = 1
|
||||
integer, parameter :: PLOT_BASIS_XZ = 2
|
||||
integer, parameter :: PLOT_BASIS_YZ = 3
|
||||
|
||||
! Indicate whether color refers to unique cell or unique material
|
||||
integer, parameter :: PLOT_COLOR_CELLS = 1
|
||||
integer, parameter :: PLOT_COLOR_MATS = 2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue