XGCa
 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 extern "C" int get_sml_mype();
10 extern "C" int get_sml_totalpe();
11 
12 // Simple performance figure-of-merit (FOM)
13 
14 template <class DeviceType>
16 {
17  double loop_time = 0;
18  GPTLget_wallclock("MAIN_LOOP", -1, &loop_time);
19  double total_ptl = 0;
21  total_ptl += species.get_total_n_ptl();
23 
24  if (is_rank_zero()) {
25  std::cout << "SimpleFOM = 1/(loop_time/(total_ptl * sml.mstep)) = 1/(" << loop_time << "/(" << total_ptl << " * " << sml.mstep << ")) = "
26  << 1.0/(loop_time/(total_ptl * sml.mstep)) << std::endl;
27  }
28 
29  return;
30 }
31 
32 #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:1235
Definition: plasma.hpp:94
void simpleFOM(Plasma &plasma, DomainDecomposition< DeviceType > &pol_decomp, Simulation< DeviceType > &sml)
Definition: simpleFOM.hpp:15
void for_all_nonadiabatic_species(F func, DevicePtlOpt device_ptl_opt=UseDevicePtl)
Definition: plasma.hpp:113
int get_sml_totalpe()
long long int get_total_n_ptl()
Definition: species.hpp:685
int get_sml_mype()
int mstep
Max number of time steps.
Definition: sml.hpp:57
Definition: plasma.hpp:14
Definition: species.hpp:74