2#include "AMReX_Interp_3D_C.H"
3#include "AMReX_PlotFileUtil.H"
7template<
typename V,
typename T>
9 return std::find(iterable.begin(), iterable.end(), query) != iterable.end();
20 if (pp.contains(
"plot_vars")) {
21 amrex::Abort(
"You must use plot_vars_3d rather than plot_vars");
24 if (pp.contains(pp_plot_var_names_3d.c_str()))
28 int nPltVars = pp.countval(pp_plot_var_names_3d.c_str());
30 for (
int i = 0; i < nPltVars; i++)
32 pp.get(pp_plot_var_names_3d.c_str(), nm, i);
49 Vector<std::string> tmp_plot_names;
51 for (
int i = 0; i <
ncons; ++i) {
61 tmp_plot_names.push_back(
"x_velocity");
62 tmp_plot_names.push_back(
"y_velocity");
63 tmp_plot_names.push_back(
"z_velocity");
70 tmp_plot_names.push_back(
"x_cc");
71 tmp_plot_names.push_back(
"y_cc");
72 tmp_plot_names.push_back(
"z_cc");
81#ifdef REMORA_USE_PARTICLES
82 const auto& particles_namelist( particleData.getNamesUnalloc() );
83 for (
auto it = particles_namelist.cbegin(); it != particles_namelist.cend(); ++it) {
84 std::string tmp( (*it)+
"_count" );
86 tmp_plot_names.push_back(tmp);
94 Warning(
"\nWARNING: Requested to plot variable '" + plot_name +
"' in 3D list but it is not available");
108 if (pp.contains(pp_plot_var_names_2d.c_str()))
112 int nPltVars = pp.countval(pp_plot_var_names_2d.c_str());
114 for (
int i = 0; i < nPltVars; i++)
116 pp.get(pp_plot_var_names_2d.c_str(), nm, i);
137 for (
int n = 0; n <
ncons; ++n) {
138 const std::string nm = std::string(
"diff2_") +
cons_names[n];
145 Vector<std::string> tmp_plot_names;
165 tmp_plot_names.push_back(
"visc2");
167 for (
int n = 0; n <
ncons; ++n) {
168 const std::string nm = std::string(
"diff2_") +
cons_names[n];
170 tmp_plot_names.push_back(nm);
177 Warning(
"\nWARNING: Requested to plot variable '" + plot_name +
"' in 2D list but it is not available");
191 if (pp.contains(
"plot_vars")) {
192 amrex::Abort(
"You must use plot_vars_3d rather than plot_vars");
195 if (pp.contains(pp_plot_var_names_3d.c_str())) {
197 int nPltVars = pp.countval(pp_plot_var_names_3d.c_str());
198 for (
int i = 0; i < nPltVars; i++) {
199 pp.get(pp_plot_var_names_3d.c_str(), nm, i);
208 Vector<std::string> tmp_plot_names(0);
209#ifdef REMORA_USE_PARTICLES
210 Vector<std::string> particle_mesh_plot_names;
211 particleData.GetMeshPlotVarNames( particle_mesh_plot_names );
212 for (
int i = 0; i < particle_mesh_plot_names.size(); i++) {
213 std::string tmp(particle_mesh_plot_names[i]);
215 tmp_plot_names.push_back(tmp);
220 for (
int i = 0; i < tmp_plot_names.size(); i++) {
233 if (pp.contains(pp_plot_var_names_2d.c_str())) {
235 int nPltVars = pp.countval(pp_plot_var_names_2d.c_str());
236 for (
int i = 0; i < nPltVars; i++) {
237 pp.get(pp_plot_var_names_2d.c_str(), nm, i);
246 Vector<std::string> tmp_plot_names(0);
247#ifdef REMORA_USE_PARTICLES
248 Vector<std::string> particle_mesh_plot_names;
249 particleData.GetMeshPlotVarNames( particle_mesh_plot_names );
250 for (
int i = 0; i < particle_mesh_plot_names.size(); i++) {
251 std::string tmp(particle_mesh_plot_names[i]);
253 tmp_plot_names.push_back(tmp);
258 for (
int i = 0; i < tmp_plot_names.size(); i++) {
bool containerHasElement(const V &iterable, const T &query)
bool containerHasElement(const V &iterable, const T &query)
int ncons
Number of conserved scalars in the state (temperature + salt + passive scalars)
amrex::Vector< std::string > cons_names
Names of scalars for plotfile output.
void set2DPlotVariables(const std::string &pp_plot_var_names_2d)
void set3DPlotVariables(const std::string &pp_plot_var_names_3d)
std::string pp_prefix
default prefix for input file parameters
static SolverChoice solverChoice
Container for algorithmic choices.
void append3DPlotVariables(const std::string &pp_plot_var_names_3d)
amrex::Vector< std::string > plot_var_names_3d
Names of 3D variables to output to AMReX plotfile.
amrex::Vector< std::string > plot_var_names_2d
Names of 2D variables to output to AMReX plotfile.
const amrex::Vector< std::string > derived_names
Names of derived fields for plotfiles.
void append2DPlotVariables(const std::string &pp_plot_var_names_2d)
HorizMixingType horiz_mixing_type