|
| subroutine, public | mod_rt_sc_state::rt_sc_params_read (files) |
| | Read &rt_list from each parameter file. The values stay physical until rt_sc_setup, and a file without the namelist is passed over.
|
| subroutine, public | mod_rt_sc_state::rt_sc_setup () |
| | Check the geometry, convert the parameters to code units, resolve the bands and the boundary conditions, and bind rt_sc_chiB to the chosen opacity. Runs after the unit system is fixed.
|
| subroutine | mod_rt_sc_state::rt_sc_axis_cosines () |
| | Map the quadrature onto the RT grid axes (hdim, updim). Called after rt_sc_init.
|
| pure subroutine | mod_rt_sc_state::hv (ih, iv, i1, i2) |
| | Block indices (i1, i2) of the cell at position ih along hdim and iv along updim.
|
| subroutine, public | mod_rt_sc_state::rt_sc_reserve_slots () |
| | Reserve the wavefront intensity slots in ps_rt, four in all, one per sweep corner, of which the ray-by-ray wave uses only the first. Called from rt_sc_activate, and does nothing unless rt_sc_distributed is set.
|
| subroutine | mod_rt_sc_state::rt_sc_alloc_state () |
| | Allocate ps_rt(igrid)w on every active block and zero it, sharing the geometry of ps, which getbc reads. With bcphys off only w is exchanged. Blocks created by a regrid get their state at the next solve, and blocks that go inactive keep it until they are reused.
|
| subroutine | mod_rt_sc_state::rt_sc_seam_alloc (dnxv, nray) |
| | Allocate the seam buffers once, or again when the row or ray count changes, and zero the buffers written this solve.
|
| subroutine | mod_rt_sc_state::rt_sc_seam_finalize (dnxv, nray) |
| | Sum the seam edges of this solve over the ranks, where each edge has a single owner, and keep them for the next solve.
|
| subroutine | mod_rt_sc_state::rt_allreduce_chunk (a, n1, n2, comm) |
| | In-place sum allreduce of a 2D array in chunks of whole columns of about 1 MB.
|
|
| logical, public | mod_rt_sc_state::rt_sc_active = .false. |
| | True when the physics module has switched the RT on, with hd_radiative_transfer or mhd_radiative_transfer, through rt_sc_activate.
|
| integer, public | mod_rt_sc_state::rt_sc_updim = -1 |
| | Axis of the stratification, 1 for x and 2 for y. The default of -1 takes the last axis.
|
| integer, public | mod_rt_sc_state::rt_sc_amr_level = 1 |
| | The AMR level the RT runs on. The bands are held at this level so that the RT sees a uniform grid, and it cannot exceed refine_max_level.
|
| double precision, public | mod_rt_sc_state::rt_sc_blend_t0 = 2.0d4 |
| | Centre and half-width in K of the temperature gate in rt_sc_thin_weight, which divides the radiative losses between the SC transfer and the thin cooling.
|
| double precision, public | mod_rt_sc_state::rt_sc_blend_dt = 5.0d3 |
| integer, parameter | mod_rt_sc_state::rt_sc_maxband = 8 |
| | The RT bands along updim, of which a bar with a photosphere at each end needs two. The edges are in cm, with -1e30 and +1e30 standing for the domain ends, and each end has its own incoming-intensity condition, 'thermal' or 'open'.
|
| integer, public | mod_rt_sc_state::rt_sc_nband = 1 |
| double precision, dimension(rt_sc_maxband), public | mod_rt_sc_state::rt_sc_band_min = -1.0d30 |
| double precision, dimension(rt_sc_maxband), public | mod_rt_sc_state::rt_sc_band_max = 1.0d30 |
| character(len=10), dimension(rt_sc_maxband), public | mod_rt_sc_state::rt_sc_bc_min = 'thermal' |
| character(len=10), dimension(rt_sc_maxband), public | mod_rt_sc_state::rt_sc_bc_max = 'open' |
| character(len=10), public | mod_rt_sc_state::rt_sc_bc_hmin = 'open' |
| | Incoming intensity at the horizontal edges where they are not periodic, 'open' for I = 0 or 'thermal' for I = B of the edge column.
|
| character(len=10), public | mod_rt_sc_state::rt_sc_bc_hmax = 'open' |
| logical, public | mod_rt_sc_state::rt_sc_flux_blend = .true. |
| | rt_sc_flux_blend blends the thin heating c chi (J - B) with the thick -div F. rt_sc_cfl limits the heating so that one stage changes the gas energy by at most that fraction of itself
|
| double precision, public | mod_rt_sc_state::rt_sc_cfl = 0.5d0 |
| logical, public | mod_rt_sc_state::rt_sc_debug = .false. |
| | Prints the cumulative RT timing every 10 solves.
|
| double precision, public | mod_rt_sc_state::rt_sc_fi_thresh = -1.0d0 |
| | Not read by the RT itself. The user files set it from eoseint_rho_FI_threshold for their own SC source.
|
| integer, public | mod_rt_sc_state::i_qrad = -1 |
| | Extra-variable indices of the heating Q, the vertical flux F and the emergent intensity Iout, left at -1 when they are not registered.
|
| integer, public | mod_rt_sc_state::i_frad = -1 |
| integer, public | mod_rt_sc_state::i_iout = -1 |
| double precision, public | mod_rt_sc_state::rt_sc_ftau1 = 0.0d0 |
| | Horizontal mean of the flux on the tau = rt_sc_tau_emergent surface, from rt_sc_emergent_tau1. A flux controller should read this one, because Frad still grows by 10-16% above tau = 1 and the flux at the band top therefore reads high.
|
| double precision, public | mod_rt_sc_state::rt_sc_tau_emergent = 1.0d0 |
| logical, public | mod_rt_sc_state::rt_sc_distributed = .true. |
| | The distributed KBA wavefront. Each rank sweeps only its own band blocks, one diagonal at a time, with a getbc of the ray intensity between diagonals, so no rank ever holds the whole slab. Its intensity slots are reserved by rt_sc_activate. Setting it false selects the replicated gather, the original implementation, kept for comparison only: it holds the whole band on every rank and its periodic seam is not exact. Production runs should keep KBA.
|
| logical, public | mod_rt_sc_state::rt_sc_pipeline = .true. |
| | The pipelined KBA. The four sweep corners run at once, each with its own intensity slot, and the rays of a corner follow one another through the wavefront. It agrees with the ray-by-ray wave to round-off and is 1.4-1.8 times faster.
|
| logical, public | mod_rt_sc_state::rt_sc_valpipe = .false. |
| | For validation, runs the ray-by-ray and pipelined waves on the same state and prints max|dQ|.
|
| integer | mod_rt_sc_state::i_isw = -1 |
| | First column of the ray intensity in ps_rt, and -1 until reserved. It is the only field getbc exchanges during a sweep, because chi and B are cached per block while J and Fy accumulate in i_qrad and i_frad, perhaps confusingly but it works and prevents size creep in ps_rt.
|
| integer | mod_rt_sc_state::nisw = 1 |
| | Number of intensity slots, one for the ray-by-ray wave and up to four when pipelined.
|
| type(state), dimension(:), allocatable, target | mod_rt_sc_state::ps_rt |
| | The RT intensity state. It is kept out of the hydro w so that it skips the stage copies, the prolongation and the output, and getbc exchanges it with bcphys off. rt_sc_alloc_state allocates it per block.
|
| logical | mod_rt_sc_state::rt_sc_seam_warned = .false. |
| logical | mod_rt_sc_state::rt_sc_seam_on = .true. |
| | The periodic seam of the single-pass KBA. A ray crossing the seam takes as its inflow the outflow at the far edge from the previous solve, which is exact at steady state. The buffers are indexed by global row along updim and by ray. seamR holds the right-hand outflow of the last block column, which feeds the +x wrap into the first, and seamL the reverse. The _prev buffers are read and the _cur buffers written, the allreduce at the end of each solve makes them global, and both start at zero. With rt_sc_seam_on false the seam inflow stays zero.
|
| double precision, dimension(:,:), allocatable | mod_rt_sc_state::rt_sc_seaml_prev |
| double precision, dimension(:,:), allocatable | mod_rt_sc_state::rt_sc_seamr_prev |
| double precision, dimension(:,:), allocatable | mod_rt_sc_state::rt_sc_seaml_cur |
| double precision, dimension(:,:), allocatable | mod_rt_sc_state::rt_sc_seamr_cur |
| integer | mod_rt_sc_state::rt_node_comm = -1 |
| | Node-local communicator for the moment reduction of the gather. The ranks reach that reduction far out of step because of the ray imbalance, and inter-node collectives under such a stagger fail on the tcp/ofi provider. Each node therefore forms the full moments from its own copy of the field.
|
| integer | mod_rt_sc_state::rt_node_rank = 0 |
| integer | mod_rt_sc_state::rt_node_size = 1 |
| integer | mod_rt_sc_state::rt_lead_comm = -1 |
| | Communicator of one leader rank per node. The field gather sums within each node, then over the leaders, and then broadcasts within the node, so that no collective spans all the ranks. The tcp provider refuses those at 46 Mm.
|
| double precision, public | mod_rt_sc_state::rt_wt_gath =0.d0 |
| | Cumulative wall time of the field gather, the sweep, the moment reduction and the scatter, and of the wave, together with the number of solves.
|
| double precision, public | mod_rt_sc_state::rt_wt_swp =0.d0 |
| double precision, public | mod_rt_sc_state::rt_wt_red =0.d0 |
| double precision, public | mod_rt_sc_state::rt_wt_scat =0.d0 |
| double precision, public | mod_rt_sc_state::rt_wt_wave =0.d0 |
| integer, public | mod_rt_sc_state::rt_nsolve =0 |
| double precision, dimension(:,:,:), allocatable | mod_rt_sc_state::rtw_chib |
| | Block chi and B including the ghosts, rebuilt every solve, and the block horizontal flux Fx for the -div F blend. Fy accumulates in i_frad instead, and Fx is copied into ps_rt for its ghost exchange when the band closes.
|
| double precision, dimension(:,:,:), allocatable | mod_rt_sc_state::rtw_bb |
| double precision, dimension(:,:,:), allocatable | mod_rt_sc_state::rtw_fx |
| integer | mod_rt_sc_state::wv_nblk |
| | The band blocks of this rank with their block position (bi, bj), the block rows of the current band and its longest diagonal, and the wrap and seam modes of the KBA.
|
| integer | mod_rt_sc_state::wv_nbxv |
| integer | mod_rt_sc_state::wv_dmax |
| integer, dimension(:), allocatable | mod_rt_sc_state::wv_ig |
| integer, dimension(:), allocatable | mod_rt_sc_state::wv_bi |
| integer, dimension(:), allocatable | mod_rt_sc_state::wv_bj |
| logical | mod_rt_sc_state::wv_xwrap |
| logical | mod_rt_sc_state::wv_seam |
| double precision, dimension(:), allocatable | mod_rt_sc_state::mu_h |
| | Ray cosines along the RT grid axes (hdim, updim). They are (mux, muy) for updim = 2 and the swapped pair for updim = 1.
|
| double precision, dimension(:), allocatable | mod_rt_sc_state::mu_v |
| integer | mod_rt_sc_state::updim = 2 |
| integer | mod_rt_sc_state::hdim = 1 |
| double precision, dimension(rt_sc_maxband) | mod_rt_sc_state::band_lo_c |
| double precision, dimension(rt_sc_maxband) | mod_rt_sc_state::band_hi_c |
| logical | mod_rt_sc_state::rt_sc_ready = .false. |
| integer | mod_rt_sc_state::rg_nh |
| | The RT grid on rt_sc_amr_level along (hdim, updim): cells across the domain, cells per block, blocks across the width, cell sizes and the lower domain edges, with the cell and block rows of each band.
|
| integer | mod_rt_sc_state::rg_nv |
| integer | mod_rt_sc_state::rg_bh |
| integer | mod_rt_sc_state::rg_bv |
| integer | mod_rt_sc_state::rg_nbh |
| double precision | mod_rt_sc_state::rg_dh |
| double precision | mod_rt_sc_state::rg_dv |
| double precision | mod_rt_sc_state::rg_hlo |
| double precision | mod_rt_sc_state::rg_vlo |
| integer, dimension(rt_sc_maxband) | mod_rt_sc_state::band_nv |
| integer, dimension(rt_sc_maxband) | mod_rt_sc_state::band_nbv |
| integer, dimension(2) | mod_rt_sc_state::eh |
| | Unit steps of hdim and updim in block index space and the block index ranges along them, so that a loop written in (h, v) serves either stratification axis.
|
| integer, dimension(2) | mod_rt_sc_state::ev |
| integer | mod_rt_sc_state::imlo_h |
| integer | mod_rt_sc_state::imhi_h |
| integer | mod_rt_sc_state::imlo_v |
| integer | mod_rt_sc_state::imhi_v |
| integer | mod_rt_sc_state::iglo_h |
| integer | mod_rt_sc_state::ighi_h |
| integer | mod_rt_sc_state::iglo_v |
| integer | mod_rt_sc_state::ighi_v |