diff --git a/Docs/sphinx_documentation/source/InputsPlotFiles.rst b/Docs/sphinx_documentation/source/InputsPlotFiles.rst index d3966a9a1..42e0d1779 100644 --- a/Docs/sphinx_documentation/source/InputsPlotFiles.rst +++ b/Docs/sphinx_documentation/source/InputsPlotFiles.rst @@ -26,11 +26,19 @@ as whether the EB geometry should be written out. +---------------------+-----------------------------------------------------------------------+-------------+-----------+ The following inputs must be preceded by "amr" and control what variables will be written in plotfiles. +By default, incflo plotfiles contain the velocity, pressure gradient, density, tracer, velocity magnitude, vorticity, +and if using EB, volume fraction. +---------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +=====================+=======================================================================+=============+===========+ -| plt_ccse_regtest | Save all variables to plot file (overrides all other IO flags) | Int | 0 | +| plotVariables | Space separated list of variable names. **Takes precedent over all** | String | see above | +| | **other plotfile options**. Plotfile will contain only this list, | | | +| | e.g. "amr.plotVariables = velx density" will result in plotfiles | | | +| | containing only the x-component of the velocity and the density. | | | ++---------------------+-----------------------------------------------------------------------+-------------+-----------+ +| plt_ccse_regtest | Collection of variables for regression test plotfiles (will get | Int | 0 | +| | overwritten by plotVariables or plt_* flags) | | | +---------------------+-----------------------------------------------------------------------+-------------+-----------+ | plt_velx | Save x-velocity to plot file | Int | 1 | +---------------------+-----------------------------------------------------------------------+-------------+-----------+ @@ -62,3 +70,24 @@ The following inputs must be preceded by "amr" and control what variables will b +---------------------+-----------------------------------------------------------------------+-------------+-----------+ | plt_vfrac | Save EB volume fraction to plot file | Int | 1 | +---------------------+-----------------------------------------------------------------------+-------------+-----------+ + +incflo provides the option to write a user defined selection of variables to a "smallplotfile" at an interval that is +different than that of the full plotfile. +The following inputs must be preceded by "amr" and control frequency and naming of smallplotfile generation. + ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ +| | Description | Type | Default | ++==========================+=======================================================================+=============+===========+ +| smallplot_int | Frequency of smallplotfile output; | Int | -1 | +| | if -1 then no plotfiles will be written at this frequency | | | +| smallplot_per_approx | Time period of smallplotfile output (approximate); does not modify dt | Real | -1 | +| | if -1 then no smallplotfiles will be written at this frequency | | | ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ +| smallplotfile_on_restart | Write smallplotfile when restarting (only used if smallplot_int>0) | Bool | False | ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ +| smallplot_file | Prefix to use for smallplotfile output | String | smallplt | ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ +| smallplotVariables | Space separated list of variable names. | String | none | ++--------------------------+-----------------------------------------------------------------------+-------------+-----------+ diff --git a/src/incflo.H b/src/incflo.H index 6e3c54775..c39940e93 100644 --- a/src/incflo.H +++ b/src/incflo.H @@ -569,33 +569,29 @@ private: amrex::Vector tag_region_lo; amrex::Vector tag_region_hi; - // 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; + // Specify fluid data in plot files + amrex::Vector m_plotVars = +#if (AMREX_SPACEDIM == 3) + {"velx","vely","velz","gpx","gpy","gpz","density","tracer","magvel","vort","vfrac"}; +#else + {"velx","vely","gpx","gpy","density","tracer","magvel","vort","vfrac"}; +#endif -#ifdef INCFLO_USE_PARTICLES - int m_plt_particle_count = 0; + // smallplotfile allows users to output certain variables at a different frequency. + // Off by default. + int m_smallplot_int = -1; + amrex::Real m_smallplot_per_approx = -1.0; + // No smallplot_per_exact because it requires changing the timestep + int m_last_smallplt = -1; + bool m_smallplotfile_on_restart = false; + + std::string m_smallplot_file{"smallplt"}; + // Require user to choose smallplotfile variables + amrex::Vector m_smallplotVars; + + +#ifdef INCFLO_USE_PARTICLES // Particle container with all particle species ParticleData particleData; @@ -887,7 +883,9 @@ private: void copy_from_old_to_new_tracer (int lev, amrex::IntVect const& ng = amrex::IntVect{0}); void Advance (); - bool writeNow (); + bool writeNow () { return writeNow(m_plot_int, m_plot_per_approx, m_plot_per_exact); } + bool writeNow (int a_plot_int, amrex::Real a_plot_per_approx, + amrex::Real a_plot_per_exact); /////////////////////////////////////////////////////////////////////////// // @@ -963,6 +961,8 @@ private: void WriteJobInfo (const std::string& path) const; void WriteCheckPointFile () const; void WritePlotFile (); + void WritePlotVariables (amrex::Vector vars, const std::string& plotfilename); + virtual void WriteSmallPlotFile (); void ReadCheckpointFile (); }; diff --git a/src/incflo.cpp b/src/incflo.cpp index d9beef8b8..1f985b375 100644 --- a/src/incflo.cpp +++ b/src/incflo.cpp @@ -96,6 +96,11 @@ void incflo::InitData () WritePlotFile(); m_last_plt = 0; } + if (m_smallplot_int > 0 || m_smallplot_per_approx > 0) + { + WriteSmallPlotFile(); + m_last_smallplt = 0; + } if (m_KE_int > 0) { amrex::Abort("xxxxx m_KE_int todo"); @@ -116,6 +121,11 @@ void incflo::InitData () WritePlotFile(); m_last_plt = 0; } + if (m_smallplotfile_on_restart) + { + WriteSmallPlotFile(); + m_last_smallplt = 0; + } } #ifdef AMREX_USE_EB @@ -166,6 +176,11 @@ void incflo::Evolve() WritePlotFile(); m_last_plt = m_nstep; } + if (writeNow(m_smallplot_int, m_smallplot_per_approx, -1.)) + { + WriteSmallPlotFile(); + m_last_smallplt = m_nstep; + } if(m_check_int > 0 && (m_nstep % m_check_int == 0)) { @@ -278,28 +293,28 @@ void incflo::MakeNewLevelFromScratch (int lev, Real time, const BoxArray& new_gr } bool -incflo::writeNow() +incflo::writeNow(int a_plot_int, Real a_plot_per_approx, Real a_plot_per_exact) { bool write_now = false; - if ( ( m_plot_int > 0 && (m_nstep % m_plot_int == 0) ) || - (m_plot_per_exact > 0 && (std::abs(std::remainder(m_cur_time, m_plot_per_exact)) < 1.e-12) ) ) { + if ( ( a_plot_int > 0 && (m_nstep % a_plot_int == 0) ) || + (a_plot_per_exact > 0 && (std::abs(std::remainder(m_cur_time, a_plot_per_exact)) < 1.e-12) ) ) { write_now = true; - } else if (m_plot_per_approx > 0.0) { - // Check to see if we've crossed a m_plot_per_approx interval by comparing + } else if (a_plot_per_approx > 0.0) { + // Check to see if we've crossed a a_plot_per_approx interval by comparing // the number of intervals that have elapsed for both the current // time and the time at the beginning of this timestep. - int num_per_old = static_cast(std::round((m_cur_time-m_dt) / m_plot_per_approx)); - int num_per_new = static_cast(std::round((m_cur_time ) / m_plot_per_approx)); + int num_per_old = static_cast(std::round((m_cur_time-m_dt) / a_plot_per_approx)); + int num_per_new = static_cast(std::round((m_cur_time ) / a_plot_per_approx)); // Before using these, however, we must test for the case where we're // within machine epsilon of the next interval. In that case, increment - // the counter, because we have indeed reached the next m_plot_per_approx interval + // the counter, because we have indeed reached the next a_plot_per_approx interval // at this point. const Real eps = std::numeric_limits::epsilon() * Real(10.0) * std::abs(m_cur_time); - const Real next_plot_time = (num_per_old + 1) * m_plot_per_approx; + const Real next_plot_time = (num_per_old + 1) * a_plot_per_approx; if ((num_per_new == num_per_old) && std::abs(m_cur_time - next_plot_time) <= eps) { diff --git a/src/setup/init.cpp b/src/setup/init.cpp index bdec12bb3..1f873dec9 100644 --- a/src/setup/init.cpp +++ b/src/setup/init.cpp @@ -233,69 +233,167 @@ void incflo::ReadIOParameters() if ( (m_plot_int > 0 && m_plot_per_exact > 0) || (m_plot_int > 0 && m_plot_per_approx > 0) || - (m_plot_per_exact > 0 && m_plot_per_approx > 0) ) - amrex::Abort("Must choose only one of plot_int or plot_per_exact or plot_per_approx"); + (m_plot_per_exact > 0 && m_plot_per_approx > 0) ) { + amrex::Abort("Must choose only one of plot_int or plot_per_exact or plot_per_approx"); } - // The plt_ccse_regtest resets the defaults, - // but we can over-ride those below + // + // Choose which variables to write to plotfile + // + // The plt_ccse_regtest resets plotfile variables for the regression tests int plt_ccse_regtest = 0; pp.query("plt_ccse_regtest", plt_ccse_regtest); if (plt_ccse_regtest != 0) { - m_plt_velx = 1; - m_plt_vely = 1; - m_plt_velz = 1; - m_plt_gpx = 1; - m_plt_gpy = 1; - m_plt_gpz = 1; - m_plt_rho = 1; - m_plt_tracer = 1; - m_plt_p = 0; - m_plt_macphi = 0; - m_plt_eta = 0; - m_plt_vort = 0; - m_plt_magvel = 0; - m_plt_strainrate = 0; - m_plt_divu = 0; - m_plt_vfrac = 0; +#if (AMREX_SPACEDIM == 3) + m_plotVars = {"velx","vely","velz","gpx","gpy","gpz","density","tracer"}; +#else + m_plotVars = {"velx","vely","gpx","gpy","density","tracer"}; +#endif + #ifdef INCFLO_USE_PARTICLES - m_plt_particle_count = 1; + m_plotVars.push_back("particle_count"); #endif } - // Which variables to write to plotfile - - pp.query("plt_velx", m_plt_velx ); - pp.query("plt_vely", m_plt_vely ); - pp.query("plt_velz", m_plt_velz ); + // Helper function to update m_plotVars according to m_plt_* flags + auto update_plotVars = [this] (std::string const& a_name, bool plot_flag) { + for (int n = 0; n < m_plotVars.size(); n++) { + if ( m_plotVars[n] == a_name ) { + if ( plot_flag ) { + return; /* already there */} + else { + //std::erase(m_plotVars, a_name); // Requires c++20 + m_plotVars.erase(std::remove(m_plotVars.begin(), m_plotVars.end(), a_name), + m_plotVars.end()); + return; + } + } + } + if (plot_flag) { m_plotVars.push_back(a_name); } + }; + + // Check for flags to change inclusion of individual fields + 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); + } - pp.query("plt_gpx", m_plt_gpx ); - pp.query("plt_gpy", m_plt_gpy ); - pp.query("plt_gpz", m_plt_gpz ); + 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); + } - pp.query("plt_rho", m_plt_rho ); - pp.query("plt_tracer", m_plt_tracer); - pp.query("plt_p ", m_plt_p ); - pp.query("plt_macphi", m_plt_macphi); - pp.query("plt_eta", m_plt_eta ); - pp.query("plt_magvel", m_plt_magvel); - pp.query("plt_vort", m_plt_vort ); - pp.query("plt_strainrate", m_plt_strainrate); - pp.query("plt_divu", m_plt_divu ); - pp.query("plt_vfrac", m_plt_vfrac ); + 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); + } - pp.query("plt_forcing", m_plt_forcing ); + if ( pp.query("plt_forcing", plt_var ) ) { + Warning("amr.plt_* is depreciated. Please use amr.plotVariables"); + update_plotVars("forcing",plt_var); + } - pp.query("plt_error_u", m_plt_error_u ); - pp.query("plt_error_v", m_plt_error_v ); - pp.query("plt_error_w", m_plt_error_w ); - pp.query("plt_error_p", m_plt_error_p ); - pp.query("plt_error_mac_p",m_plt_error_mac_p ); + 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 - pp.query("plt_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 + if ( pp.contains("plotVariables") ) { + m_plotVars.clear(); + pp.queryarr("plotVariables", m_plotVars); + } + + // Small plot options + pp.query("smallplot_file" , m_smallplot_file); + pp.query("smallplot_int" , m_smallplot_int); + pp.query("smallplot_per_approx", m_smallplot_per_approx); + pp.query("smallplotfile_on_restart", m_smallplotfile_on_restart); + + if ( m_smallplot_int > 0 && m_smallplot_per_approx > 0 ) { + amrex::Abort("Must choose only one of smallplot_int or smallplot_per_approx"); } + + if ( pp.contains("smallplotVariables") ) { + m_smallplotVars.clear(); + pp.queryarr("smallplotVariables", m_smallplotVars); + } } // diff --git a/src/utilities/io.cpp b/src/utilities/io.cpp index d3de63406..3461891a2 100644 --- a/src/utilities/io.cpp +++ b/src/utilities/io.cpp @@ -338,95 +338,86 @@ void incflo::WritePlotFile() { BL_PROFILE("incflo::WritePlotFile()"); - if (m_plt_vort || m_plt_divu || m_plt_forcing || m_plt_eta || m_plt_strainrate) { - for (int lev = 0; lev <= finest_level; ++lev) { -#ifdef AMREX_USE_EB - const int ng = (EBFactory(0).isAllRegular()) ? 1 : 2; -#else - const int ng = 1; -#endif - fillpatch_velocity(lev, m_cur_time, m_leveldata[lev]->velocity, ng); - fillpatch_density(lev, m_cur_time, m_leveldata[lev]->density, ng); - fillpatch_tracer(lev, m_cur_time, m_leveldata[lev]->tracer, ng); - } - } - const std::string& plotfilename = amrex::Concatenate(m_plot_file, m_nstep); amrex::Print() << " Writing plotfile " << plotfilename << " at time " << m_cur_time << std::endl; - int ncomp = 0; + // Write the plotfile + WritePlotVariables(m_plotVars, plotfilename); - // Velocity components - if (m_plt_velx) ++ncomp; - if (m_plt_vely) ++ncomp; -#if (AMREX_SPACEDIM == 3) - if (m_plt_velz) ++ncomp; -#endif + WriteJobInfo(plotfilename); - // Pressure gradient components - if (m_plt_gpx) ++ncomp; - if (m_plt_gpy) ++ncomp; -#if (AMREX_SPACEDIM == 3) - if (m_plt_gpz) ++ncomp; +#ifdef INCFLO_USE_PARTICLES + particleData.Checkpoint(plotfilename); #endif +} - // Density - if (m_plt_rho) ++ncomp; +void incflo::WriteSmallPlotFile() +{ + BL_PROFILE("incflo::WriteSmallPlotFile()"); - // Tracers - if (m_plt_tracer) ncomp += m_ntrac; + const std::string& plotfilename = amrex::Concatenate(m_smallplot_file, m_nstep); - // Pressure - if(m_plt_p) ++ncomp; + amrex::Print() << " Writing smallplotfile " << plotfilename << " at time " << m_cur_time << std::endl; - // MAC phi - if(m_plt_macphi) ncomp += 1; + // Write the plotfile + WritePlotVariables(m_smallplotVars, plotfilename); +} - // Error in u (computed vs exact) - if(m_plt_error_u) ncomp += 1; +void incflo::WritePlotVariables(Vector vars, const std::string& plotfilename) +{ + BL_PROFILE("incflo::WritePlotVariables()"); - // Error in v (computed vs exact) - if(m_plt_error_v) ncomp += 1; + if ( vars.empty() ) { + Abort("incflo::WritePlotVariables : Must specify at least one variable to plot"); + } -#if (AMREX_SPACEDIM == 3) - // Error in w (computed vs exact) - if(m_plt_error_w) ncomp += 1; + for(int n = 0; n < vars.size(); n++) { + if (vars[n] == "vort" || vars[n] == "divu" || vars[n] == "forcing" || + vars[n] == "eta" || vars[n] == "strainrate") { + for (int lev = 0; lev <= finest_level; ++lev) { +#ifdef AMREX_USE_EB + const int ng = (EBFactory(0).isAllRegular()) ? 1 : 2; +#else + const int ng = 1; #endif + fillpatch_velocity(lev, m_cur_time, m_leveldata[lev]->velocity, ng); + fillpatch_density(lev, m_cur_time, m_leveldata[lev]->density, ng); + fillpatch_tracer(lev, m_cur_time, m_leveldata[lev]->tracer, ng); + } + break; + } + } - // Error in nodal pressure (computed vs exact) - if(m_plt_error_p) ncomp += 1; - - // Error in MAC pressure (computed vs exact) - if(m_plt_error_mac_p) ncomp += 1; - - // Apparent viscosity - if(m_plt_eta) ++ncomp; - - // Magnitude of velocity - if(m_plt_magvel) ++ncomp; - - // Vorticity - if(m_plt_vort) ++ncomp; - - // Forcing terms in velocity update - if(m_plt_forcing) ncomp += 3; - - // Magnitude of the rate-of-strain tensor - if(m_plt_strainrate) ++ncomp; + // Determine how many components are needed for plotfile MF + int ncomp = 0; - // Divergence of velocity field - if(m_plt_divu) ++ncomp; + for(int n = 0; n < vars.size(); n++) { + // Check for options with more than one component + if ( vars[n] == "tracer" ) { ncomp += m_ntrac; } + else if ( vars[n] == "forcing" ) { ncomp += AMREX_SPACEDIM; } + // Only include these options if relevant/enabled + else if ( vars[n] == "velz" || vars[n] == "gpz") { +#if (AMREX_SPACEDIM == 3) + ++ncomp; +#endif + } + else if ( vars[n] == "vfrac" ) { #ifdef AMREX_USE_EB - // Cut cell volume fraction - if(m_plt_vfrac) ++ncomp; + // Cut cell volume fraction + ++ncomp; #endif - + } + else if( vars[n] == "particle_count" ) { #ifdef INCFLO_USE_PARTICLES - // Number of particles per cell - if(m_plt_particle_count) ++ncomp; + // Number of particles per cell + ++ncomp; #endif + } + else { ncomp++; } + } + Vector mf(finest_level + 1); for (int lev = 0; lev <= finest_level; ++lev) { @@ -434,260 +425,259 @@ void incflo::WritePlotFile() } Vector pltscaVarsName; + pltscaVarsName.reserve(ncomp); int icomp = 0; - if (m_plt_velx) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 0, icomp, 1, 0); + for(int n = 0; n < vars.size(); n++) { + if ( vars[n] == "velx" ) { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 0, icomp, 1, 0); + } + pltscaVarsName.push_back("velx"); + ++icomp; } - pltscaVarsName.push_back("velx"); - ++icomp; - } - if (m_plt_vely) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 1, icomp, 1, 0); + else if (vars[n] == "vely") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 1, icomp, 1, 0); + } + pltscaVarsName.push_back("vely"); + ++icomp; } - pltscaVarsName.push_back("vely"); - ++icomp; - } + else if (vars[n] == "velz") { #if (AMREX_SPACEDIM == 3) - if (m_plt_velz) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 2, icomp, 1, 0); - } - pltscaVarsName.push_back("velz"); - ++icomp; - } + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 2, icomp, 1, 0); + } + pltscaVarsName.push_back("velz"); + ++icomp; #endif - if (m_plt_gpx) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 0, icomp, 1, 0); - mf[lev].plus(m_gp0[0],icomp,1,0); } - pltscaVarsName.push_back("gpx"); - ++icomp; - } - if (m_plt_gpy) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 1, icomp, 1, 0); - mf[lev].plus(m_gp0[1],icomp,1,0); + else if (vars[n] == "gpx") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 0, icomp, 1, 0); + mf[lev].plus(m_gp0[0],icomp,1,0); + } + pltscaVarsName.push_back("gpx"); + ++icomp; } - pltscaVarsName.push_back("gpy"); - ++icomp; - } -#if (AMREX_SPACEDIM == 3) - if (m_plt_gpz) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 2, icomp, 1, 0); - mf[lev].plus(m_gp0[2],icomp,1,0); + else if (vars[n] == "gpy") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 1, icomp, 1, 0); + mf[lev].plus(m_gp0[1],icomp,1,0); + } + pltscaVarsName.push_back("gpy"); + ++icomp; } - pltscaVarsName.push_back("gpz"); - ++icomp; - } + else if (vars[n] == "gpz") { +#if (AMREX_SPACEDIM == 3) + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->gp, 2, icomp, 1, 0); + mf[lev].plus(m_gp0[2],icomp,1,0); + } + pltscaVarsName.push_back("gpz"); + ++icomp; #endif - if (m_plt_rho) { - for (int lev = 0; lev <= finest_level; ++lev) - MultiFab::Copy(mf[lev], m_leveldata[lev]->density, 0, icomp, 1, 0); - pltscaVarsName.push_back("density"); - ++icomp; - } - if (m_plt_tracer) { - for (int lev = 0; lev <= finest_level; ++lev) - MultiFab::Copy(mf[lev], m_leveldata[lev]->tracer, 0, icomp, m_ntrac, 0); - for (int i = 0; i < m_ntrac; ++i) { - pltscaVarsName.push_back("tracer"+std::to_string(i)); } - icomp += m_ntrac; - } - if (m_plt_p) { - if (m_use_cc_proj) { + else if (vars[n] == "rho" || vars[n] == "density") { for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->p_cc, 0, icomp, 1, 0); + MultiFab::Copy(mf[lev], m_leveldata[lev]->density, 0, icomp, 1, 0); } - } else { + pltscaVarsName.push_back("density"); + ++icomp; + } + else if (vars[n] == "tracer") { for (int lev = 0; lev <= finest_level; ++lev) { - amrex::average_node_to_cellcenter(mf[lev], icomp, m_leveldata[lev]->p_nd, 0, 1); + MultiFab::Copy(mf[lev], m_leveldata[lev]->tracer, 0, icomp, m_ntrac, 0); + } + for (int i = 0; i < m_ntrac; ++i) { + pltscaVarsName.push_back("tracer"+std::to_string(i)); } + icomp += m_ntrac; + } + else if (vars[n] == "p") { + if (m_use_cc_proj) { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->p_cc, 0, icomp, 1, 0); + } + pltscaVarsName.push_back("p_cc"); + } else { + for (int lev = 0; lev <= finest_level; ++lev) { + amrex::average_node_to_cellcenter(mf[lev], icomp, m_leveldata[lev]->p_nd, 0, 1); + } + pltscaVarsName.push_back("p_nd"); + } + ++icomp; } - pltscaVarsName.push_back("p"); - ++icomp; - } - - if (m_plt_macphi) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], m_leveldata[lev]->mac_phi, 0, icomp, 1, 0); + else if (vars[n] == "macphi") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], m_leveldata[lev]->mac_phi, 0, icomp, 1, 0); + } + pltscaVarsName.push_back("mac_phi"); + ++icomp; } - pltscaVarsName.push_back("mac_phi"); - ++icomp; - } - - if (m_plt_error_u) { - int icomp_err_u = 0; - for (int lev = 0; lev <= finest_level; ++lev) - { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 0, icomp, 1, 0); - DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_u); - amrex::Print() << "Norm0 / Norm2 of u error " << - mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + else if (vars[n] == "error_u") { + int icomp_err_u = 0; + for (int lev = 0; lev <= finest_level; ++lev) + { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 0, icomp, 1, 0); + DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_u); + amrex::Print() << "Norm0 / Norm2 of u error " << + mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + } + pltscaVarsName.push_back("error_u"); + ++icomp; } - pltscaVarsName.push_back("error_u"); - ++icomp; - } - - if (m_plt_error_v) { - int icomp_err_v = 1; - for (int lev = 0; lev <= finest_level; ++lev) - { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 1, icomp, 1, 0); - DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_v); - amrex::Print() << "Norm0 / Norm2 of v error " << - mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + else if (vars[n] == "error_v") { + int icomp_err_v = 1; + for (int lev = 0; lev <= finest_level; ++lev) + { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 1, icomp, 1, 0); + DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_v); + amrex::Print() << "Norm0 / Norm2 of v error " << + mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + } + pltscaVarsName.push_back("error_v"); + ++icomp; } - pltscaVarsName.push_back("error_v"); - ++icomp; - } - #if (AMREX_SPACEDIM == 3) - if (m_plt_error_w) { - int icomp_err_w = 2; - for (int lev = 0; lev <= finest_level; ++lev) - { - MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 2, icomp, 1, 0); - DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_w); - amrex::Print() << "Norm0 / Norm2 of w error " << - mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + else if (vars[n] == "error_w") { + int icomp_err_w = 2; + for (int lev = 0; lev <= finest_level; ++lev) + { + MultiFab::Copy(mf[lev], m_leveldata[lev]->velocity, 2, icomp, 1, 0); + DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_w); + amrex::Print() << "Norm0 / Norm2 of w error " << + mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + } + pltscaVarsName.push_back("error_w"); + ++icomp; } - pltscaVarsName.push_back("error_w"); - ++icomp; - } #endif + else if (vars[n] == "error_p") { + int icomp_err_p = AMREX_SPACEDIM; + for (int lev = 0; lev <= finest_level; ++lev) + amrex::average_node_to_cellcenter(mf[lev], icomp, m_leveldata[lev]->p_nd, 0, 1); - if (m_plt_error_p) { - int icomp_err_p = AMREX_SPACEDIM; - for (int lev = 0; lev <= finest_level; ++lev) - amrex::average_node_to_cellcenter(mf[lev], icomp, m_leveldata[lev]->p_nd, 0, 1); - - Real offset = mf[0].sum(icomp,true); - ParallelDescriptor::ReduceRealSum(offset); - offset *= Real(1.0)/Real(grids[0].numPts()); + Real offset = mf[0].sum(icomp,true); + ParallelDescriptor::ReduceRealSum(offset); + offset *= Real(1.0)/Real(grids[0].numPts()); - for (int lev = 0; lev <= finest_level; ++lev) - { - mf[lev].plus(-offset, icomp, 1); - DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_p); - amrex::Print() << "Norm0 / Norm2 of p error " << - mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + for (int lev = 0; lev <= finest_level; ++lev) + { + mf[lev].plus(-offset, icomp, 1); + DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_p); + amrex::Print() << "Norm0 / Norm2 of p error " << + mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + } + pltscaVarsName.push_back("error_p"); + ++icomp; } - pltscaVarsName.push_back("error_p"); - ++icomp; - } + else if (vars[n] == "error_mac_p") { + int icomp_err_mac_p = AMREX_SPACEDIM+1; + for (int lev = 0; lev <= finest_level; ++lev) + MultiFab::Copy(mf[lev], m_leveldata[lev]->mac_phi, 0, icomp, 1, 0); - if (m_plt_error_mac_p) { - int icomp_err_mac_p = AMREX_SPACEDIM+1; - for (int lev = 0; lev <= finest_level; ++lev) - MultiFab::Copy(mf[lev], m_leveldata[lev]->mac_phi, 0, icomp, 1, 0); + Real offset = mf[0].sum(icomp,true); + ParallelDescriptor::ReduceRealSum(offset); + offset *= Real(1.0)/Real(grids[0].numPts()); - Real offset = mf[0].sum(icomp,true); - ParallelDescriptor::ReduceRealSum(offset); - offset *= Real(1.0)/Real(grids[0].numPts()); - - for (int lev = 0; lev <= finest_level; ++lev) - { - mf[lev].plus(-offset, icomp, 1); - DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_mac_p); - amrex::Print() << "Norm0 / Norm2 of mac_p error " << - mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + for (int lev = 0; lev <= finest_level; ++lev) + { + mf[lev].plus(-offset, icomp, 1); + DiffFromExact(lev, Geom(lev), m_cur_time, m_dt, mf[lev], icomp, icomp_err_mac_p); + amrex::Print() << "Norm0 / Norm2 of mac_p error " << + mf[lev].norm0(icomp) << " " << mf[lev].norm2(icomp) / std::sqrt(mf[lev].boxArray().numPts()) << std::endl; + } + pltscaVarsName.push_back("error_mac_p"); + ++icomp; } - pltscaVarsName.push_back("error_mac_p"); - ++icomp; - } - - if (m_plt_eta) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab vel_eta(mf[lev], amrex::make_alias, icomp, 1); - compute_viscosity_at_level(lev, - &vel_eta, - &m_leveldata[lev]->density, - &m_leveldata[lev]->velocity, - Geom(lev), - m_cur_time, 0); - } - pltscaVarsName.push_back("eta"); - ++icomp; - } - if (m_plt_magvel) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab magvel(mf[lev], amrex::make_alias, icomp, 1); - ComputeMagVel(lev, m_cur_time, magvel, m_leveldata[lev]->velocity); + else if (vars[n] == "eta") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab vel_eta(mf[lev], amrex::make_alias, icomp, 1); + compute_viscosity_at_level(lev, + &vel_eta, + &m_leveldata[lev]->density, + &m_leveldata[lev]->velocity, + Geom(lev), + m_cur_time, 0); + } + pltscaVarsName.push_back("eta"); + ++icomp; } - pltscaVarsName.push_back("magvel"); - ++icomp; - } - - if (m_plt_vort) { - for (int lev = 0; lev <= finest_level; ++lev) { - (m_leveldata[lev]->velocity).FillBoundary(geom[lev].periodicity()); - MultiFab vort(mf[lev], amrex::make_alias, icomp, 1); - ComputeVorticity(lev, m_cur_time, vort, m_leveldata[lev]->velocity); + else if (vars[n] == "magvel") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab magvel(mf[lev], amrex::make_alias, icomp, 1); + ComputeMagVel(lev, m_cur_time, magvel, m_leveldata[lev]->velocity); + } + pltscaVarsName.push_back("magvel"); + ++icomp; } - pltscaVarsName.push_back("vort"); - ++icomp; - } - if (m_plt_forcing) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab forcing(mf[lev], amrex::make_alias, icomp, 3); - compute_vel_forces_on_level(lev, forcing, - m_leveldata[lev]->velocity, - m_leveldata[lev]->density, - m_leveldata[lev]->tracer, - m_leveldata[lev]->tracer); - } - pltscaVarsName.push_back("forcing_x"); - pltscaVarsName.push_back("forcing_y"); - pltscaVarsName.push_back("forcing_z"); - icomp += 3; - } - if (m_plt_strainrate) { - - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab strainrate(mf[lev], amrex::make_alias, icomp, 1); - compute_strainrate_at_level(lev, - &strainrate, - &m_leveldata[lev]->velocity, - Geom(lev), - m_cur_time, 0); - } - pltscaVarsName.push_back("strainrate"); - ++icomp; - } - if (m_plt_divu) { - amrex::Abort("plt_divu: xxxxx TODO"); - pltscaVarsName.push_back("divu"); - ++icomp; - } + else if (vars[n] == "vort") { + for (int lev = 0; lev <= finest_level; ++lev) { + (m_leveldata[lev]->velocity).FillBoundary(geom[lev].periodicity()); + MultiFab vort(mf[lev], amrex::make_alias, icomp, 1); + ComputeVorticity(lev, m_cur_time, vort, m_leveldata[lev]->velocity); + } + pltscaVarsName.push_back("vort"); + ++icomp; + } + else if (vars[n] == "forcing") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab forcing(mf[lev], amrex::make_alias, icomp, AMREX_SPACEDIM); + compute_vel_forces_on_level(lev, forcing, + m_leveldata[lev]->velocity, + m_leveldata[lev]->density, + m_leveldata[lev]->tracer, + m_leveldata[lev]->tracer); + } + AMREX_D_TERM(pltscaVarsName.push_back("forcing_x");, + pltscaVarsName.push_back("forcing_y");, + pltscaVarsName.push_back("forcing_z");); + icomp += AMREX_SPACEDIM; + } + else if (vars[n] == "strainrate") { + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab strainrate(mf[lev], amrex::make_alias, icomp, 1); + compute_strainrate_at_level(lev, + &strainrate, + &m_leveldata[lev]->velocity, + Geom(lev), + m_cur_time, 0); + } + pltscaVarsName.push_back("strainrate"); + ++icomp; + } + else if (vars[n] == "divu") { + amrex::Abort("plt_divu: xxxxx TODO"); + pltscaVarsName.push_back("divu"); + ++icomp; + } + else if (vars[n] == "particle_count") { #ifdef INCFLO_USE_PARTICLES - if (m_plt_particle_count) { - const auto& particles_namelist( particleData.getNames() ); - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab temp_dat(mf[lev].boxArray(), mf[lev].DistributionMap(), 1, 0); - temp_dat.setVal(0); - particleData[particles_namelist[0]]->Increment(temp_dat, lev); - MultiFab::Copy(mf[lev], temp_dat, 0, icomp, 1, 0); - } - pltscaVarsName.push_back("particle_count"); - ++icomp; - } + const auto& particles_namelist( particleData.getNames() ); + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab temp_dat(mf[lev].boxArray(), mf[lev].DistributionMap(), 1, 0); + temp_dat.setVal(0); + particleData[particles_namelist[0]]->Increment(temp_dat, lev); + MultiFab::Copy(mf[lev], temp_dat, 0, icomp, 1, 0); + } + pltscaVarsName.push_back("particle_count"); + ++icomp; #endif - + } + else if (vars[n] == "vfrac") { #ifdef AMREX_USE_EB - if (m_plt_vfrac) { - for (int lev = 0; lev <= finest_level; ++lev) { - MultiFab::Copy(mf[lev], EBFactory(lev).getVolFrac(), 0, icomp, 1, 0); + for (int lev = 0; lev <= finest_level; ++lev) { + MultiFab::Copy(mf[lev], EBFactory(lev).getVolFrac(), 0, icomp, 1, 0); + } + pltscaVarsName.push_back("vfrac"); + ++icomp; +#endif + } + else { + amrex::Abort("incflo::WritePlotfileVariables : plotfile variable '"+vars[n]+"' not found"); } - pltscaVarsName.push_back("vfrac"); - ++icomp; } -#endif #ifdef AMREX_USE_EB for (int lev = 0; lev <= finest_level; ++lev) { @@ -695,8 +685,6 @@ void incflo::WritePlotFile() } #endif - AMREX_ALWAYS_ASSERT(ncomp == static_cast(pltscaVarsName.size())); - // This needs to be defined in order to use amrex::WriteMultiLevelPlotfile, // but will never change unless we use subcycling. // If we do use subcycling, this should be a incflo class member. @@ -705,9 +693,4 @@ void incflo::WritePlotFile() // Write the plotfile amrex::WriteMultiLevelPlotfile(plotfilename, finest_level + 1, GetVecOfConstPtrs(mf), pltscaVarsName, Geom(), m_cur_time, istep, refRatio()); - WriteJobInfo(plotfilename); - -#ifdef INCFLO_USE_PARTICLES - particleData.Checkpoint(plotfilename); -#endif } diff --git a/test_2d/benchmark.eb_flow_const_velx b/test_2d/benchmark.eb_flow_const_velx index ed1df397b..f7141160c 100644 --- a/test_2d/benchmark.eb_flow_const_velx +++ b/test_2d/benchmark.eb_flow_const_velx @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_2d/benchmark.eb_flow_const_vely b/test_2d/benchmark.eb_flow_const_vely index b2260df95..769ee90a3 100644 --- a/test_2d/benchmark.eb_flow_const_vely +++ b/test_2d/benchmark.eb_flow_const_vely @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_2d/benchmark.eb_flow_sphere b/test_2d/benchmark.eb_flow_sphere index 1cd331b94..9c7448ebb 100644 --- a/test_2d/benchmark.eb_flow_sphere +++ b/test_2d/benchmark.eb_flow_sphere @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_2d/benchmark.inviscid_rotated_planes_x b/test_2d/benchmark.inviscid_rotated_planes_x index 8cb01977f..35802d299 100644 --- a/test_2d/benchmark.inviscid_rotated_planes_x +++ b/test_2d/benchmark.inviscid_rotated_planes_x @@ -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 diff --git a/test_2d/benchmark.rotated_planes_x b/test_2d/benchmark.rotated_planes_x index e489c35df..ab54672c7 100644 --- a/test_2d/benchmark.rotated_planes_x +++ b/test_2d/benchmark.rotated_planes_x @@ -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 diff --git a/test_2d/benchmark.rotated_planes_y b/test_2d/benchmark.rotated_planes_y index f38389f3e..bf1f9fde1 100644 --- a/test_2d/benchmark.rotated_planes_y +++ b/test_2d/benchmark.rotated_planes_y @@ -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 diff --git a/test_2d/benchmark.split b/test_2d/benchmark.split index b3517c266..9ead00118 100644 --- a/test_2d/benchmark.split +++ b/test_2d/benchmark.split @@ -13,7 +13,6 @@ incflo.cfl = 0.45 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 100 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_2d/benchmark.tracer_adv_diff b/test_2d/benchmark.tracer_adv_diff index 28183f1eb..cd04b0a45 100644 --- a/test_2d/benchmark.tracer_adv_diff +++ b/test_2d/benchmark.tracer_adv_diff @@ -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 diff --git a/test_2d/benchmark.tracer_adv_diff_cn b/test_2d/benchmark.tracer_adv_diff_cn index 29f30b09a..d48df307a 100644 --- a/test_2d/benchmark.tracer_adv_diff_cn +++ b/test_2d/benchmark.tracer_adv_diff_cn @@ -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 diff --git a/test_2d/benchmark.tracer_advection b/test_2d/benchmark.tracer_advection index ae71d4e43..0acd27d1e 100644 --- a/test_2d/benchmark.tracer_advection +++ b/test_2d/benchmark.tracer_advection @@ -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 diff --git a/test_2d/benchmark.vortex_in_sphere b/test_2d/benchmark.vortex_in_sphere index 3a76b8a49..d0451d4b4 100644 --- a/test_2d/benchmark.vortex_in_sphere +++ b/test_2d/benchmark.vortex_in_sphere @@ -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 diff --git a/test_3d/benchmark.channel_sphere b/test_3d/benchmark.channel_sphere index 3115d9932..e7d48c499 100644 --- a/test_3d/benchmark.channel_sphere +++ b/test_3d/benchmark.channel_sphere @@ -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" diff --git a/test_3d/benchmark.double_shear_layer b/test_3d/benchmark.double_shear_layer index fe462c4bb..abf83f2dc 100644 --- a/test_3d/benchmark.double_shear_layer +++ b/test_3d/benchmark.double_shear_layer @@ -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.plotVariables = velx vely gpx gpy density tracer magvel vort vfrac diff --git a/test_3d/benchmark.double_shear_restart b/test_3d/benchmark.double_shear_restart index d75a71fd9..03005c010 100644 --- a/test_3d/benchmark.double_shear_restart +++ b/test_3d/benchmark.double_shear_restart @@ -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 diff --git a/test_3d/benchmark.eb_flow_const_velx b/test_3d/benchmark.eb_flow_const_velx index ffcf1c42c..319d73e07 100644 --- a/test_3d/benchmark.eb_flow_const_velx +++ b/test_3d/benchmark.eb_flow_const_velx @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_3d/benchmark.eb_flow_const_vely b/test_3d/benchmark.eb_flow_const_vely index 9b7a931ee..05dee6307 100644 --- a/test_3d/benchmark.eb_flow_const_vely +++ b/test_3d/benchmark.eb_flow_const_vely @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_3d/benchmark.eb_flow_const_velz b/test_3d/benchmark.eb_flow_const_velz index 341804b7d..94b58dd1e 100644 --- a/test_3d/benchmark.eb_flow_const_velz +++ b/test_3d/benchmark.eb_flow_const_velz @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 1 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_3d/benchmark.eb_flow_density b/test_3d/benchmark.eb_flow_density index 4ef7d9047..c0c8da5c2 100644 --- a/test_3d/benchmark.eb_flow_density +++ b/test_3d/benchmark.eb_flow_density @@ -17,7 +17,6 @@ incflo.initial_iterations = 0 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 100 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_3d/benchmark.rotated_cylinder_x b/test_3d/benchmark.rotated_cylinder_x index a8a331173..a291c218f 100644 --- a/test_3d/benchmark.rotated_cylinder_x +++ b/test_3d/benchmark.rotated_cylinder_x @@ -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 diff --git a/test_3d/benchmark.rotated_cylinder_y b/test_3d/benchmark.rotated_cylinder_y index 61de0df6a..832ec7660 100644 --- a/test_3d/benchmark.rotated_cylinder_y +++ b/test_3d/benchmark.rotated_cylinder_y @@ -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 diff --git a/test_3d/benchmark.rotated_cylinder_z b/test_3d/benchmark.rotated_cylinder_z index 9356df8aa..fad813ac2 100644 --- a/test_3d/benchmark.rotated_cylinder_z +++ b/test_3d/benchmark.rotated_cylinder_z @@ -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 diff --git a/test_3d/benchmark.slanted_cylinder b/test_3d/benchmark.slanted_cylinder index 431ede797..3073fb480 100644 --- a/test_3d/benchmark.slanted_cylinder +++ b/test_3d/benchmark.slanted_cylinder @@ -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 diff --git a/test_3d/benchmark.tracer_adv_diff b/test_3d/benchmark.tracer_adv_diff index 95f4dc327..aba1f31e5 100644 --- a/test_3d/benchmark.tracer_adv_diff +++ b/test_3d/benchmark.tracer_adv_diff @@ -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 diff --git a/test_3d/benchmark.tracer_adv_diff_cn b/test_3d/benchmark.tracer_adv_diff_cn index d64727ee1..f9d311bb2 100644 --- a/test_3d/benchmark.tracer_adv_diff_cn +++ b/test_3d/benchmark.tracer_adv_diff_cn @@ -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 diff --git a/test_3d/benchmark.tracer_advection b/test_3d/benchmark.tracer_advection index 110357b3c..ddd6e855b 100644 --- a/test_3d/benchmark.tracer_advection +++ b/test_3d/benchmark.tracer_advection @@ -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 diff --git a/test_3d/benchmark.upipe b/test_3d/benchmark.upipe index a87b33d15..ac14ce0da 100644 --- a/test_3d/benchmark.upipe +++ b/test_3d/benchmark.upipe @@ -13,7 +13,6 @@ incflo.cfl = 0.45 # INPUT AND OUTPUT # #.......................................# amr.plot_int = 100 # Steps between plot files -amr.plt_regtest = 1 #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # PHYSICS # diff --git a/test_no_eb_2d/benchmark.bouss_bubble_god b/test_no_eb_2d/benchmark.bouss_bubble_god index 241655ae2..f2b32e26d 100644 --- a/test_no_eb_2d/benchmark.bouss_bubble_god +++ b/test_no_eb_2d/benchmark.bouss_bubble_god @@ -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 diff --git a/test_no_eb_2d/benchmark.bouss_bubble_mol b/test_no_eb_2d/benchmark.bouss_bubble_mol index f73ada2ae..6efce444f 100644 --- a/test_no_eb_2d/benchmark.bouss_bubble_mol +++ b/test_no_eb_2d/benchmark.bouss_bubble_mol @@ -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 diff --git a/test_no_eb_2d/benchmark.bouss_bubble_plm b/test_no_eb_2d/benchmark.bouss_bubble_plm index 46991a3f7..b2f0c8827 100644 --- a/test_no_eb_2d/benchmark.bouss_bubble_plm +++ b/test_no_eb_2d/benchmark.bouss_bubble_plm @@ -35,8 +35,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 diff --git a/test_no_eb_2d/benchmark.burggraf b/test_no_eb_2d/benchmark.burggraf index 2f3203043..7547f2b1e 100644 --- a/test_no_eb_2d/benchmark.burggraf +++ b/test_no_eb_2d/benchmark.burggraf @@ -71,6 +71,4 @@ incflo.verbose = 1 # incflo_level mac_proj.verbose = 0 # MAC Projector nodal_proj.verbose = 0 # Nodal Projector -amr.plt_ccse_regtest = 1 -amr.plt_error_u = 1 -amr.plt_error_v = 1 +amr.plotVariables = velx vely gpx gpy density tracer error_u error_v diff --git a/test_no_eb_2d/benchmark.double_shear_layer b/test_no_eb_2d/benchmark.double_shear_layer index 45677b852..7723354e1 100644 --- a/test_no_eb_2d/benchmark.double_shear_layer +++ b/test_no_eb_2d/benchmark.double_shear_layer @@ -24,9 +24,6 @@ geometry.is_periodic = 1 1 # Periodicity x y z (0/1) incflo.probtype = 21 incflo.constant_density = true -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 - incflo.advection_type = "Godunov" incflo.diffusion_type = 1 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_2d/benchmark.rayleigh_taylor b/test_no_eb_2d/benchmark.rayleigh_taylor index 5e79b3a74..0715332c7 100644 --- a/test_no_eb_2d/benchmark.rayleigh_taylor +++ b/test_no_eb_2d/benchmark.rayleigh_taylor @@ -31,8 +31,7 @@ incflo.gravity = 0. -0.1 incflo.gradrhoerr = 0.1 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely gpx gpy density tracer vort incflo.advection_type = "Godunov" diff --git a/test_no_eb_3d/benchmark.bouss_bubble_god b/test_no_eb_3d/benchmark.bouss_bubble_god index 002e997f5..f68e47f3d 100644 --- a/test_no_eb_3d/benchmark.bouss_bubble_god +++ b/test_no_eb_3d/benchmark.bouss_bubble_god @@ -33,8 +33,7 @@ zhi.type = "sw" incflo.gradrhoerr = 0.1 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely velz gpx gpy gpz density tracer vort incflo.advect_tracer = true incflo.diffusion_type = 2 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.bouss_bubble_mol b/test_no_eb_3d/benchmark.bouss_bubble_mol index a822b96cf..3497cd00e 100644 --- a/test_no_eb_3d/benchmark.bouss_bubble_mol +++ b/test_no_eb_3d/benchmark.bouss_bubble_mol @@ -31,8 +31,7 @@ zhi.type = "sw" incflo.gradrhoerr = 0.1 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely velz gpx gpy gpz density tracer vort incflo.advect_tracer = true incflo.diffusion_type = 2 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.bouss_bubble_plm b/test_no_eb_3d/benchmark.bouss_bubble_plm index 604db8a94..a5c1a04ed 100644 --- a/test_no_eb_3d/benchmark.bouss_bubble_plm +++ b/test_no_eb_3d/benchmark.bouss_bubble_plm @@ -35,8 +35,7 @@ zhi.type = "sw" incflo.gradrhoerr = 0.1 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely velz gpx gpy gpz density tracer vort incflo.advect_tracer = true incflo.diffusion_type = 2 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.burggraf b/test_no_eb_3d/benchmark.burggraf index 2d8f390e4..137990f17 100644 --- a/test_no_eb_3d/benchmark.burggraf +++ b/test_no_eb_3d/benchmark.burggraf @@ -72,6 +72,4 @@ incflo.verbose = 1 # incflo_level mac_proj.verbose = 0 # MAC Projector nodal_proj.verbose = 0 # Nodal Projector -amr.plt_ccse_regtest = 1 -amr.plt_error_u = 1 -amr.plt_error_v = 1 +amr.plotVariables = velx vely velz gpx gpy gpz density tracer error_u error_v diff --git a/test_no_eb_3d/benchmark.double_shear_layer_x b/test_no_eb_3d/benchmark.double_shear_layer_x index 4b639786f..a60249415 100644 --- a/test_no_eb_3d/benchmark.double_shear_layer_x +++ b/test_no_eb_3d/benchmark.double_shear_layer_x @@ -24,8 +24,7 @@ geometry.is_periodic = 1 1 1 # Periodicity x y z (0/1) incflo.probtype = 21 incflo.constant_density = true -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely gpx gpy density tracer magvel vort incflo.advection_type = "Godunov" incflo.diffusion_type = 1 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.double_shear_layer_y b/test_no_eb_3d/benchmark.double_shear_layer_y index 3a19cbd5f..51e9fabab 100644 --- a/test_no_eb_3d/benchmark.double_shear_layer_y +++ b/test_no_eb_3d/benchmark.double_shear_layer_y @@ -23,9 +23,6 @@ geometry.is_periodic = 1 1 1 # Periodicity x y z (0/1) incflo.probtype = 22 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 - incflo.advection_type = "Godunov" incflo.diffusion_type = 1 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.double_shear_layer_z b/test_no_eb_3d/benchmark.double_shear_layer_z index cda2daf1c..491b681d7 100644 --- a/test_no_eb_3d/benchmark.double_shear_layer_z +++ b/test_no_eb_3d/benchmark.double_shear_layer_z @@ -23,9 +23,6 @@ geometry.is_periodic = 1 1 1 # Periodicity x y z (0/1) incflo.probtype = 23 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 - incflo.advection_type = "Godunov" incflo.diffusion_type = 1 # 0 = Explicit, 1 = Crank-Nicolson, 2 = Implicit diff --git a/test_no_eb_3d/benchmark.rayleigh_taylor b/test_no_eb_3d/benchmark.rayleigh_taylor index d465621ed..308da738c 100644 --- a/test_no_eb_3d/benchmark.rayleigh_taylor +++ b/test_no_eb_3d/benchmark.rayleigh_taylor @@ -31,8 +31,7 @@ incflo.gravity = 0. 0. -0.1 incflo.gradrhoerr = 0.1 -amr.plt_ccse_regtest = 1 -amr.plt_vort = 1 +amr.plotVariables = velx vely velz gpx gpy gpz density tracer vort incflo.advection_type = "Godunov"