-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathnonthermal.h
More file actions
36 lines (31 loc) · 1.65 KB
/
nonthermal.h
File metadata and controls
36 lines (31 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef NONTHERMAL_H
#define NONTHERMAL_H
#include <cstddef>
#include <cstdio>
#include "constants.h"
#include "packet.h"
#include "thermalbalance.h"
namespace nonthermal {
void init();
void close_file();
void solve_spencerfano(int nonemptymgi, int timestep, int iteration);
[[nodiscard]] DEVICE_FUNC auto nt_ionisation_ratecoeff(int nonemptymgi, int element, int ion) -> double;
[[nodiscard]] DEVICE_FUNC auto nt_ionisation_upperion_probability(int nonemptymgi, int element, int lowerion,
int upperion, bool energyweighted) -> double;
[[nodiscard]] DEVICE_FUNC auto nt_ionisation_maxupperion(int element, int lowerion) -> int;
[[nodiscard]] DEVICE_FUNC auto nt_random_upperion(int nonemptymgi, int element, int lowerion, bool energyweighted)
-> int;
void calculate_deposition_rate_density(int nonemptymgi, int timestep, HeatingCoolingRates& heatingcoolingrates);
[[nodiscard]] DEVICE_FUNC auto get_deposition_rate_density(int nonemptymgi) -> double;
[[nodiscard]] auto get_nt_frac_heating(int nonemptymgi) -> float;
[[gnu::pure]] [[nodiscard]] DEVICE_FUNC auto nt_excitation_ratecoeff(int nonemptymgi, int lowerlevel, int upperlevel,
int alltransindex) -> double;
DEVICE_FUNC void do_ntalpha_fisprod_deposit(Packet& pkt);
DEVICE_FUNC void do_ntlepton_deposit(Packet& pkt);
void write_restart_data(FILE* gridsave_file);
void read_restart_data(FILE* gridsave_file);
void nt_MPI_Bcast(ptrdiff_t nonemptymgi, int root_node_id);
void reset_stats();
void print_stats(double modelvolume, double deltat);
} // namespace nonthermal
#endif // NONTHERMAL_H