![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
00001 /* 00002 Copyright (C) 2010,2011,2012,2013 The ESPResSo project 00003 Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 00004 Max-Planck-Institute for Polymer Research, Theory Group 00005 00006 This file is part of ESPResSo. 00007 00008 ESPResSo is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 ESPResSo is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 #ifndef GLOBAL_H 00022 #define GLOBAL_H 00023 /** \file global.h This file contains the code for access to globally 00024 defined variables using the script command setmd. Please refer to 00025 the Developer's guide, section "Adding global variables", for 00026 details on how to add new variables in the interpreter's 00027 space. */ 00028 00029 /********************************************** 00030 * description of global variables 00031 * add any variable that should be handled 00032 * automatically in global.c. This includes 00033 * distribution to other nodes and 00034 * read/user-defined access from Tcl. 00035 **********************************************/ 00036 00037 /** Field is of type integer in \ref Datafield. */ 00038 #define TYPE_INT 0 00039 /** Field is of type double in \ref Datafield. */ 00040 #define TYPE_DOUBLE 1 00041 /** Field is of type bool, i.e. bit array, in \ref Datafield. 00042 Note that the field is stored in whatever an integer is. 00043 I guess you can at least assume 16 bits... 00044 */ 00045 #define TYPE_BOOL 2 00046 00047 /** Maximal size of an array in \ref Datafield. */ 00048 #define MAX_DIMENSION 64 00049 00050 /** Type describing global variables. These are accessible from the 00051 front end, and are distributed to all compute nodes. */ 00052 typedef struct { 00053 /** Physical address of the variable. */ 00054 void *data; 00055 /** Type of the variable, either \ref TYPE_INT or \ref TYPE_DOUBLE.*/ 00056 int type; 00057 /** Dimension of the variable. Limited to \ref MAX_DIMENSION */ 00058 int dimension; 00059 /** Name of the variable, mainly used for the front end and debugging */ 00060 const char *name; 00061 /** Minimal number of characters needed for unique identification of the 00062 variable. */ 00063 int min_length; 00064 } Datafield; 00065 00066 /** This array contains the description of all global variables that 00067 are synchronized across nodes and that can be changed/adressed via 00068 the TCL command setmd. read the documentation of \ref Datafield 00069 befor you add new features. */ 00070 extern const Datafield fields[]; 00071 00072 /** \name Field Enumeration 00073 These numbers identify the variables given in 00074 \ref #fields for use with \ref mpi_bcast_parameter. 00075 */ 00076 /*@{*/ 00077 /** index of \ref box_l in \ref #fields */ 00078 #define FIELD_BOXL 0 00079 /** index of \ref DomainDecomposition::cell_grid in \ref #fields */ 00080 #define FIELD_CELLGRID 1 00081 /** index of \ref DomainDecomposition::cell_size in \ref #fields */ 00082 #define FIELD_CELLSIZE 2 00083 /** index of \ref dpd_gamma in \ref #fields */ 00084 #define FIELD_DPD_GAMMA 3 00085 /** index of \ref dpd_r_cut in \ref #fields */ 00086 #define FIELD_DPD_RCUT 4 00087 /** index of \ref langevin_gamma in \ref #fields */ 00088 #define FIELD_LANGEVIN_GAMMA 5 00089 /** index of \ref integ_switch in \ref #fields */ 00090 #define FIELD_INTEG_SWITCH 6 00091 /** index of \ref local_box_l in \ref #fields */ 00092 #define FIELD_LBOXL 7 00093 /** index of \ref max_cut in \ref #fields */ 00094 #define FIELD_MCUT 8 00095 /** index of \ref max_num_cells in \ref #fields */ 00096 #define FIELD_MAXNUMCELLS 9 00097 /** index of \ref max_seen_particle in \ref #fields */ 00098 #define FIELD_MAXPART 10 00099 /** index of \ref max_range in \ref #fields */ 00100 #define FIELD_MAXRANGE 11 00101 /** index of \ref max_skin in \ref #fields */ 00102 #define FIELD_MAXSKIN 12 00103 /** index of \ref min_num_cells in \ref #fields */ 00104 #define FIELD_MINNUMCELLS 13 00105 /** index of \ref n_layers in \ref #fields */ 00106 #define FIELD_NLAYERS 14 00107 /** index of \ref n_nodes in \ref #fields */ 00108 #define FIELD_NNODES 15 00109 /** index of \ref n_total_particles in \ref #fields */ 00110 #define FIELD_NPART 16 00111 /** index of \ref n_particle_types in \ref #fields */ 00112 #define FIELD_NPARTTYPE 17 00113 /** index of \ref n_rigidbonds in \ref #fields */ 00114 #define FIELD_RIGIDBONDS 18 00115 /** index of \ref node_grid in \ref #fields */ 00116 #define FIELD_NODEGRID 19 00117 /** index of \ref nptiso_gamma0 in \ref #fields */ 00118 #define FIELD_NPTISO_G0 20 00119 /** index of \ref nptiso_gammav in \ref #fields */ 00120 #define FIELD_NPTISO_GV 21 00121 /** index of \ref nptiso_struct::p_ext in \ref #fields */ 00122 #define FIELD_NPTISO_PEXT 22 00123 /** index of \ref nptiso_struct::p_inst in \ref #fields */ 00124 #define FIELD_NPTISO_PINST 23 00125 /** index of \ref nptiso_struct::p_inst_av in \ref #fields */ 00126 #define FIELD_NPTISO_PINSTAV 24 00127 /** index of \ref nptiso_struct::p_diff in \ref #fields */ 00128 #define FIELD_NPTISO_PDIFF 25 00129 /** index of \ref nptiso_struct::piston in \ref #fields */ 00130 #define FIELD_NPTISO_PISTON 26 00131 /** index of \ref #periodic in \ref #fields */ 00132 #define FIELD_PERIODIC 27 00133 /** index of \ref #skin in \ref #fields */ 00134 #define FIELD_SKIN 28 00135 /** index of \ref #temperature in \ref #fields */ 00136 #define FIELD_TEMPERATURE 29 00137 /** index of \ref thermo_switch in \ref #fields */ 00138 #define FIELD_THERMO_SWITCH 30 00139 /** index of \ref sim_time in \ref #fields */ 00140 #define FIELD_SIMTIME 31 00141 /** index of \ref time_step in \ref #fields */ 00142 #define FIELD_TIMESTEP 32 00143 /** index of \ref timing_samples in \ref #fields */ 00144 #define FIELD_TIMINGSAMP 33 00145 /** index of \ref transfer_rate in \ref #fields */ 00146 #define FIELD_TRANSFERRATE 34 00147 /** index of \ref max_cut_nonbonded in \ref #fields */ 00148 #define FIELD_MCUT_NONBONDED 35 00149 /** index of \ref verlet_reuse in \ref #fields */ 00150 #define FIELD_VERLETREUSE 36 00151 /** index of \ref lattice_switch in \ref #fields */ 00152 #define FIELD_LATTICE_SWITCH 37 00153 /** index of \ref dpd_tgamma in \ref #fields */ 00154 #define FIELD_DPD_TGAMMA 38 00155 /** index of \ref dpd_tr_cut in \ref #fields */ 00156 #define FIELD_DPD_TRCUT 39 00157 /** index of \ref dpd_twf in \ref #fields */ 00158 #define FIELD_DPD_TWF 40 00159 /** index of \ref dpd_wf in \ref #fields */ 00160 #define FIELD_DPD_WF 41 00161 /** index of address variable in \ref #fields */ 00162 #define FIELD_ADRESS 42 00163 /** index of \ref max_cut_bonded in \ref #fields */ 00164 #define FIELD_MCUT_BONDED 43 00165 /** index of \ref transfer_rate in \ref #fields */ 00166 #define FIELD_TRANSFER_RATE 44 00167 /** index of \ref min_global_cut in \ref #fields */ 00168 #define FIELD_MIN_GLOBAL_CUT 45 00169 /** index of \ref ghmc_nmd in \ref #fields */ 00170 #define FIELD_GHMC_NMD 46 00171 /** index of \ref ghmc_phi in \ref #fields */ 00172 #define FIELD_GHMC_PHI 47 00173 /** index of \ref ghmc_phi in \ref #fields */ 00174 #define FIELD_GHMC_RES 48 00175 /** index of \ref ghmc_phi in \ref #fields */ 00176 #define FIELD_GHMC_FLIP 49 00177 /** index of \ref ghmc_phi in \ref #fields */ 00178 #define FIELD_GHMC_SCALE 50 00179 /*@}*/ 00180 00181 #endif
1.7.5.1