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

Remove legacy screening interface #1304

Merged
merged 4 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion screening/Make.package
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
CEXE_headers += screen.H
CEXE_headers += screen_data.H
CEXE_sources += screen_data.cpp
55 changes: 0 additions & 55 deletions screening/screen.H
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,6 @@ screening_finalize() {

}


AMREX_FORCE_INLINE
void add_screening_factor(const int i,
const Real z1, const Real a1, const Real z2, const Real a2)
{
using namespace scrn;

BL_ASSERT(i < NSCREEN);

scn_facs[i].z1 = z1;
scn_facs[i].z2 = z2;
scn_facs[i].a1 = a1;
scn_facs[i].a2 = a2;

scn_facs[i].zs13 = std::cbrt(z1 + z2);
scn_facs[i].zs13inv = 1.0_rt/scn_facs[i].zs13;
scn_facs[i].zhat = std::pow(z1 + z2, 5.0_rt/3.0_rt) -
std::pow(z1, 5.0_rt/3.0_rt) -
std::pow(z2, 5.0_rt/3.0_rt);
scn_facs[i].zhat2 = std::pow(z1 + z2, 5.0_rt/12.0_rt) -
std::pow(z1, 5.0_rt/12.0_rt) -
std::pow(z2, 5.0_rt/12.0_rt);
scn_facs[i].lzav = (5.0_rt/3.0_rt) * std::log(z1 * z2 / (z1 + z2));
scn_facs[i].aznut = std::cbrt(z1 * z1 * z2 * z2 * a1 * a2 / (a1 + a2));
scn_facs[i].ztilde = 0.5_rt * (std::cbrt(z1) + std::cbrt(z2));

}


template <int do_T_derivatives>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void
Expand Down Expand Up @@ -1007,30 +978,4 @@ void actual_screen(const plasma_state_t& state,
}
}

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void screen(const plasma_state_t& state,
const int jscreen,
MICROPHYSICS_UNUSED const Real z1_screen, MICROPHYSICS_UNUSED const Real a1_screen,
MICROPHYSICS_UNUSED const Real z2_screen, MICROPHYSICS_UNUSED const Real a2_screen,
Real& scor, Real& scordt, Real& /*scordd*/)
{
using namespace scrn;

#ifndef AMREX_USE_GPU
AMREX_ASSERT(scn_facs[jscreen].validate_nuclei(z1_screen, a1_screen, z2_screen, a2_screen));
#endif

actual_screen(state, scn_facs[jscreen], scor, scordt);
}

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void screen(const plasma_state_t& state,
const scrn::screen_factors_t& scn_fac,
Real& scor, Real& scordt, Real& /*scordd*/)
{
using namespace scrn;

actual_screen(state, scn_fac, scor, scordt);
}

#endif
4 changes: 0 additions & 4 deletions screening/screen_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ namespace scrn {

return scn_fac;
}

#if NUMSCREEN > 0
extern AMREX_GPU_MANAGED amrex::GpuArray<screen_factors_t, NSCREEN> scn_facs;
#endif
}

#endif
5 changes: 0 additions & 5 deletions screening/screen_data.cpp

This file was deleted.