19 return omp_get_max_threads();
38 printf(
"%s",msg.c_str());
51 KOKKOS_INLINE_FUNCTION
void assert_XGC(
bool cond,
const char* msg){
62 if(b==0)
return false;
69 if ( ((b > 0) && (a > INT_MAX - b))
70 ||((b < 0) && (a < INT_MIN - b)) ){
153 template<GeometryType GT>
157 KOKKOS_INLINE_FUNCTION
double geometry_switch<GeometryType::Toroidal>(
double a,
double b){
162 KOKKOS_INLINE_FUNCTION
double geometry_switch<GeometryType::CylindricalLimit>(
double a,
double b){
170 template<GeometryType GT>
174 KOKKOS_INLINE_FUNCTION constexpr
bool use_toroidal_terms<GeometryType::CylindricalLimit>(){
179 KOKKOS_INLINE_FUNCTION constexpr
bool use_toroidal_terms<GeometryType::Toroidal>(){
212 int mod = value % (int)m;
229 long long int obj_per_subset = n_obj/n_subsets;
230 long long int remainder = n_obj%n_subsets;
231 if (i_subset<remainder){
233 return i_subset*obj_per_subset;
235 return i_subset*obj_per_subset + remainder;
249 long long int obj_per_subset = n_obj/n_subsets;
250 long long int remainder = n_obj%n_subsets;
251 if (i_subset<remainder){
254 return obj_per_subset;
259 std::string string_no_leading = std::to_string(input);
261 int initial_length = string_no_leading.length();
262 int zeros_to_add = n_digits - std::min(n_digits, initial_length);
265 return std::string(zeros_to_add,
'0') + string_no_leading;
Definition: globals.hpp:84
Magnetic moment mu.
Definition: globals.hpp:196
KOKKOS_INLINE_FUNCTION int divide_and_round_up(int a, int b)
Definition: globals.hpp:206
constexpr GeometryType GEOMETRY
Definition: globals.hpp:141
bool is_rank_zero()
Definition: globals.hpp:27
MarkerType
Definition: globals.hpp:110
gyroradius
Definition: globals.hpp:189
MPI_Comm SML_COMM_WORLD
Definition: my_mpi.cpp:4
long long int counts_of_even_distribution(long long int n_obj, long long int n_subsets, long long int i_subset)
Definition: globals.hpp:248
#define DEVICE_PRINTF(...)
Definition: space_settings.hpp:85
Definition: globals.hpp:89
W0.
Definition: globals.hpp:197
bool causes_multiplication_overflow(int a, int b)
Definition: globals.hpp:60
Definition: globals.hpp:192
bool global_debug_flag
Definition: checkpoint.cpp:11
Definition: globals.hpp:269
KOKKOS_INLINE_FUNCTION unsigned positive_modulo(int value, unsigned m)
Definition: globals.hpp:211
PhiInterpType
Definition: globals.hpp:95
FAnalyticShape
Definition: globals.hpp:116
r coordinate
Definition: globals.hpp:186
Order
Definition: globals.hpp:77
constexpr PhiInterpType PIT_GLOBAL
Definition: globals.hpp:105
std::string formatted_int2str(int input, int n_digits)
Definition: globals.hpp:258
Definition: globals.hpp:202
Definition: globals.hpp:90
ParticlePhase
Definition: globals.hpp:185
2nd weight
Definition: globals.hpp:191
int SML_COMM_RANK
Definition: my_mpi.cpp:5
KinType
Definition: globals.hpp:88
GeometryType
Definition: globals.hpp:134
KOKKOS_INLINE_FUNCTION double geometry_switch(double a, double b)
Definition: globals.hpp:85
void exit_XGC(std::string msg)
Definition: globals.hpp:37
F0.
Definition: globals.hpp:198
int get_num_cpu_threads()
Definition: globals.hpp:17
phi coordinate
Definition: globals.hpp:188
static constexpr bool val
Definition: globals.hpp:269
KOKKOS_INLINE_FUNCTION constexpr bool use_toroidal_terms()
1st weight
Definition: globals.hpp:190
ParticleConsts
Definition: globals.hpp:195
z coordinate
Definition: globals.hpp:187
long long int offsets_of_even_distribution(long long int n_obj, long long int n_subsets, long long int i_subset)
Definition: globals.hpp:228
WeightEvoEq
Definition: globals.hpp:121
SpeciesType
Definition: globals.hpp:83
constexpr MarkerType MT_GLOBAL
Definition: globals.hpp:129
bool causes_addition_overflow(int a, int b)
Definition: globals.hpp:68
KOKKOS_INLINE_FUNCTION void assert_XGC(bool cond, const char *msg)
Definition: globals.hpp:51