Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use one-sided PPM stencils at reflecting BCs #2118

Draft
wants to merge 51 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7710d23
update an action to some later versions
zingale Apr 18, 2022
dcfb770
Merge branch 'development' of github.com:amrex-astro/Castro into deve…
zingale Apr 20, 2022
11e513f
Merge branch 'development' of github.com:amrex-astro/Castro into deve…
zingale Apr 22, 2022
a9517e7
use one-sided stencils when necessary
zingale Apr 22, 2022
9665212
finish syncing
zingale Apr 24, 2022
51ac6c8
fix compilation
zingale Apr 24, 2022
e22e9eb
some diag
zingale Apr 25, 2022
c33b128
Merge branch 'development' of github.com:amrex-astro/Castro into deve…
zingale Apr 25, 2022
7113ef7
Merge branch 'development' into ppm_one_sided_second
zingale Apr 25, 2022
baeb2dc
add some protection on the parabola values
zingale Apr 26, 2022
7c23762
Merge branch 'ppm_one_sided_second' of github.com:zingale/Castro into…
zingale Apr 26, 2022
83a5120
add more reflect enforcement
zingale Apr 26, 2022
45fb00a
Merge branch 'development' into ppm_one_sided_second
zingale May 12, 2022
8a1aa1b
Merge branch 'development' into ppm_one_sided_second
zingale May 19, 2022
7fae1f7
some merge fixes
zingale May 19, 2022
66e9350
more merge fixes
zingale May 19, 2022
e427532
Merge branch 'development' into ppm_one_sided_second
zingale May 27, 2022
59c1424
more merging
zingale May 27, 2022
cb56c00
more fixing
zingale May 27, 2022
00e05ec
add reflect
zingale May 27, 2022
0a2ec8f
Merge branch 'development' into ppm_one_sided_second
zingale Jul 24, 2022
9995481
fix one-sided + pslope
zingale Jul 25, 2022
0a4044b
change centering of source terms
zingale Jul 25, 2022
5d0cf53
Merge branch 'development' into ppm_one_sided_second
zingale Jul 26, 2022
31d1855
fix array sizes
zingale Jul 26, 2022
02629fc
Merge branch 'development' into ppm_one_sided_second
zingale Aug 11, 2022
fa86a98
Merge branch 'development' into ppm_one_sided_second
zingale Dec 20, 2022
648ee4c
Merge branch 'development' into ppm_one_sided_second
zingale Feb 10, 2023
bdeb306
Merge branch 'development' into ppm_one_sided_second
zingale Feb 15, 2023
97dc5a0
Merge branch 'development' into ppm_one_sided_second
zingale Feb 28, 2023
97186b1
Merge branch 'development' into ppm_one_sided_second
zingale Apr 15, 2023
4ad48f2
sync
zingale Apr 16, 2023
1b53f57
Merge branch 'development' into ppm_one_sided_second
zingale Apr 16, 2023
ff8fcf7
fix
zingale Apr 16, 2023
4e87524
implement the axisymmetric versions of the one-sided diffs
zingale Apr 16, 2023
ac349f0
Merge branch 'development' into ppm_one_sided_second
zingale Apr 16, 2023
23db908
Merge branch 'development' into ppm_one_sided_second
zingale May 16, 2023
7b6ec93
Merge branch 'development' into ppm_one_sided_second
zingale May 25, 2023
0a7c575
more work on the one-sided stuff
zingale May 26, 2023
e6fd73b
fix 1d cylindrical Sedov
zingale May 26, 2023
1cb82f1
Merge branch 'fix_sedov_1d_cyl' into ppm_one_sided_second
zingale May 26, 2023
4d1a825
fix the area / volume factors for 1-d cylindrical
zingale May 26, 2023
0636b9d
Merge branch 'fix_1d_cyl_consup' into ppm_one_sided_second
zingale May 26, 2023
1be898e
Merge branch 'development' into ppm_one_sided_second
zingale May 30, 2023
c083e3d
Merge branch 'ppm_one_sided_second' of github.com:zingale/Castro into…
zingale May 30, 2023
c989b5d
fix composition
zingale May 30, 2023
29df0eb
Merge branch 'development' into ppm_one_sided_second
zingale Aug 19, 2024
d074a64
fix build
zingale Aug 19, 2024
822056e
Merge branch 'development' into ppm_one_sided_second
zingale Oct 24, 2024
147854b
fix compilation
zingale Oct 24, 2024
68702e3
Merge branch 'development' into ppm_one_sided_second
zingale Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Source/hydro/Castro_ctu_hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co

Array4<Real const> const U_old_arr = Sborder.array(mfi);

rho_inv.resize(qbx3, 1);
rho_inv.resize(qbx, 1);
fab_size += rho_inv.nBytes();
Array4<Real> const rho_inv_arr = rho_inv.array();

amrex::ParallelFor(qbx3,
amrex::ParallelFor(qbx,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
rho_inv_arr(i,j,k) = 1.0 / U_old_arr(i,j,k,URHO);
Expand Down Expand Up @@ -472,6 +472,8 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co
shk_arr,
0, false);

enforce_reflect_states(xbx, 0, qxm_arr, qxp_arr);

#endif // 1-d


Expand Down Expand Up @@ -587,6 +589,8 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co

#endif

enforce_reflect_states(xbx, 0, ql_arr, qr_arr);

cmpflx_plus_godunov(xbx,
ql_arr, qr_arr,
flux0_arr,
Expand Down Expand Up @@ -631,6 +635,8 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co
#endif
#endif

enforce_reflect_states(ybx, 1, ql_arr, qr_arr);

cmpflx_plus_godunov(ybx,
ql_arr, qr_arr,
flux1_arr,
Expand Down
18 changes: 17 additions & 1 deletion Source/hydro/Castro_mol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ Castro::mol_ppm_reconstruct(const Box& bx,
Array4<Real> const& qm,
Array4<Real> const& qp) {

// special care for reflecting BCs
const int* lo_bc = phys_bc.lo();
const int* hi_bc = phys_bc.hi();

const auto domlo = geom.Domain().loVect3d();
const auto domhi = geom.Domain().hiVect3d();

const auto dx = geom.CellSizeArray();

bool lo_bc_test = lo_bc[idir] == amrex::PhysBCType::symmetry;
bool hi_bc_test = hi_bc[idir] == amrex::PhysBCType::symmetry;

bool is_axisymmetric = geom.Coord() == 1
;
amrex::ParallelFor(bx, NQ,
[=] AMREX_GPU_DEVICE (int i, int j, int k, int n) noexcept
{
Expand All @@ -165,7 +179,9 @@ Castro::mol_ppm_reconstruct(const Box& bx,
Real sp;

load_stencil(q_arr, idir, i, j, k, n, s);
ppm_reconstruct(s, flat, sm, sp);
ppm_reconstruct(s, i, j, k, idir, dx[idir],
lo_bc_test, hi_bc_test, is_axisymmetric, domlo, domhi,
flat, sm, sp);

if (idir == 0) {
// right state at i-1/2
Expand Down
Loading
Loading