Skip to content

Commit

Permalink
Fix re-redistribution (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Aug 23, 2023
1 parent b4352fb commit bae27e6
Show file tree
Hide file tree
Showing 33 changed files with 392 additions and 151 deletions.
5 changes: 1 addition & 4 deletions Docs/sphinx/geometry/EB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ This can be controlled in the code with:
Re-redistribution
-----------------

.. note::
This used to be supported when PeleC had it's own redistribution procedure. This is no longer the case now that we use the redistribution procedure highlighted above. This section is kept for historical purposes.

.. _eb_re_redist:

.. figure:: EB_re_redist.png
Expand All @@ -127,7 +124,7 @@ advanced a single time step, which we refer to as re-redistribution. Specificall

The re-redistribution is implemented as a book-keeping step where the mass distributed are stored during MOL divergence calculation and given to the coarse and fine flux registers to reflux at
the end of each time step. The re-redistribution is performed every time the reflux function is called in post_timestep. More details regarding re-redistribution are
presented in `Pember et al. <https://www.sciencedirect.com/science/article/pii/S0021999185711655>`_.
presented in `Pember et al. <https://www.sciencedirect.com/science/article/pii/S0021999185711655>`_. A forthcoming paper will describe the methodology for this procedure when using state redistribution.


Date Structures and utility functions
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C1/eb-symmetry.inp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ amr.max_level = 0 # maximum level number allowed
#amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C1/ebmms-1.inp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ amr.max_level = 0 # maximum level number allowed
#amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 64
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C1/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ amr.max_level = 0 # maximum level number allowed
#amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 64
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C11/eb-c11.inp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ amr.data_log = datlog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 64
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C11/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ amr.data_log = datlog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 64
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est

Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C12/eb-c12.inp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ amr.data_log = datlog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C12/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C13/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ amr.data_log = datlog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C3/eb-c3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C3/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C4-5/eb-c4.inp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C4-5/eb-c5.inp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C4-5/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
90 changes: 90 additions & 0 deletions Exec/RegTests/EB-C8/eb-c8-rere.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
max_step = 10000
stop_time = 1.959e-6 #final time is 0.2*L*sqrt(rhoL/pL)

# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 0 0 1
geometry.coord_sys = 0 # 0 => cart, 1 => RZ 2=>spherical
geometry.prob_lo = 0.0 -0.13 0.0
geometry.prob_hi = 0.87 0.653 0.0435
amr.n_cell = 160 144 8

# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<
# Interior, UserBC, Symmetry, SlipWall, NoSlipWall
# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<
pelec.lo_bc = "FOExtrap" "NoSlipWall" "Interior"
pelec.hi_bc = "FOExtrap" "NoSlipWall" "Interior"

# WHICH PHYSICS
pelec.do_hydro = 1
pelec.do_mol = 1
pelec.diffuse_vel = 0
pelec.diffuse_temp = 0
pelec.diffuse_spec = 0
pelec.do_react = 0
pelec.diffuse_enth = 0

# TIME STEP CONTROL
pelec.dt_cutoff = 5.e-20 # level 0 timestep below which we halt
pelec.cfl = 0.2 # cfl number for hyperbolic system
pelec.init_shrink = 0.8 # scale back initial timestep
pelec.change_max = 1.05 # scale back initial timestep

# DIAGNOSTICS & VERBOSITY
pelec.sum_interval = 1 # timesteps between computing mass
pelec.v = 1 # verbosity in PeleC.cpp
amr.v = 1 # verbosity in Amr.cpp
amr.data_log = datlog

# REFINEMENT / REGRIDDING
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.n_error_buf = 0 0 0 0 # number of buffer cells in error est
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 64
amr.grid_eff = 0.99

# CHECKPOINT FILES
amr.checkpoint_files_output = 0
amr.check_file = chk # root name of checkpoint file
amr.check_int = -1 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_files_output = 1
amr.plot_file = plt # root name of plotfile
amr.plot_int = 100 # number of timesteps between plotfiles
amr.derive_plot_vars = ALL

# PROBLEM PARAMETERS
prob.p_l = 1e7
prob.rho_l = 9.6e-4
prob.p_r = 1e6
prob.rho_r = 1.2e-4
prob.angle = 30.0
prob.left_gas = N2
prob.right_gas = HE

# Problem setup
pelec.eb_boundary_T = 300.
pelec.eb_isothermal = 0

# TAGGING
tagging.denerr = 1e20
tagging.dengrad = 4e-5
tagging.max_denerr_lev = 3
tagging.max_dengrad_lev = 3
tagging.tempgrad = 50.0
tagging.max_tempgrad_lev = 3
tagging.max_vfracerr_lev = 0
tagging.eb_refine_type = "adaptive"
tagging.max_eb_refine_lev = 0
tagging.min_eb_refine_lev = 0

eb2.geom_type = "rotated_box"
eb2.box_lo = -10.0 -0.172 -10.0
eb2.box_hi = 10.0 0.172 10.0
eb2.box_rotation = 30.0
eb2.box_rotation_axe = 2
eb2.box_has_fluid_inside = 1
ebd.boundary_grad_stencil_type = 0
21 changes: 10 additions & 11 deletions Exec/RegTests/EB-C8/eb-c8.inp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ amr.data_log = datlog
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.n_error_buf = 0 0 0 0 # number of buffer cells in error est
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32
amr.max_grid_size = 64
amr.grid_eff = 0.99

# CHECKPOINT FILES
amr.checkpoint_files_output = 0
Expand Down Expand Up @@ -75,13 +77,10 @@ tagging.max_dengrad_lev = 3
tagging.tempgrad = 50.0
tagging.max_tempgrad_lev = 3

eb2.geom_type = "extruded_triangles"
extruded_triangles.num_tri = 2
extruded_triangles.tri_0_point_0 = -20.0 -11.662475437630437 0.0
extruded_triangles.tri_0_point_1 = 22.0 -20.0 0.0
extruded_triangles.tri_0_point_2 = 22.0 12.586235868333839 0.0

extruded_triangles.tri_1_point_0 = -20.0 -11.431535329954588 0.0
extruded_triangles.tri_1_point_1 = 22.0 12.817175976009688 0.0
extruded_triangles.tri_1_point_2 = -20.0 20.0 0.0
ebd.boundary_grad_stencil_type = 0
eb2.geom_type = "rotated_box"
eb2.box_lo = -10.0 -0.172 -10.0
eb2.box_hi = 10.0 0.172 10.0
eb2.box_rotation = 30.0
eb2.box_rotation_axe = 2
eb2.box_has_fluid_inside = 1
ebd.boundary_grad_stencil_type = 0
17 changes: 7 additions & 10 deletions Exec/RegTests/EB-C8/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,10 @@ tagging.dengrad = 4e-5
tagging.max_denerr_lev = 3
tagging.max_dengrad_lev = 3

eb2.geom_type = "extruded_triangles"
extruded_triangles.num_tri = 2
extruded_triangles.tri_0_point_0 = -20.0 -11.662475437630437 0.0
extruded_triangles.tri_0_point_1 = 22.0 -20.0 0.0
extruded_triangles.tri_0_point_2 = 22.0 12.586235868333839 0.0

extruded_triangles.tri_1_point_0 = -20.0 -11.431535329954588 0.0
extruded_triangles.tri_1_point_1 = 22.0 12.817175976009688 0.0
extruded_triangles.tri_1_point_2 = -20.0 20.0 0.0
ebd.boundary_grad_stencil_type = 0
eb2.geom_type = "rotated_box"
eb2.box_lo = -10.0 -0.172 -10.0
eb2.box_hi = 10.0 0.172 10.0
eb2.box_rotation = 30.0
eb2.box_rotation_axe = 2
eb2.box_has_fluid_inside = 1
ebd.boundary_grad_stencil_type = 0
10 changes: 1 addition & 9 deletions Exec/RegTests/EB-C8/simple-advection.inp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ amr.data_log = datlog extremalog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down Expand Up @@ -78,13 +78,5 @@ tagging.dengrad = 4e-5
tagging.max_denerr_lev = 3
tagging.max_dengrad_lev = 3

# eb2.geom_type = "extruded_triangles"
# extruded_triangles.num_tri = 2
# extruded_triangles.tri_0_point_0 = -20.0 -11.662475437630437 0.0
# extruded_triangles.tri_0_point_1 = 22.0 -20.0 0.0
# extruded_triangles.tri_0_point_2 = 22.0 12.586235868333839 0.0
# extruded_triangles.tri_1_point_0 = -20.0 -11.431535329954588 0.0
# extruded_triangles.tri_1_point_1 = 22.0 12.817175976009688 0.0
# extruded_triangles.tri_1_point_2 = -20.0 20.0 0.0
ebd.boundary_grad_stencil_type = 0
eb2.geom_type = "all_regular"
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C9/eb-c9.inp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ amr.data_log = datlog
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/EB-C9/example.inp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ amr.v = 1 # verbosity in Amr.cpp
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 4 # block factor in grid generation
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 32

# CHECKPOINT FILES
Expand Down
2 changes: 0 additions & 2 deletions Exec/RegTests/Sod/sod-3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ tagging.min_eb_refine_lev = 0

tagging.refinement_indicators = box
tagging.box.in_box_lo = 0.6 0.125 0.125
#tagging.box.in_box_lo = 0.6 0.0 0.125
#tagging.box.in_box_hi = 0.8 0.25 0.25
tagging.box.in_box_hi = 0.8 0.22 0.25

# EB
Expand Down
Loading

0 comments on commit bae27e6

Please sign in to comment.