Skip to content
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
2 changes: 1 addition & 1 deletion src/embedded_boundaries/eb_annulus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void incflo::make_eb_annulus()
// Compute distance between cylinder centres
Real offset = 0.0;
for(int i = 0; i < AMREX_SPACEDIM; i++)
offset += std::pow(outer_center[i] - inner_center[i], 2);
offset += amrex::Math::powi<2>(outer_center[i] - inner_center[i]);
offset = std::sqrt(offset);

// Check that the inner cylinder is fully contained in the outer one
Expand Down
18 changes: 11 additions & 7 deletions src/embedded_boundaries/eb_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ void incflo::make_eb_box()
************************************************************************/

Vector<Real> boxLo(AMREX_SPACEDIM), boxHi(AMREX_SPACEDIM);
Real offset = 1.0e-15;
#ifdef AMREX_USE_FLOAT
Real offset = Real(1e-8);
#else
Real offset = Real(1e-15);
#endif
bool inside = true;

for(int i = 0; i < AMREX_SPACEDIM; i++)
Expand All @@ -54,8 +58,8 @@ void incflo::make_eb_box()
// putting them one domain width away
if(geom[0].isPeriodic(0))
{
xlo = 2.0 * geom[0].ProbLo(0) - geom[0].ProbHi(0);
xhi = 2.0 * geom[0].ProbHi(0) - geom[0].ProbLo(0);
xlo = Real(2) * geom[0].ProbLo(0) - geom[0].ProbHi(0);
xhi = Real(2) * geom[0].ProbHi(0) - geom[0].ProbLo(0);
}

Real ylo = boxLo[1] + offset;
Expand All @@ -65,8 +69,8 @@ void incflo::make_eb_box()
// putting them one domain width away
if(geom[0].isPeriodic(1))
{
ylo = 2.0 * geom[0].ProbLo(1) - geom[0].ProbHi(1);
yhi = 2.0 * geom[0].ProbHi(1) - geom[0].ProbLo(1);
ylo = Real(2) * geom[0].ProbLo(1) - geom[0].ProbHi(1);
yhi = Real(2) * geom[0].ProbHi(1) - geom[0].ProbLo(1);
}

#if (AMREX_SPACEDIM > 2)
Expand All @@ -77,8 +81,8 @@ void incflo::make_eb_box()
// putting them one domain width away
if(geom[0].isPeriodic(2))
{
zlo = 2.0 * geom[0].ProbLo(2) - geom[0].ProbHi(2);
zhi = 2.0 * geom[0].ProbHi(2) - geom[0].ProbLo(2);
zlo = Real(2) * geom[0].ProbLo(2) - geom[0].ProbHi(2);
zhi = Real(2) * geom[0].ProbHi(2) - geom[0].ProbLo(2);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/embedded_boundaries/eb_cylinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void incflo::make_eb_cylinder()
pp.getarr("center", centervec, 0, 3);
Array<Real, AMREX_SPACEDIM> center = {AMREX_D_DECL(centervec[0], centervec[1], centervec[2])};

rotation = (rotation/180.)*M_PI;
rotation = (rotation/Real(180))*Real(M_PI);

// Print info about cylinder
amrex::Print() << " " << "\n";
Expand Down
2 changes: 1 addition & 1 deletion src/embedded_boundaries/eb_sphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void incflo::make_eb_sphere()
{
// Initialise sphere parameters
bool inside = true;
Real radius = 0.0002;
Real radius = Real(0.0002);
Vector<Real> centervec(3);

// Get sphere information from inputs file. *
Expand Down
2 changes: 1 addition & 1 deletion src/setup/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void incflo::ReadParameters ()

amrex::Real tol_deg(0.);
pp_eb_flow.query("normal_tol", tol_deg);
m_eb_flow.normal_tol = tol_deg*M_PI/amrex::Real(180.);
m_eb_flow.normal_tol = tol_deg*amrex::Real(M_PI)/amrex::Real(180);
}

if (m_advect_tracer && m_eb_flow.enabled && m_eb_flow.tracer.empty()) {
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void incflo::ReadCheckpointFile()
int i = 0;
while(lis >> word)
{
prob_lo[i++] = std::stod(word); // NOLINT(clang-analyzer-security.ArrayBound)
prob_lo[i++] = amrex::Real(std::stod(word)); // NOLINT(clang-analyzer-security.ArrayBound)
}
}

Expand All @@ -186,7 +186,7 @@ void incflo::ReadCheckpointFile()
int i = 0;
while(lis >> word)
{
prob_hi[i++] = std::stod(word); // NOLINT(clang-analyzer-security.ArrayBound)
prob_hi[i++] = amrex::Real(std::stod(word)); // NOLINT(clang-analyzer-security.ArrayBound)
}
}

Expand Down
Loading