MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_amr_advance.fpp.f90 File Reference

Contains module m_amr_advance. More...

Go to the source code of this file.

Modules

module  m_amr_advance
 Fine-block stage advance and the immersed-boundary/Lagrange fine services.

Functions/Subroutines

impure subroutine, public m_amr_advance::s_amr_setup_ib ()
 Compute the fine-grid IB state (markers/ghost points/levelset) for every active block from the body geometry (static-body AMR), once after the coarse IB setup: swap grid and IB globals to each owned block, run the fine IB pipeline, restore.
impure subroutine m_amr_advance::s_amr_ib_correct_fine (q_prim_b, pb_in, mv_in)
 Apply the IB state correction on the current fine block after its RK update, mirroring the coarse s_ibm_correct_state. amr_cur is set by the caller.
impure subroutine m_amr_advance::s_amr_fine_hooks_post_ib ()
 The clamps after the IB correction on the current fine block; the species cleanup's report reads the block's own markers.
impure subroutine m_amr_advance::s_amr_update_mib_fine ()
 Rebuild the current fine block's IB state from the moving body's position (prescribed motion, moving_ibm==1) by reusing the coarse s_update_mib on the swapped-in slot. Must precede s_amr_ib_correct_fine.
impure subroutine, public m_amr_advance::s_amr_fine_stage_advance_batched (s, coefs, bc_type, q_t_sf, pb_in, rhs_pb, mv_in, rhs_mv, t_step)
 Batched fine advance: owned fine blocks are advanced in batches of up to amr_bat_lim blocks of the same level and (padded) extent, stacked two ghost shells apart along the last active dimension, so one s_compute_rhs call and one RK kernel cover a batch. Blocks are independent, so grouping order is free. Members read the leader's coordinate arrays in the non-stacked dimensions (see s_amr_init_report).
impure subroutine m_amr_advance::s_amr_form_batch (i, my, done)
 Start a batch at leader my(i): add later same-level blocks that fit the leader's extent, wasting <= amr_bat_pad of the member's cells; marks members done.
impure subroutine m_amr_advance::s_amr_bat_ib_tables ()
 For the IB face forces on this batch (s_accumulate_ib_face_fluxes): each member's origin relative to the leader's, and the boxes its level+1 children cover, in slab indices.
impure subroutine m_amr_advance::s_amr_batch_post_rk_hooks (coefs, pb_in, mv_in)
 Per-member post-RK hooks of the coarse stage (q_cons_ts(1), m_time_steppers).
impure logical function m_amr_advance::f_amr_ib_waits (blk)
 Whether block blk's IB correction waits for the bodies to move: it holds ghost points, or a moving body (one coarse cell beyond the margin s_amr_update_mib_fine keeps it inside, for this stage's displacement) overlaps it.
impure subroutine m_amr_advance::s_amr_ibp_reserve (my)
 Size amr_ibp for the owned blocks my(:) that wait (their columns need not survive a stage) and start the stage's list.
impure subroutine m_amr_advance::s_amr_ibp_save (ibm)
 Keep batch member ibm's primitive state from the RHS pass (amr_scr_prim, at its slab offset) in the next amr_ibp column.
impure subroutine, public m_amr_advance::s_amr_fine_stage_ib (pb_in, mv_in)
 After the bodies have moved on the stage's complete force: the IB rebuild, the correction and the clamps after it, on each block s_amr_batch_post_rk_hooks left waiting, from its saved primitive state.
impure subroutine m_amr_advance::s_amr_bat_layout ()
 The batch's slab layout: members stacked along the last active dim, stride amr_bat_w.
impure subroutine m_amr_advance::s_amr_fine_rk_update_batch (nb, q_rhs, c1, c2, c3, c4, dt_in)
 Device RK stage update over the batch: q = (c1*q + c2*q_stor + c3*dt_in*rhs)/c4 (compute in wp, store stp), reading each member's rhs at its slab offset. Keep in lockstep with the non-IGR rk_coef form in s_tvd_rk (m_time_steppers).

Detailed Description

Contains module m_amr_advance.

Definition in file m_amr_advance.fpp.f90.