-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This syncs up to the version that was used in the xrb_layered paper
- Loading branch information
1 parent
3630777
commit 53a9fea
Showing
69 changed files
with
21,040 additions
and
8,258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
*.ipynb_checkpoints/ | ||
**/.vscode | ||
*slurm* | ||
*submit* | ||
*out* | ||
*debug* | ||
log.md | ||
analysis | ||
|
||
# some useful analysis scripts | ||
scripts/* | ||
!scripts/average_vars.sh | ||
!scripts/avg.submit | ||
!scripts/chainslurm.sh | ||
!scripts/conv_grad.submit | ||
!scripts/derived.submit | ||
!scripts/get_extrema.sh | ||
!scripts/extrema.submit | ||
!scripts/rms.submit | ||
!scripts/rms_vars.sh | ||
!scripts/run.submit.template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
#include <Maestro.H> | ||
|
||
using namespace amrex; | ||
|
||
void Maestro::RetagArray(const Box& bx, const int lev) { | ||
// timer for profiling | ||
BL_PROFILE_VAR("Maestro::RetagArray()", RetagArray); | ||
|
||
// re-compute tag_array since the actual grid structure changed due to buffering | ||
// this is required in order to compute numdisjointchunks, r_start_coord, r_end_coord | ||
|
||
// Tag on regions including buffer cells | ||
auto lo = bx.loVect3d()[AMREX_SPACEDIM - 1]; | ||
auto hi = bx.hiVect3d()[AMREX_SPACEDIM - 1]; | ||
const auto max_lev = base_geom.max_radial_level + 1; | ||
|
||
for (auto r = lo; r <= hi; ++r) { | ||
tag_array[lev - 1 + max_lev * (r / 2)] = TagBox::SET; | ||
} | ||
} | ||
|
||
void Maestro::TagBoxes(TagBoxArray& tags, const MFIter& mfi, const int lev, | ||
const Real time) { | ||
// timer for profiling | ||
BL_PROFILE_VAR("Maestro::TagBoxes()", TagBoxes); | ||
|
||
// tag all cells at a given height if any cells at that height were tagged | ||
|
||
const Array4<TagBox::TagType> tag = tags.array(mfi); | ||
const int* AMREX_RESTRICT tag_array_p = tag_array.dataPtr(); | ||
const int max_lev = base_geom.max_radial_level + 1; | ||
|
||
const Box& tilebox = mfi.tilebox(); | ||
|
||
ParallelFor(tilebox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { | ||
int r = AMREX_SPACEDIM == 2 ? j : k; | ||
|
||
if (tag_array_p[lev + max_lev * r] > 0) { | ||
tag(i, j, k) = TagBox::SET; | ||
} | ||
}); | ||
} | ||
|
||
void Maestro::StateError(TagBoxArray& tags, const MultiFab& state_mf, | ||
const MFIter& mfi, const int lev, const Real time) { | ||
// timer for profiling | ||
BL_PROFILE_VAR("Maestro::StateError()", StateError); | ||
|
||
const Box& tileBox = mfi.tilebox(); | ||
|
||
const auto tag = tags.array(mfi); | ||
const Array4<const Real> state = state_mf.array(mfi); | ||
int* AMREX_RESTRICT tag_array_p = tag_array.dataPtr(); | ||
const int max_lev = base_geom.max_radial_level + 1; | ||
|
||
const Real dr_lev = base_geom.dr(lev); | ||
|
||
// Tag based on height | ||
if (problem_rp::do_height_based_refinement) { | ||
ParallelFor(tileBox, [=] AMREX_GPU_DEVICE(int i, int j, int k) { | ||
int r = AMREX_SPACEDIM == 2 ? j : k; | ||
Real height = (Real(r) + 0.5) * dr_lev; | ||
|
||
if (height > problem_rp::height_refine_bottom && height < problem_rp::height_refine_top) { | ||
tag(i, j, k) = TagBox::SET; | ||
tag_array_p[lev + max_lev * r] = TagBox::SET; | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,15 @@ | ||
@namespace: problem | ||
|
||
# Magnitude of the perturbation. | ||
xrb_pert_factor real 1.d-2 | ||
|
||
# Radius of the perturbation. | ||
xrb_pert_size real 5.0d1 | ||
|
||
# Type of perturbation @@ | ||
# 1 = Temperature perturbation @@ | ||
# 2 = Density perturbation | ||
xrb_pert_type integer 1 | ||
|
||
# the height location for the perturbation | ||
xrb_pert_height real -1.0d0 | ||
# seed for the random noise (-1 for random seed) | ||
pert_seed integer -1 | ||
|
||
# Turn on (.true.) or off (.false.) sponging at the bottom of the domain. | ||
xrb_use_bottom_sponge integer 0 | ||
|
||
# minimum value to use for the sponge | ||
sponge_min real 0.01d0 | ||
|
||
# Mass fraction used in {\tt diag.f90} to define where the burning layer @@ | ||
# begins. | ||
diag_define_layer real 0.1 | ||
|
||
# Velocity field initialization | ||
apply_vel_field integer 0 | ||
|
||
# Initial velocity field vortex scale (2-d); thickness of velocity layer (3-d) | ||
velpert_scale real 1.0d2 | ||
|
||
# Initial velocity field vortex amplitude | ||
velpert_amplitude real 1.0d2 | ||
|
||
# Initial velocity field vortex height location (2-d); base of perturbation layer (3-d) | ||
velpert_height_loc real 6.5d3 | ||
|
||
# thickness of velocity pert transition region (3-d) | ||
velpert_steep real 12.d0 | ||
|
||
# number of vortices (2-d) | ||
num_vortices integer 1 | ||
|
||
# look at the deltap diagnostic | ||
do_deltap_diag integer 0 | ||
|
||
# minimum value to use for species in tag_boxes | ||
tag_minval real 1.0d-4 | ||
|
||
# maximum value to use for species in tag_boxes | ||
tag_maxval real 0.99d0 | ||
|
||
# factor to multiply the species by; for tagging off of spec | ||
# instead of EGR | ||
tag_xfac real 1.d-16 | ||
|
||
# density tagging | ||
do_dens_tagging integer 0 | ||
|
||
lo_dens_tag real 5.4d5 | ||
hi_dens_tag real 1.75d6 | ||
dens_tag_lev_fac real 1.0d0 | ||
# Do refinement above and below given heights (given in cm) | ||
do_height_based_refinement integer 0 | ||
height_refine_bottom real 1.0e3 | ||
height_refine_top real 1.2e3 |
Oops, something went wrong.