00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 // /////////////////////////////////////////////////////////////////////////// 00014 // include the usual libraries (works on gcc and VC) 00015 // /////////////////////////////////////////////////////////////////////////// 00016 00017 #include <iostream> 00018 #include <fstream> 00019 #include <cstdio> 00020 #include <cstdlib> 00021 #include <cmath> 00022 #include <cstring> 00023 #include <ctime> 00024 #include <cassert> 00025 #include <typeinfo> 00026 #ifndef OSX 00027 #include <malloc.h> 00028 #endif 00029 #include <string> 00030 #include <vector> 00031 #include <map> 00032 #include <deque> 00033 #include <climits> 00034 #include "glob.h" 00035 #ifndef NO_POSIX 00036 #include <unistd.h> 00037 #include <sys/time.h> 00038 #include <sys/file.h> 00039 #include <sys/types.h> 00040 #include <sys/stat.h> 00041 #include <sys/socket.h> 00042 #include <fcntl.h> 00043 #endif 00044 using namespace std; 00045 #define endl "\n" 00046 00047 // /////////////////////////////////////////////////////////////////////////// 00048 // this file includes the version number 00049 // /////////////////////////////////////////////////////////////////////////// 00050 #include "mdp_version.h" 00051 00052 // /////////////////////////////////////////////////////////////////////////// 00053 // all gobal macros used by MDP 00054 // /////////////////////////////////////////////////////////////////////////// 00055 #include "mdp_macros.h" 00056 00057 // /////////////////////////////////////////////////////////////////////////// 00058 // all global varibales except mdp,mpi and mdp_random 00059 // /////////////////////////////////////////////////////////////////////////// 00060 #include "mdp_global_vars.h" 00061 00062 // /////////////////////////////////////////////////////////////////////////// 00063 // faster dynamic allocation (no excpections) 00064 // /////////////////////////////////////////////////////////////////////////// 00065 #include "mdp_dynalloc.h" 00066 00067 // /////////////////////////////////////////////////////////////////////////// 00068 // function to convert endianess 00069 // /////////////////////////////////////////////////////////////////////////// 00070 #include "mdp_endianess_converter.h" 00071 00072 // /////////////////////////////////////////////////////////////////////////// 00073 // this is the official mdp_timer (replaces JIM_timer since not portable 00074 // /////////////////////////////////////////////////////////////////////////// 00075 #include "mdp_timer.h" 00076 00077 // /////////////////////////////////////////////////////////////////////////// 00078 // mdp implementation of complex numbres (portable ansi) 00079 // /////////////////////////////////////////////////////////////////////////// 00080 #include "mdp_complex.h" 00081 00082 // /////////////////////////////////////////////////////////////////////////// 00083 // integer delta function 00084 // /////////////////////////////////////////////////////////////////////////// 00085 #include "mdp_delta.h" 00086 00087 // /////////////////////////////////////////////////////////////////////////// 00088 // implementation of multidimentional array, better than STL 00089 // (class mdp_array used to be class DynamicArray) 00090 // /////////////////////////////////////////////////////////////////////////// 00091 #include "mdp_array.h" 00092 00093 // /////////////////////////////////////////////////////////////////////////// 00094 // this file includes stuff for sse2 optimization 00095 // /////////////////////////////////////////////////////////////////////////// 00096 #if defined(SSE2) 00097 #include "fermiqcd_sse.h" 00098 #endif 00099 00100 // /////////////////////////////////////////////////////////////////////////// 00101 // implementation of the mdp_matrix object 00102 // (class mdp_matrix is a more general implementation of class mdp_matrix) 00103 // /////////////////////////////////////////////////////////////////////////// 00104 #include "mdp_matrix.h" 00105 00106 // /////////////////////////////////////////////////////////////////////////// 00107 // class for logging (not very developed!) 00108 // /////////////////////////////////////////////////////////////////////////// 00109 #include "mdp_log.h" 00110 00111 // /////////////////////////////////////////////////////////////////////////// 00112 // parallel simulator 00113 // handy for debugging, multithreading and mosix systems 00114 // /////////////////////////////////////////////////////////////////////////// 00115 #ifndef NO_POSIX 00116 #include "mdp_psim.h" 00117 #endif 00118 00119 // /////////////////////////////////////////////////////////////////////////// 00120 // this is a wrapper to Message Passing Interface (is one uses it) 00121 // replace this funcitons to change communication protocol 00122 // /////////////////////////////////////////////////////////////////////////// 00123 #include "mdp_communicator.h" 00124 00125 // /////////////////////////////////////////////////////////////////////////// 00126 // this defined the class mdp_prng and the obj mdp_random 00127 // (attantion that ::SU<T>(int n) only works with gcc, 00128 // VC does not support templates, therefore ::SU(int n) only for float) 00129 // /////////////////////////////////////////////////////////////////////////// 00130 #include "mdp_prng.h" 00131 00132 // /////////////////////////////////////////////////////////////////////////// 00133 // mdp_jackboot is a class for statictical analysis 00134 // /////////////////////////////////////////////////////////////////////////// 00135 #include "mdp_jackboot.h" 00136 00137 // /////////////////////////////////////////////////////////////////////////// 00138 // this is a collection of possible lattice topologies 00139 // /////////////////////////////////////////////////////////////////////////// 00140 #include "mdp_topologies.h" 00141 00142 // /////////////////////////////////////////////////////////////////////////// 00143 // a collection of possible lattice partitionings 00144 // /////////////////////////////////////////////////////////////////////////// 00145 #include "mdp_partitionings.h" 00146 00147 00148 // /////////////////////////////////////////////////////////////////////////// 00149 // implementation of the class mdp_lattice 00150 // (used to ge generic_lattice) 00151 // /////////////////////////////////////////////////////////////////////////// 00152 #include "mdp_lattice.h" 00153 00154 // /////////////////////////////////////////////////////////////////////////// 00155 // implementation of a vector on a lattice (used internally for conversions) 00156 // /////////////////////////////////////////////////////////////////////////// 00157 #include "mdp_vector.h" 00158 00159 // /////////////////////////////////////////////////////////////////////////// 00160 // class mdp_site (used to be site) a point on a lattice 00161 // /////////////////////////////////////////////////////////////////////////// 00162 #include "mdp_site.h" 00163 00164 // /////////////////////////////////////////////////////////////////////////// 00165 // implementation of the class mdp_field<> 00166 // (used to be generic_field<>) 00167 // /////////////////////////////////////////////////////////////////////////// 00168 #include "mdp_field.h" 00169 00170 // /////////////////////////////////////////////////////////////////////////// 00171 // various other utilities 00172 // /////////////////////////////////////////////////////////////////////////// 00173 #include "mdp_utils.h" 00174 #include "mdp_postscript.h" 00175 00176 // /////////////////////////////////////////////////////////////////////////// 00177 // implementation of the communicaton function mdp_field::update() 00178 // /////////////////////////////////////////////////////////////////////////// 00179 #include "mdp_field_update.h" 00180 00181 // /////////////////////////////////////////////////////////////////////////// 00182 // implementation of the I/O function mdp_field::load() 00183 // /////////////////////////////////////////////////////////////////////////// 00184 #include "mdp_field_load.h" 00185 00186 // /////////////////////////////////////////////////////////////////////////// 00187 // implementation of the I/O function mdp_field::save() 00188 // /////////////////////////////////////////////////////////////////////////// 00189 #include "mdp_field_save.h" 00190 00191 // /////////////////////////////////////////////////////////////////////////// 00192 // implementation of the I/O function mdp_field::save_vtk() 00193 // /////////////////////////////////////////////////////////////////////////// 00194 #include "mdp_field_save_vtk.h" 00195 00196 // /////////////////////////////////////////////////////////////////////////// 00197 // implementation of the I/O function mdp_field::save_vtk() 00198 // /////////////////////////////////////////////////////////////////////////// 00199 #include "mdp_save_partitioning_vtk.h" 00200 00201 #ifdef INCLUDE_DEPRECATED_IO 00202 #include "mdp_deprecatedIO.h" 00203 #endif 00204 00205 // /////////////////////////////////////////////////////////////////////////// 00206 // an auxiliary function that returns (-1)^n 00207 // /////////////////////////////////////////////////////////////////////////// 00208 #include "mdp_mod2sign.h" 00209 00210 // /////////////////////////////////////////////////////////////////////////// 00211 // very clever function to compute permutations of lists 00212 // /////////////////////////////////////////////////////////////////////////// 00213 #include "mdp_permutations.h" 00214 00215 // /////////////////////////////////////////////////////////////////////////// 00216 // implementation of the class mdp_complex_field 00217 // /////////////////////////////////////////////////////////////////////////// 00218 #include "mdp_complex_field.h" 00219 00220 // /////////////////////////////////////////////////////////////////////////// 00221 // an mdp_field of matrices 00222 // (more general than mdp_matrix_field) 00223 // /////////////////////////////////////////////////////////////////////////// 00224 #include "mdp_matrix_field.h" 00225 00226 // /////////////////////////////////////////////////////////////////////////// 00227 // an mdp_field of a vector matrices 00228 // (more general than Nmdp_matrix_field) 00229 // /////////////////////////////////////////////////////////////////////////// 00230 #include "mdp_vector_field.h" 00231 00232 // /////////////////////////////////////////////////////////////////////////// 00233 // an mdp_field of vector (1xN matrix) 00234 // (more general than Vector_field) 00235 // /////////////////////////////////////////////////////////////////////////// 00236 #include "mdp_nmatrix_field.h" 00237 00238 // /////////////////////////////////////////////////////////////////////////// 00239 // compatibility functions map MDP 1.3 into MDP 2.0 or higher 00240 // (only the syntax of mdp_random::SU(int n) is not portable 00241 // everything else is portable if according to specs) 00242 // /////////////////////////////////////////////////////////////////////////// 00243 #include "mdp_compatibility_macros.h" 00244 00245 // /////////////////////////////////////////////////////////////////////////// 00246 // functions to prompt the user for input values 00247 // /////////////////////////////////////////////////////////////////////////// 00248 #include "mdp_prompt.h" 00249 00250 // /////////////////////////////////////////////////////////////////////////// 00251 // a container class for experimental results 00252 // /////////////////////////////////////////////////////////////////////////// 00253 #include "mdp_measure.h" 00254 00255 // /////////////////////////////////////////////////////////////////////////// 00256 // test almost all up to here 00257 // /////////////////////////////////////////////////////////////////////////// 00258 #include "mdp_matrix_test.h" 00259 #include "mdp_field_test.h" 00260 00261 00262