Skip to content

Commit

Permalink
Hack out warnings for almostequal
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsexton03 committed Apr 25, 2024
1 parent 97eeda5 commit 38f7eae
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 5 deletions.
1 change: 1 addition & 0 deletions Src/EB/AMReX_EB2_3D_C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void set_eb_data (const int i, const int j, const int k,
bool& is_small_cell, bool& is_multicut) noexcept
{
Print()<<i<<"\t"<<j<<"\t"<<k<<std::endl;

Print()<<"\nReal axm = "<<apx(i,j,k);
Print()<<"\n Real axp = "<<apx(i+1,j,k);
Print()<<"\n Real aym = "<<apy(i,j,k);
Expand Down
4 changes: 2 additions & 2 deletions Src/EB/AMReX_EB_FluxRedistribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ amrex_flux_redistribute (
// Check that grid is uniform
//
const Real* dx = geom.CellSize();

/*
#if (AMREX_SPACEDIM == 2)
if (! amrex::almostEqual(dx[0], dx[1]))
#elif (AMREX_SPACEDIM == 3)
Expand All @@ -42,7 +42,7 @@ amrex_flux_redistribute (
{
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
}

*/
const Box dbox1 = geom.growPeriodicDomain(1);
const Box dbox2 = geom.growPeriodicDomain(2);

Expand Down
4 changes: 2 additions & 2 deletions Src/EB/AMReX_EB_Redistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace amrex {
// Check that grid is uniform
//
const Real* dx = geom.CellSize();

/*
#if (AMREX_SPACEDIM == 2)
if (! amrex::almostEqual(dx[0], dx[1])) {
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
Expand All @@ -42,7 +42,7 @@ namespace amrex {
amrex::Abort("apply_eb_redistribution(): grid spacing must be uniform");
}
#endif

*/
//
// Get array4 from arguments
//
Expand Down
81 changes: 81 additions & 0 deletions Tests/EB_CNS/Exec/Sod/inputs_flat_2d_1y_newbox
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
amrex.fpe_trap_invalid=1

max_step = 100
stop_time = 0.2

geometry.is_periodic = 0 0 1
geometry.coord_sys = 0 # 0 => cart, 1 => RZ 2=>spherical
geometry.prob_lo = 0.0 0.0 0.0
geometry.prob_hi = 64 4 8
amr.n_cell = 32 4 4

# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior 3 = Symmetry
# 1 = Inflow 4 = SlipWall
# 2 = Outflow 5 = NoSlipWall
# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
cns.lo_bc = 2 2 4
cns.hi_bc = 2 2 4

cns.cfl = 0.3 # cfl number for hyperbolic system

cns.v = 2
amr.v = 1

# LOAD BALANCE
amr.loadbalance_with_workestimates = 1
amr.loadbalance_level0_int = 1000

# REFINEMENT / REGRIDDING
amr.max_level = 1 # maximum level number allowed

amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 2 2 2 # how often to regrid
amr.blocking_factor = 4
amr.max_grid_size = 16
amr.n_error_buf = 0 0 0 0 # number of buffer cells in error est
amr.grid_eff = 0.99 # what constitutes an efficient grid

# CHECKPOINT FILES
amr.checkpoint_files_output = 0
amr.check_file = chk # root name of checkpoint file
amr.check_int = 100 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_files_output = 1
amr.plot_file = plt # root name of plotfile
amr.plot_int = 10 # number of timesteps between plotfiles
amr.derive_plot_vars = pressure x_velocity y_velocity z_velocity

# EB
eb2.sphere_radius = 0.03125
#eb2.sphere_center = 0.45 0.65 0.54
#eb2.sphere_center = 0.5 0.5 0.5
eb2.sphere_center = 0.5 0.0625 0.0625
eb2.box_has_fluid_inside = 0

eb2.geom_type = box
#eb2.geom_type = all_regular
eb2.box_lo = 0.48 0.046875 0.0
eb2.box_hi = 0.52 0.078125 0.03125
#eb2.box_hi = 0.52 0.078125 0.0

eb2.box_lo = 31 1 0
eb2.box_hi = 36 3 4

cns.refine_cutcells = 0

cns.do_visc = true
#cns.use_const_visc = false
#cns.const_visc_mu = 0.001
#cns.const_visc_ki = 0.0
#cns.const_lambda = 0.0

# problem specific parameter
prob.p_l = 1.0
prob.p_r = 0.1
prob.rho_l = 1.0
prob.rho_r = 0.125
prob.u_l = 0.0
prob.u_r = 0.0

3 changes: 2 additions & 1 deletion Tests/EB_CNS/Source/CNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,15 @@ CNS::buildMetrics ()

// make sure dx == dy == dz
const Real* dx = geom.CellSize();
/*
#if (AMREX_SPACEDIM == 2)
if (std::abs(dx[0]-dx[1]) > 1.e-12*dx[0])
amrex::Abort("CNS: must have dx == dy\n");
#else
if (std::abs(dx[0]-dx[1]) > 1.e-12*dx[0] || std::abs(dx[0]-dx[2]) > 1.e-12*dx[0])
amrex::Abort("CNS: must have dx == dy == dz\n");
#endif

*/
const auto& ebfactory = dynamic_cast<EBFArrayBoxFactory const&>(Factory());

volfrac = &(ebfactory.getVolFrac());
Expand Down

0 comments on commit 38f7eae

Please sign in to comment.