Skip to content

Commit

Permalink
Print depreciation warning for plt_* style of specifying plot vars.
Browse files Browse the repository at this point in the history
Remove member variables m_plt_* in favor of m_plotVars.
Update benchmark files to use amr.plotVariables
  • Loading branch information
cgilet committed Oct 9, 2024
1 parent ba5a13a commit d0347a8
Show file tree
Hide file tree
Showing 42 changed files with 125 additions and 137 deletions.
28 changes: 1 addition & 27 deletions src/incflo.H
Original file line number Diff line number Diff line change
Expand Up @@ -569,33 +569,7 @@ private:
amrex::Vector<amrex::Real> tag_region_lo;
amrex::Vector<amrex::Real> tag_region_hi;

// FIXME -- depreciate?
// Flags for saving fluid data in plot files
int m_plt_velx = 1;
int m_plt_vely = 1;
int m_plt_velz = 1;
int m_plt_gpx = 1;
int m_plt_gpy = 1;
int m_plt_gpz = 1;
int m_plt_rho = 1;
int m_plt_tracer = 1;
int m_plt_p = 0;
int m_plt_macphi = 0;
int m_plt_eta = 0;
int m_plt_magvel = 1;
int m_plt_vort = 1;
int m_plt_forcing = 0;
int m_plt_strainrate = 0;
int m_plt_divu = 0;
int m_plt_vfrac = 1;
int m_plt_error_u = 0;
int m_plt_error_v = 0;
int m_plt_error_w = 0;
int m_plt_error_p = 0;
int m_plt_error_mac_p = 0;
int m_plt_particle_count = 0;

// Set default that agrees with m_plt_* defaults above
// Specify fluid data in plot files
amrex::Vector<std::string> m_plotVars =
#if (AMREX_SPACEDIM == 3)
{"velx","vely","velz","gpx","gpy","gpz","density","tracer","magvel","vort","vfrac"};
Expand Down
124 changes: 97 additions & 27 deletions src/setup/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,35 +274,105 @@ void incflo::ReadIOParameters()
};

// Check for flags to change inclusion of individual fields
if ( pp.query("plt_velx", m_plt_velx) ) { update_plotVars("velx", m_plt_velx); }
if ( pp.query("plt_vely", m_plt_vely) ) { update_plotVars("vely", m_plt_vely); }
if ( pp.query("plt_velz", m_plt_velz) ) { update_plotVars("velz", m_plt_velz); }

if ( pp.query("plt_gpx", m_plt_gpx) ) { update_plotVars("gpx", m_plt_gpx); }
if ( pp.query("plt_gpy", m_plt_gpy) ) { update_plotVars("gpy", m_plt_gpy); }
if ( pp.query("plt_gpz", m_plt_gpz) ) { update_plotVars("gpz", m_plt_gpz); }

if ( pp.query("plt_rho", m_plt_rho ) ) { update_plotVars("density",m_plt_rho); }
if ( pp.query("plt_tracer", m_plt_tracer) ) { update_plotVars("tracer",m_plt_tracer); }
if ( pp.query("plt_p ", m_plt_p ) ) { update_plotVars("p",m_plt_p); }
if ( pp.query("plt_macphi", m_plt_macphi) ) { update_plotVars("macphi",m_plt_macphi); }
if ( pp.query("plt_eta", m_plt_eta ) ) { update_plotVars("eta",m_plt_eta); }
if ( pp.query("plt_magvel", m_plt_magvel) ) { update_plotVars("magvel",m_plt_magvel); }
if ( pp.query("plt_vort", m_plt_vort ) ) { update_plotVars("vort",m_plt_vort); }
if ( pp.query("plt_strainrate", m_plt_strainrate) ) { update_plotVars("strainrate",m_plt_strainrate); }
if ( pp.query("plt_divu", m_plt_divu ) ) { update_plotVars("divu",m_plt_divu); }
if ( pp.query("plt_vfrac", m_plt_vfrac ) ) { update_plotVars("vfrac",m_plt_vfrac); }

if ( pp.query("plt_forcing", m_plt_forcing ) ) { update_plotVars("forcing",m_plt_forcing); }

