![]() |
Gowdy solver
|
00001 /** 00002 * @file bimetricModel.h 00003 * @brief Implements the parameters which define bimetric models. 00004 * @author Mikica Kocic 00005 * @copyright GNU General Public License (GPLv3). 00006 */ 00007 00008 ///////////////////////////////////////////////////////////////////////////////////////// 00009 /** @defgroup g2 The bimetric model */ 00010 ///////////////////////////////////////////////////////////////////////////////////////// 00011 /*@{*/ 00012 #ifndef V_SIGN 00013 #define V_SIGN - //!< V_SIGN should be defined either empty or `-`. 00014 #endif 00015 00016 /** A structure that holds parameters which define a specific bimetric model. 00017 */ 00018 struct BimetricModel 00019 { 00020 Real k_g; //!< kappa_g parameter 00021 Real k_f; //!< kappa_f parameter 00022 Real b_0; //!< beta_0 parameter 00023 Real b_1; //!< beta_1 parameter 00024 Real b_2; //!< beta_2 parameter 00025 Real b_3; //!< beta_3 parameter 00026 Real b_4; //!< beta_4 parameter 00027 00028 /** Constructs the bimetric model based on values from the parameter file. 00029 */ 00030 BimetricModel( Parameters& params ) 00031 { 00032 params.get( "model.k_g", k_g, 1.0 ); 00033 params.get( "model.k_f", k_f, 1.0 ); 00034 params.get( "model.b_0", b_0, 0.0 ); 00035 params.get( "model.b_1", b_1, 0.0 ); 00036 params.get( "model.b_2", b_2, 0.0 ); 00037 params.get( "model.b_3", b_3, 0.0 ); 00038 params.get( "model.b_4", b_4, 0.0 ); 00039 00040 slog << "Bimetric Model: " << std::endl << std::endl 00041 << " k_g = " << k_g << ", k_f = " << k_f 00042 << ", b_0 = " << b_0 << ", b_1 = " << b_1 00043 << ", b_2 = " << b_2 << ", b_3 = " << b_3 00044 << ", b_4 = " << b_4 << std::endl << std::endl; 00045 } 00046 00047 /** Returns true if the bimetric model comprises two decoupled GR sectors. 00048 */ 00049 bool isGR () 00050 { 00051 return b_1 == 0 && b_2 == 0 && b_3 == 0; 00052 } 00053 00054 ///////////////////////////////////////////////////////////////////////////////////// 00055 /** @defgroup g3 Shifted elementary symmetric polynomials */ 00056 ///////////////////////////////////////////////////////////////////////////////////// 00057 /*@{*/ 00058 inline Real P_0_0( Real R ) { return V_SIGN b_0; } 00059 inline Real P_0_1( Real R ) { return V_SIGN b_1; } 00060 inline Real P_0_2( Real R ) { return V_SIGN b_2; } 00061 inline Real P_0_3( Real R ) { return V_SIGN b_3; } 00062 inline Real P_0_4( Real R ) { return V_SIGN b_4; } 00063 00064 inline Real P_1_0( Real R ) { return V_SIGN ( b_0 + b_1 * R ); } 00065 inline Real P_1_1( Real R ) { return V_SIGN ( b_1 + b_2 * R ); } 00066 inline Real P_1_2( Real R ) { return V_SIGN ( b_2 + b_3 * R ); } 00067 inline Real P_1_3( Real R ) { return V_SIGN ( b_3 + b_4 * R ); } 00068 00069 inline Real P_2_0( Real R ) { return V_SIGN ( b_0 + ( 2 * b_1 + b_2 * R ) * R ); } 00070 inline Real P_2_1( Real R ) { return V_SIGN ( b_1 + ( 2 * b_2 + b_3 * R ) * R ); } 00071 inline Real P_2_2( Real R ) { return V_SIGN ( b_2 + ( 2 * b_3 + b_4 * R ) * R ); } 00072 }; 00073 /*@}*/ 00074 /////////////////////////////////////////////////////////////////////////////////////////