Skip to content

Commit

Permalink
fix some amrex::Real namespace issues (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Jun 27, 2024
1 parent f035551 commit de2696a
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions Source/Maestro.H
Original file line number Diff line number Diff line change
@@ -170,10 +170,10 @@ class Maestro : public amrex::AmrCore {
void AdvectBaseEnthalpySphr(
BaseState<amrex::Real>& rhoh0_predicted_edge_state);
// only need to advect species for test_basetest problem
void UpdateSpecies(const BaseState<Real>& rho0,
const BaseState<Real>& rho0_predicted_edge,
const BaseState<Real>& rhoX0_old,
BaseState<Real>& rhoX0_new);
void UpdateSpecies(const BaseState<amrex::Real>& rho0,
const BaseState<amrex::Real>& rho0_predicted_edge,
const BaseState<amrex::Real>& rhoX0_old,
BaseState<amrex::Real>& rhoX0_new);
// end MaestroAdvectBase.cpp functions
////////////

@@ -363,12 +363,12 @@ class Maestro : public amrex::AmrCore {
#endif
void ComputeCutoffCoords(const BaseState<amrex::Real>& rho0_state) const;

void RestrictBase(BaseState<Real>& s0, const bool is_cell_centered) const;
void RestrictBase(const BaseStateArray<Real>& s0,
void RestrictBase(BaseState<amrex::Real>& s0, const bool is_cell_centered) const;
void RestrictBase(const BaseStateArray<amrex::Real>& s0,
const bool is_cell_centered) const;

void FillGhostBase(BaseState<Real>& s0, const bool is_cell_centered) const;
void FillGhostBase(const BaseStateArray<Real>& s0,
void FillGhostBase(BaseState<amrex::Real>& s0, const bool is_cell_centered) const;
void FillGhostBase(const BaseStateArray<amrex::Real>& s0,
const bool is_cell_centered) const;

// end MaestroBaseStateGeometry.cpp functions
@@ -429,7 +429,7 @@ class Maestro : public amrex::AmrCore {
/// @param bcs_in boundary conditions
/// @param flag determines whether base state is subtracted (true) or added (false)
void PutInPertForm(amrex::Vector<amrex::MultiFab>& scal,
const BaseState<Real>& s0, int comp, int bccomp,
const BaseState<amrex::Real>& s0, int comp, int bccomp,
const amrex::Vector<amrex::BCRec>& bcs, bool flag);

/// If `flag`, subtract the base state, returning the perturbed quantity.
@@ -444,7 +444,7 @@ class Maestro : public amrex::AmrCore {
/// @param bcs_in boundary conditions
/// @param flag determines whether base state is subtracted (true) or added (false)
void PutInPertForm(int level, amrex::Vector<amrex::MultiFab>& scal,
const BaseState<Real>& s0, int comp, int bccomp,
const BaseState<amrex::Real>& s0, int comp, int bccomp,
const amrex::Vector<amrex::BCRec>& bcs, bool flag);

/// If `flag`, returns species mass fraction `X` given the conserved variable `rhoX`.
@@ -933,7 +933,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const simhy,
const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx,
int comp, int bccomp, bool is_vel) const;

void MakeEdgeScalEdges(const amrex::MFIter& mfi,
@@ -953,7 +953,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const simhy,
const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx,
int comp, int bccomp, const bool is_vel,
const bool is_conservative) const;
#else
@@ -962,7 +962,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const umac,
amrex::Array4<amrex::Real> const vmac,
amrex::Array4<amrex::Real> const wmac,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);

void MakeEdgeScalPredictor(const amrex::MFIter& mfi,
amrex::Array4<amrex::Real> const slx,
@@ -983,7 +983,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const simhz,
const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx,
int comp, int bccomp, const bool is_vel) const;

void MakeEdgeScalTransverse(const amrex::MFIter& mfi,
@@ -1009,7 +1009,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const simhzy,
const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx,
int comp, int bccomp, const bool is_vel,
const bool is_conservative) const;

@@ -1038,7 +1038,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const simhzy,
const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx,
int comp, int bccomp, const bool is_vel,
const bool is_conservative) const;
#endif
@@ -1242,9 +1242,9 @@ class Maestro : public amrex::AmrCore {
const BaseState<amrex::Real>& p0_minus_peosbar,
const amrex::Real dt_in, const amrex::Real dtold_in);

static void Tridiag(const BaseStateArray<Real>& a, const BaseStateArray<Real>& b,
const BaseStateArray<Real>& c, const BaseStateArray<Real>& r,
const BaseStateArray<Real>& u, const int n);
static void Tridiag(const BaseStateArray<amrex::Real>& a, const BaseStateArray<amrex::Real>& b,
const BaseStateArray<amrex::Real>& c, const BaseStateArray<amrex::Real>& r,
const BaseStateArray<amrex::Real>& u, const int n);

void ProlongBasetoUniform(const BaseState<amrex::Real>& base_ml_s,
BaseState<amrex::Real>& base_fine_s) const;
@@ -1402,7 +1402,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const Ip,
amrex::Array4<amrex::Real> const Im, const amrex::Box& domainBox,
const amrex::Vector<amrex::BCRec>& bcs,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx, const bool is_umac,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx, const bool is_umac,
const int comp, const int bccomp) const;
////////////

@@ -1734,7 +1734,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const ury,
amrex::Array4<amrex::Real> const uimhy,
const amrex::Box& domainBox,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);

void VelPredVelocities(const amrex::MFIter& mfi,
amrex::Array4<const amrex::Real> const utilde,
@@ -1755,7 +1755,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<const amrex::Real> const force,
amrex::Array4<const amrex::Real> const w0_cart_in,
const amrex::Box& domainBox,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);
#else
void VelPredInterface(const amrex::MFIter& mfi,
amrex::Array4<const amrex::Real> const utilde,
@@ -1779,7 +1779,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const urz,
amrex::Array4<amrex::Real> const uimhz,
const amrex::Box& domainBox,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);

void VelPredTransverse(const amrex::MFIter& mfi,
amrex::Array4<const amrex::Real> const utilde,
@@ -1802,7 +1802,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<amrex::Real> const wimhxy,
amrex::Array4<amrex::Real> const wimhyx,
const amrex::Box& domainBox,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);

void VelPredVelocities(const amrex::MFIter& mfi,
amrex::Array4<const amrex::Real> const utilde,
@@ -1836,7 +1836,7 @@ class Maestro : public amrex::AmrCore {
amrex::Array4<const amrex::Real> const force,
amrex::Array4<const amrex::Real> const w0_cart_in,
const amrex::Box& domainBox,
const amrex::GpuArray<Real, AMREX_SPACEDIM> dx);
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx);
#endif
////////////////////////

@@ -1990,29 +1990,29 @@ class Maestro : public amrex::AmrCore {
amrex::Vector<amrex::Real> diagfile3_data;

// problem information
amrex::GpuArray<Real, 3> center;
amrex::GpuArray<amrex::Real, 3> center;

// rotation
#ifdef ROTATION
Real sin_theta;
Real cos_theta;
Real omega;
amrex::Real sin_theta;
amrex::Real cos_theta;
amrex::Real omega;
#endif

// sponge
Real r_sp;
Real r_md;
Real r_tp;
amrex::Real r_sp;
amrex::Real r_md;
amrex::Real r_tp;
// outer sponge parameters used for spherical problems
Real r_sp_outer;
Real r_tp_outer;
amrex::Real r_sp_outer;
amrex::Real r_tp_outer;
/// the sponge_start_density should be the density below which the
/// sponge first turns on. Different problems may compute this in
/// different ways (i.e. not using sponge_center_density and
/// sponge_start_factor), so we provide this public module variable to
/// ensure that the rest of the code always knows at what density the
/// sponge begins.
Real sponge_start_density;
amrex::Real sponge_start_density;

/// Stores fluxes at coarse-fine interface for synchronization.
/// This will be sized `max_level+1`
@@ -2025,8 +2025,8 @@ class Maestro : public amrex::AmrCore {

/// Rate of change of pressure at the lower boundary. Used to modify w0
/// and p0 in the case of a closed upper boundary (planar).
Real p0bdot;
Real p0b;
amrex::Real p0bdot;
amrex::Real p0b;

/// flag for writing plotfiles
enum plotfile_flag {

0 comments on commit de2696a

Please sign in to comment.