Skip to content

Commit

Permalink
Allow some EB code to handle single precision (AMReX-Codes#2723)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel authored Apr 20, 2022
1 parent 0d136ea commit 034b43a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Src/EB/AMReX_EB2_IF_Scale.H
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public:
ScaleIF (F&& a_f, const RealArray& a_scalefactor)
: m_f(std::move(a_f)),
#if (AMREX_SPACEDIM == 3)
m_sfinv{1.0/a_scalefactor[0], 1.0/a_scalefactor[1], 1.0/a_scalefactor[2]}
m_sfinv{1.0_rt/a_scalefactor[0], 1.0_rt/a_scalefactor[1], 1.0_rt/a_scalefactor[2]}
#else
m_sfinv{1.0/a_scalefactor[0], 1.0/a_scalefactor[1], 0.0}
m_sfinv{1.0_rt/a_scalefactor[0], 1.0_rt/a_scalefactor[1], 0.0_rt}
#endif
{}
ScaleIF (F const& a_f, const RealArray& a_scalefactor)
: m_f(a_f),
#if (AMREX_SPACEDIM == 3)
m_sfinv{1.0/a_scalefactor[0], 1.0/a_scalefactor[1], 1.0/a_scalefactor[2]}
m_sfinv{1.0_rt/a_scalefactor[0], 1.0_rt/a_scalefactor[1], 1.0_rt/a_scalefactor[2]}
#else
m_sfinv{1.0/a_scalefactor[0], 1.0/a_scalefactor[1], 0.0}
m_sfinv{1.0_rt/a_scalefactor[0], 1.0_rt/a_scalefactor[1], 0.0_rt}
#endif
{}

Expand Down

0 comments on commit 034b43a

Please sign in to comment.