![]() |
Gowdy solver
|
00001 /** 00002 * @file gridFunctions.h 00003 * @brief Contains definitions of the variables that are tracked on a grid point. 00004 * @author Mikica Kocic 00005 * @copyright GNU General Public License (GPLv3). 00006 * 00007 * Here we configure the grid functions we are dealing with on a grid point. 00008 * The customization should be done in the @ref fld namespace below. 00009 * 00010 * @copydoc newgf 00011 * 00012 * @page newgf Adding new grid functions 00013 * @par 00014 * A **grid function** is a discretization of a variable (a "field") which is defined 00015 * on every point of a given grid. Examples are the components of the metric tensor 00016 * in GR, or the rest-mass density of a fluid which is defined in all cells 00017 * within a given domain. 00018 * 00019 * ## Instructions to add a new grid function for the field *gf* ## 00020 * 00021 * - add the identifier **gf** to an enumeration in the @ref fld namespace 00022 * 00023 * - (optionally) add **gf** to a list passed to GridInitialData::gridFunction() 00024 * 00025 * - (optionally) add **gf** to a list passed to GridOutputWriter::gridFunction() 00026 * 00027 * - (optionally) add **gf** to a list passed to MoLIntegrator::keepConstant() 00028 * or to MoLIntegrator::keepEvolved() 00029 * 00030 * - to be able to access **gf**'s values using **gf(m,n)**, add @ref emitField(gf) 00031 * inside the declaration. 00032 * 00033 * You will also need to: 00034 * 00035 * - (optionally) add @ref emitDerivative_r(gf) and/or @ref emitDerivative_rr(gf) 00036 * (in case you need the spatial derivatives of the field). 00037 * 00038 * - (optionally) define the RHS of the evolution equation `Real eq_gf_t( Int m, Int n )` 00039 * and then assign the RHS to **gf_t** in BimetricEvolve::integStep_Prepare. 00040 * 00041 * - setup the behavior of 'gf' at boundaries in the @ref IntegFace interface methods 00042 * IntegFace::applyLeftBoundaryCondition and IntegFace::applyRightBoundaryCondition. 00043 */ 00044 00045 #include <vector> 00046 00047 ///////////////////////////////////////////////////////////////////////////////////////// 00048 /** @defgroup g4 Grid driver */ 00049 ///////////////////////////////////////////////////////////////////////////////////////// 00050 /*@{*/ 00051 /** @namespace fld Contains the localized variable names for all known grid functions. 00052 */ 00053 namespace fld 00054 { 00055 /** Identifiers of all known grid functions (the variables or fields on a grid). 00056 * 00057 * We distinguish: 00058 * 00059 * - variables involved in time (these must also have the evolution RHS `*_t`), 00060 * 00061 * - derived/temporary variables that store intermediate values, e.g., `R = fB/gB` 00062 * 00063 * - purely output variables used for analysis and diagnostics, e.g., `gHorz`. 00064 */ 00065 enum sysIndex 00066 { 00067 t = 0, r, //!< Coordinates 00068 sysLast //!< Used as the size marker 00069 #define GFCNT fld::sysLast 00070 }; 00071 00072 /** A pair of two grid functions where the first is evolved in time by the other. 00073 */ 00074 struct EvolvedBy { Int f; Int f_t; }; 00075 } 00076 /*@}*/ 00077 /////////////////////////////////////////////////////////////////////////////////////////