Ко всем библиотекам · PBHCosmo (GRChombo)
grchombo/PBHCosmo/UserVariables.hpp
assign an enum to each variable
38 строк · 1.0 KB · pbhgr @ 9e8e13d · как текст
| /* GRChombo
* Copyright 2012 The GRChombo collaboration.
* Please refer to LICENSE in GRChombo's root directory.
*/
#ifndef USERVARIABLES_HPP
#define USERVARIABLES_HPP
#include "ArrayTools.hpp"
#include "CCZ4UserVariables.hpp"
#include "DiagnosticVariables.hpp"
// assign an enum to each variable
enum
{
// Note that it is important that the first enum value is set to 1 more than
// the last CCZ4 var enum
c_phi = NUM_CCZ4_VARS, // matter field added
c_Pi, //(minus) conjugate momentum
c_fref, // gauge reference profile K_0(x)/K_0(far) (static)
NUM_VARS
};
namespace UserVariables
{
static const std::array<std::string, NUM_VARS - NUM_CCZ4_VARS>
user_variable_names = {"phi", "Pi", "fref"};
static const std::array<std::string, NUM_VARS> variable_names =
ArrayTools::concatenate(ccz4_variable_names, user_variable_names);
} // namespace UserVariables
#include "UserVariables.inc.hpp"
#endif /* USERVARIABLES_HPP */
|