XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
simpleFOM.hpp
Go to the documentation of this file.
1 #ifndef SIMPLEFOM_HPP
2 #define SIMPLEFOM_HPP
3 
4 #include <iostream>
5 #include "plasma.hpp"
6 #include "globals.hpp"
7 #include "timer_macro.hpp"
8 
9 // Simple performance figure-of-merit (FOM)
10 
11 template <class DeviceType>
13 {
14  double loop_time = 0;
15  GPTLget_wallclock("MAIN_LOOP", -1, &loop_time);
16  double total_ptl = 0;
18  total_ptl += species.get_total_n_ptl();
20 
21  if (is_rank_zero()) {
22  std::cout << "SimpleFOM = 1/(loop_time/(total_ptl * sml.mstep)) = 1/(" << loop_time << "/(" << total_ptl << " * " << sml.mstep << ")) = "
23  << 1.0/(loop_time/(total_ptl * sml.mstep)) << std::endl;
24  }
25 
26  return;
27 }
28 
29 #endif
bool is_rank_zero()
Definition: globals.hpp:27
Definition: sml.hpp:8
subroutine plasma(grid, itr, p, dene_out, deni_out, Te_out, Ti_out, Vparai_out)
Calculate the plasma density, temperature, and parallel velocity for a point in triangle itr using pl...
Definition: neutral_totalf.F90:1224
Definition: plasma.hpp:107
void simpleFOM(Plasma &plasma, DomainDecomposition< DeviceType > &pol_decomp, Simulation< DeviceType > &sml)
Definition: simpleFOM.hpp:12
void for_all_nonadiabatic_species(F func, DevicePtlOpt device_ptl_opt=UseDevicePtl)
Definition: plasma.hpp:126
long long int get_total_n_ptl()
Definition: species.hpp:693
int mstep
Max number of time steps.
Definition: sml.hpp:61
Definition: plasma.hpp:13
Definition: species.hpp:75