Athena++/Atmosphere
Planetary Atmosphere Simulator
globals.cpp
Go to the documentation of this file.
1 //========================================================================================
2 // Athena++ astrophysical MHD code
3 // Copyright(C) 2014 James M. Stone <jmstone@princeton.edu> and other code contributors
4 // Licensed under the 3-clause BSD License, see LICENSE file for details
5 //========================================================================================
7 // \brief namespace containing global variables.
8 //
9 // Yes, we all know global variables should NEVER be used, but in fact they are ideal for,
10 // e.g., global constants that are set once and never changed. To prevent name collisions
11 // global variables are wrapped in their own namespace.
12 
13 // C headers
14 
15 // C++ headers
16 
17 // Athena++ headers
18 #include "athena.hpp"
19 #include "globals.hpp"
20 
21 namespace Globals {
22 // all of these global variables are set at the start of main():
23 int my_rank; // MPI rank of this process
24 int nranks; // total number of MPI ranks
26 }
int nranks
Definition: globals.cpp:24
int mpi_tag_ub
Definition: globals.cpp:25
int my_rank
Definition: globals.cpp:23