Skip to content

Commit

Permalink
Change flow diagnostic names to new system
Browse files Browse the repository at this point in the history
Now more consistent with other variables names
  • Loading branch information
mikekryjak committed Sep 11, 2024
1 parent ad7649e commit ac9210b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/evolve_density.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void EvolveDensity::outputVars(Options& state) {
auto rho_s0 = get<BoutReal>(state["rho_s0"]);

if (flow_xlow.isAllocated()) {
set_with_attrs(state[std::string("ParticleFlow_") + name + std::string("_xlow")], flow_xlow,
set_with_attrs(state[fmt::format("pf{}_tot_xlow", name)], flow_xlow,
{{"time_dimension", "t"},
{"units", "s^-1"},
{"conversion", rho_s0 * SQ(rho_s0) * Nnorm * Omega_ci},
Expand All @@ -367,7 +367,7 @@ void EvolveDensity::outputVars(Options& state) {
{"source", "evolve_density"}});
}
if (flow_ylow.isAllocated()) {
set_with_attrs(state[std::string("ParticleFlow_") + name + std::string("_ylow")], flow_ylow,
set_with_attrs(state[fmt::format("pf{}_tot_ylow", name)], flow_ylow,
{{"time_dimension", "t"},
{"units", "s^-1"},
{"conversion", rho_s0 * SQ(rho_s0) * Nnorm * Omega_ci},
Expand Down
4 changes: 2 additions & 2 deletions src/evolve_energy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void EvolveEnergy::outputVars(Options& state) {
{"source", "evolve_energy"}});

if (flow_xlow.isAllocated()) {
set_with_attrs(state[std::string("EnergyFlow_") + name + std::string("_xlow")], flow_xlow,
set_with_attrs(state[fmt::format("ef{}_tot_xlow", name)], flow_xlow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand All @@ -485,7 +485,7 @@ void EvolveEnergy::outputVars(Options& state) {
{"source", "evolve_energy"}});
}
if (flow_ylow.isAllocated()) {
set_with_attrs(state[std::string("EnergyFlow_") + name + std::string("_ylow")], flow_ylow,
set_with_attrs(state[fmt::format("ef{}_tot_ylow", name)], flow_ylow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand Down
4 changes: 2 additions & 2 deletions src/evolve_momentum.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void EvolveMomentum::outputVars(Options &state) {
auto rho_s0 = get<BoutReal>(state["rho_s0"]);

if (flow_xlow.isAllocated()) {
set_with_attrs(state[std::string("MomentumFlow_") + name + std::string("_xlow")], flow_xlow,
set_with_attrs(state[fmt::format("mf{}_tot_xlow", name)], flow_xlow,
{{"time_dimension", "t"},
{"units", "N"},
{"conversion", rho_s0 * SQ(rho_s0) * SI::Mp * Nnorm * Cs0 * Omega_ci},
Expand All @@ -299,7 +299,7 @@ void EvolveMomentum::outputVars(Options &state) {
{"source", "evolve_momentum"}});
}
if (flow_ylow.isAllocated()) {
set_with_attrs(state[std::string("MomentumFlow_") + name + std::string("_ylow")], flow_ylow,
set_with_attrs(state[fmt::format("mf{}_tot_ylow", name)], flow_ylow,
{{"time_dimension", "t"},
{"units", "N"},
{"conversion", rho_s0 * SQ(rho_s0) * SI::Mp * Nnorm * Cs0 * Omega_ci},
Expand Down
8 changes: 4 additions & 4 deletions src/evolve_pressure.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ void EvolvePressure::outputVars(Options& state) {
{"source", "evolve_pressure"}});

if (flow_xlow.isAllocated()) {
set_with_attrs(state[std::string("EnergyFlow_") + name + std::string("_xlow")], flow_xlow,
set_with_attrs(state[fmt::format("ef{}_tot_xlow", name)], flow_xlow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand All @@ -530,7 +530,7 @@ void EvolvePressure::outputVars(Options& state) {
{"source", "evolve_pressure"}});
}
if (flow_ylow.isAllocated()) {
set_with_attrs(state[std::string("EnergyFlow_") + name + std::string("_ylow")], flow_ylow,
set_with_attrs(state[fmt::format("ef{}_tot_ylow", name)], flow_ylow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand All @@ -539,7 +539,7 @@ void EvolvePressure::outputVars(Options& state) {
{"species", name},
{"source", "evolve_pressure"}});

set_with_attrs(state[std::string("ConductionFlow_") + name + std::string("_ylow")], flow_ylow_conduction,
set_with_attrs(state[fmt::format("ef{}_cond_ylow", name)], flow_ylow_conduction,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand All @@ -548,7 +548,7 @@ void EvolvePressure::outputVars(Options& state) {
{"species", name},
{"source", "evolve_pressure"}});

set_with_attrs(state[std::string("KineticFlow_") + name + std::string("_ylow")], flow_ylow_kinetic,
set_with_attrs(state[fmt::format("ef{}_kin_ylow", name)], flow_ylow_kinetic,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
Expand Down

0 comments on commit ac9210b

Please sign in to comment.