Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/recycling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <bout/utils.hxx> // for trim, strsplit

#include <algorithm>
#include <cmath>

using bout::globals::mesh;

Expand Down Expand Up @@ -54,8 +55,9 @@ Recycling::Recycling(std::string name, Options& alloptions, Solver*)
for (const auto& species : species_list) {
std::string from = trim(species, " \t\r()"); // The species name in the list

if (from.empty())
if (from.empty()) {
continue; // Missing
}

// Get the options for this species
Options& from_options = alloptions[from];
Expand Down Expand Up @@ -272,7 +274,7 @@ void Recycling::transform_impl(GuardedOptions& state) {
BoutReal tisheath = (T[i] + T[ig]) * 0.5;
BoutReal visheath = (V[i] + V[ig]) * 0.5;
BoutReal sheath_ion_heat_flow =
abs(gamma_i * nisheath * tisheath * visheath * daparsheath / volume);
std::abs(gamma_i * nisheath * tisheath * visheath * daparsheath / volume);

// Blend fast (ion energy) and thermal (constant energy) recycling
// Calculate returning neutral heat flow in [W]
Expand Down Expand Up @@ -366,7 +368,7 @@ void Recycling::transform_impl(GuardedOptions& state) {
BoutReal tisheath = (T[i] + T[ig]) * 0.5;
BoutReal visheath = (V[i] + V[ig]) * 0.5;
BoutReal sheath_ion_heat_flow =
abs(gamma_i * nisheath * tisheath * visheath * daparsheath / volume);
std::abs(gamma_i * nisheath * tisheath * visheath * daparsheath / volume);

// Blend fast (ion energy) and thermal (constant energy) recycling
// Calculate returning neutral heat flow in [W]
Expand Down
Loading