Skip to content

Commit

Permalink
Read name of the ionization species
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Oct 11, 2024
1 parent 7890b50 commit 9b11492
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Source/Particles/Collision/BinaryCollision/DSMC/DSMCFunc.H
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ public:

private:
amrex::Vector<ScatteringProcess> m_scattering_processes;
amrex::Vector<ScatteringProcess> m_ionization_processes;
amrex::Gpu::DeviceVector<ScatteringProcess::Executor> m_scattering_processes_exe;
amrex::Gpu::DeviceVector<ScatteringProcess::Executor> m_ionization_processes_exe;

bool m_isSameSpecies;

Executor m_exe;
Expand Down
19 changes: 18 additions & 1 deletion Source/Particles/Collision/BinaryCollision/DSMC/DSMCFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,24 @@ DSMCFunc::DSMCFunc (
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(process.type() != ScatteringProcessType::INVALID,
"Cannot add an unknown scattering process type");

m_scattering_processes.push_back(std::move(process));
// if the scattering process is ionization get the secondary species
// only one ionization process is supported, the vector
// m_ionization_processes is only used to make it simple to calculate
// the maximum collision frequency with the same function used for
// particle conserving processes
if (process.type() == ScatteringProcessType::IONIZATION) {
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(!ionization_flag,
"Background MCC only supports a single ionization process");
ionization_flag = true;

std::string secondary_species;
pp_collision_name.get("ionization_species", secondary_species);
m_species_names.push_back(secondary_species);

m_ionization_processes.push_back(std::move(process));
} else {
m_scattering_processes.push_back(std::move(process));
}
}

const int process_count = static_cast<int>(m_scattering_processes.size());
Expand Down

0 comments on commit 9b11492

Please sign in to comment.