if ( pp.query("plt_error_u", m_plt_error_u ) ) { update_plotVars("error_u",m_plt_error_u); }
if ( pp.query("plt_error_v", m_plt_error_v ) ) { update_plotVars("error_v",m_plt_error_v); }
if ( pp.query("plt_error_w", m_plt_error_w ) ) { update_plotVars("error_w",m_plt_error_w); }
if ( pp.query("plt_error_p", m_plt_error_p ) ) { update_plotVars("error_p",m_plt_error_p); }
if ( pp.query("plt_error_mac_p",m_plt_error_mac_p ) ) { update_plotVars("error_mac_p",m_plt_error_mac_p); }
int plt_var;
if ( pp.query("plt_velx", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("velx", plt_var);
}
if ( pp.query("plt_vely", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("vely", plt_var);
}
if ( pp.query("plt_velz", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("velz", plt_var);
}

if ( pp.query("plt_gpx", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("gpx", plt_var);
}
if ( pp.query("plt_gpy", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("gpy", plt_var);
}
if ( pp.query("plt_gpz", plt_var) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("gpz", plt_var);
}

if ( pp.query("plt_rho", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("density",plt_var);
}
if ( pp.query("plt_tracer", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("tracer",plt_var);
}
if ( pp.query("plt_p ", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("p",plt_var);
}
if ( pp.query("plt_macphi", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("macphi",plt_var);
}
if ( pp.query("plt_eta", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("eta",plt_var);
}
if ( pp.query("plt_magvel", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("magvel",plt_var);
}
if ( pp.query("plt_vort", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("vort",plt_var);
}
if ( pp.query("plt_strainrate", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("strainrate",plt_var);
}
if ( pp.query("plt_divu", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("divu",plt_var);
}
if ( pp.query("plt_vfrac", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("vfrac",plt_var);
}

if ( pp.query("plt_forcing", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("forcing",plt_var);
}

if ( pp.query("plt_error_u", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("error_u",plt_var);
}
if ( pp.query("plt_error_v", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("error_v",plt_var);
}
if ( pp.query("plt_error_w", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("error_w",plt_var);
}
if ( pp.query("plt_error_p", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("error_p",plt_var);
}
if ( pp.query("plt_error_mac_p",plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("error_mac_p",plt_var);
}

#ifdef INCFLO_USE_PARTICLES
if ( pp.query("plt_particle_count", m_plt_particle_count ) ) { update_plotVars("particle_count",m_plt_particle_count); }
if ( pp.query("plt_particle_count", plt_var ) ) {
Warning("amr.plt_* is depreciated. Please use amr.plotVariables");
update_plotVars("particle_count",plt_var);
}
#endif

// Set according to a variable list
Expand Down
1 change: 0 additions & 1 deletion test_2d/benchmark.eb_flow_const_velx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
1 change: 0 additions & 1 deletion test_2d/benchmark.eb_flow_const_vely
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
1 change: 0 additions & 1 deletion test_2d/benchmark.eb_flow_sphere
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
3 changes: 1 addition & 2 deletions test_2d/benchmark.inviscid_rotated_planes_x
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
3 changes: 1 addition & 2 deletions test_2d/benchmark.rotated_planes_x
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
3 changes: 1 addition & 2 deletions test_2d/benchmark.rotated_planes_y
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
1 change: 0 additions & 1 deletion test_2d/benchmark.split
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ incflo.cfl = 0.45
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 100 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
3 changes: 1 addition & 2 deletions test_2d/benchmark.tracer_adv_diff
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ nodal_proj.verbose = 0 # Nodal Projector
scalar_diffusion.verbose = 0 # Scalar Diffusion
tensor_diffusion.verbose = 0 # Tensor Diffusion

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
3 changes: 1 addition & 2 deletions test_2d/benchmark.tracer_adv_diff_cn
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@ incflo.verbose = 2 # incflo_level
mac_proj.verbose = 1 # MAC Projector
nodal_proj.verbose = 1 # Nodal Projector

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
3 changes: 1 addition & 2 deletions test_2d/benchmark.tracer_advection
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,4 @@ incflo.verbose = 2 # incflo_level
mac_proj.verbose = 1 # MAC Projector
nodal_proj.verbose = 1 # Nodal Projector

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac
3 changes: 1 addition & 2 deletions test_2d/benchmark.vortex_in_sphere
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ incflo.probtype = 66

nodal_proj.verbose = 4

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely gpx gpy density tracer vfrac

nodal_proj.mg_max_coarsening_level = 3
3 changes: 1 addition & 2 deletions test_3d/benchmark.channel_sphere
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion
tensor_diffusion.mg_verbose = 1 # Tensor Diffusion

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac

incflo.advect_tracer = true
incflo.advection_type = "MOL"
Expand Down
2 changes: 1 addition & 1 deletion test_3d/benchmark.double_shear_layer
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ geometry.is_periodic = 1 1 1 # Periodicity x y z (0/1)

incflo.probtype = 21

amr.plt_ccse_regtest = 1
amr.pltVariables = velx vely gpx gpy density tracer magvel vort vfrac
10 changes: 1 addition & 9 deletions test_3d/benchmark.double_shear_restart
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,4 @@ geometry.is_periodic = 1 1 1 # Periodicity x y z (0/1)

incflo.probtype = 21

amr.plt_ccse_regtest = 0
amr.plt_velx = 1
amr.plt_vely = 1
amr.plt_velz = 0
amr.plt_gpx = 1
amr.plt_gpy = 1
amr.plt_gpz = 0
amr.plt_rho = 1
amr.plt_tracer = 1
amr.plotVariables = velx vely gpx gpy density tracer
1 change: 0 additions & 1 deletion test_3d/benchmark.eb_flow_const_velx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
1 change: 0 additions & 1 deletion test_3d/benchmark.eb_flow_const_vely
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
1 change: 0 additions & 1 deletion test_3d/benchmark.eb_flow_const_velz
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 1 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
1 change: 0 additions & 1 deletion test_3d/benchmark.eb_flow_density
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ incflo.initial_iterations = 0
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 100 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
3 changes: 1 addition & 2 deletions test_3d/benchmark.rotated_cylinder_x
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
3 changes: 1 addition & 2 deletions test_3d/benchmark.rotated_cylinder_y
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
3 changes: 1 addition & 2 deletions test_3d/benchmark.rotated_cylinder_z
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,4 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
3 changes: 1 addition & 2 deletions test_3d/benchmark.slanted_cylinder
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ nodal_proj.verbose = 1 # Nodal Projector
scalar_diffusion.verbose = 1 # Scalar Diffusion
tensor_diffusion.verbose = 1 # Tensor Diffusion

amr.plt_vfrac = 1
amr.plt_ccse_regtest = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac

eb2.small_volfrac = 0.055
eb2.extend_domain_face = 1
3 changes: 1 addition & 2 deletions test_3d/benchmark.tracer_adv_diff
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ nodal_proj.verbose = 0 # Nodal Projector
scalar_diffusion.verbose = 0 # Scalar Diffusion
tensor_diffusion.verbose = 0 # Tensor Diffusion

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
3 changes: 1 addition & 2 deletions test_3d/benchmark.tracer_adv_diff_cn
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ incflo.verbose = 2 # incflo_level
mac_proj.verbose = 1 # MAC Projector
nodal_proj.verbose = 1 # Nodal Projector

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
3 changes: 1 addition & 2 deletions test_3d/benchmark.tracer_advection
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@ incflo.verbose = 2 # incflo_level
mac_proj.verbose = 1 # MAC Projector
nodal_proj.verbose = 1 # Nodal Projector

amr.plt_ccse_regtest = 1
amr.plt_vfrac = 1
amr.plotVariables = velx vely velz gpx gpy gpz density tracer vfrac
1 change: 0 additions & 1 deletion test_3d/benchmark.upipe
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ incflo.cfl = 0.45
# INPUT AND OUTPUT #
#.......................................#
amr.plot_int = 100 # Steps between plot files
amr.plt_regtest = 1

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
Expand Down
3 changes: 1 addition & 2 deletions test_no_eb_2d/benchmark.bouss_bubble_god
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ yhi.type = "sw"

incflo.gradrhoerr = 0.1

amr.plt_ccse_regtest = 1
amr.plt_vort = 1
amr.plotVariables = velx vely gpx gpy density tracer vort

incflo.advect_tracer = true
incflo.diffusion_type = 2 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit
Expand Down
3 changes: 1 addition & 2 deletions test_no_eb_2d/benchmark.bouss_bubble_mol
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ yhi.type = "sw"

incflo.gradrhoerr = 0.1

amr.plt_ccse_regtest = 1
amr.plt_vort = 1
amr.plotVariables = velx vely gpx gpy density tracer vort

incflo.advect_tracer = true
incflo.diffusion_type = 2 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit
Expand Down
Loading

0 comments on commit d0347a8

Please sign in to comment.