MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_rt_sc_solvers.t File Reference

Go to the source code of this file.

Modules

module  mod_rt_sc_solvers
 Solvers of the short-characteristics (SC) radiative transfer and their dispatch.

Functions/Subroutines

subroutine, public mod_rt_sc_solvers::rt_sc_solve ()
 Collective, once per step. For each band on rt_sc_amr_level it sweeps all rays and forms the heating Q, the thin/thick blend with the tau^2 taper, in i_qrad, which is zero elsewhere, together with Fy, and Iout on the gather path. rt_sc_add_source applies the energy every stage. The gather path is for comparison only, see rt_sc_solve_gather.
subroutine mod_rt_sc_solvers::rt_sc_solve_gather ()
 Replicated gather, the original implementation, kept for comparison and not for production. Every rank holds chi and B of the whole band, the rays are shared out over the node-local ranks, and the moments are reduced within the node. Its memory grows with the whole band on every rank, and its periodic seam takes a vacuum inflow for rays swept column by column (sc_sweep_2d). Use KBA, pipelined or not.
logical function mod_rt_sc_solvers::rt_grid_index (xh, xv, ib, ig, jg)
 Indices (ig, jg) on the replicated grid of band ib of the cell centred at xh along hdim and xv along updim, false when the cell lies outside the band.
subroutine mod_rt_sc_solvers::rt_sc_validate_pipe ()
 Validation of the pipelined KBA. The ray-by-ray Q is copied into i_iout and the pipelined Q left in i_qrad, and the largest difference is printed relative to the largest Q, both over the whole band and away from the seam blocks, the outermost x-block on either side. Both solves start from the same seam inflow, since the first one hands its own on to the second.
subroutine mod_rt_sc_solvers::rt_band_blocks (ib)
 List the blocks of this rank that lie in band ib, with their block position (bi, bj), cache chi and B on them, ghosts included, and check that the band is one complete level.
subroutine copy_edge_row (iv_lo, iv_hi, iv_src)
 Rows iv_lo to iv_hi of the chi and B caches of block iblk take row iv_src.
subroutine mod_rt_sc_solvers::rt_tau_tops (tautop)
 Tau at the top face of every block row of the current band, per global column along hdim. Each block adds the optical thickness of its columns, one allreduce assembles the table, and the top of a row lies below all the rows above it.
subroutine mod_rt_sc_solvers::rt_block_tau (iblk, tautop, taub)
 Tau from the band top to every cell centre of block iblk, integrated down from the top face of the block.
subroutine mod_rt_sc_solvers::rt_wave_begin (nslot)
 Prologue of both KBA schedules on level rt_sc_amr_level. It checks the setup, sets the x-distribution mode, refreshes the hydro ghosts, allocates the intensity state and the seam buffers, and builds the nslot wavefront datatype. Each rank sweeps only its own band blocks, ordered per ray by the diagonal p+q counted from the ray's upwind corner, with a getbc between diagonals, so every cell is swept once per ray.
subroutine mod_rt_sc_solvers::rt_wave_band_open (ib)
 Open band ib. It lists and caches the band blocks and zeroes the accumulators.
subroutine mod_rt_sc_solvers::rt_wave_band_close (nslot)
 Close the band. The fluxes are scaled by c_norm, Q is formed as the imbalance or as the -div F blend with the tau^2 taper, and the nslot wavefront datatype is restored.
subroutine mod_rt_sc_solvers::rt_add_moments (iblk, k, iib)
 Add the weighted intensity iib of ray k on block iblk to J in i_qrad, Fy in i_frad and Fx in rtw_fx.
subroutine mod_rt_sc_solvers::rt_exchange (nslot)
 Ghost exchange of the nslot intensity columns of ps_rt from i_isw, with the physical boundaries left alone, since the inflows are written separately.
subroutine mod_rt_sc_solvers::rt_wave_end ()
 Epilogue. It hands the seam edges over to the next solve, restores the hydro datatype and releases the block list.
subroutine mod_rt_sc_solvers::rt_seam_read (iib, igrid, ibi, sx, k)
 Seam read. At the domain edge where ray k enters, the wrapped upwind ghost column of the block takes the outflow of the far edge from the last solve. A ray moving in +x enters through the first block column and reads seamR, and one moving in -x enters through the last and reads seamL.
subroutine mod_rt_sc_solvers::rt_seam_write (iib, igrid, ibi, sx, k)
 Seam write. At the far domain edge the outflow of ray k is kept for the next solve. A ray moving in +x leaves through the last block column into seamR, and one moving in -x leaves through the first into seamL.
subroutine mod_rt_sc_solvers::rt_inflow_ghosts (islot)
 Inflow intensity in slot islot. The ghosts beyond the band ends, and beyond the horizontal edges where hdim is not periodic, take B of the edge cell when that end is thermal and zero when it is open. The band ends are interior rows of the domain, so getbc never fills them.
subroutine fill_rows (iv_lo, iv_hi, iv_src, thermal)
 Ghost rows iv_lo to iv_hi, from the edge row iv_src.
subroutine mod_rt_sc_solvers::rt_sweep_one (iblk, k, iib)
 Sweep block iblk for ray k in place on iib. With updim = 1 the block is transposed around the kernel, which expects its first index to be horizontal. The sweep time of each block is accumulated for the load balancer.
pure integer function mod_rt_sc_solvers::wave_stage (b, n, s)
 Position of a block counted from the upwind end of a row of n blocks, for a ray whose cosine along that row has sign s. With s = 0 no block depends on its neighbour along the row, so every block sits at the first position.
subroutine mod_rt_sc_solvers::rt_sc_solve_wave ()
 Ray-by-ray KBA, with one ray at a time passing through the diagonal wavefront.
subroutine mod_rt_sc_solvers::rt_sc_solve_wave_pipe ()
 Pipelined KBA. The direction-sign corners run together in batches of nisw slots, and within each corner the rays follow one another through its wavefront. The result agrees with that of rt_sc_solve_wave to round-off, since the moments are summed in another order.

Function/Subroutine Documentation

◆ copy_edge_row()

subroutine rt_band_blocks::copy_edge_row ( integer, intent(in) iv_lo,
integer, intent(in) iv_hi,
integer, intent(in) iv_src )

Rows iv_lo to iv_hi of the chi and B caches of block iblk take row iv_src.

Definition at line 316 of file mod_rt_sc_solvers.t.

◆ fill_rows()

subroutine rt_inflow_ghosts::fill_rows ( integer, intent(in) iv_lo,
integer, intent(in) iv_hi,
integer, intent(in) iv_src,
logical, intent(in) thermal )

Ghost rows iv_lo to iv_hi, from the edge row iv_src.

Definition at line 601 of file mod_rt_sc_solvers.t.