00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00016 void set_random(generic_field<mdp_complex> &chi, 00017 int parity=EVENODD) { 00018 int i; 00019 int i_max=chi.size_per_site(); 00020 site x(chi.lattice()); 00021 forallsitesofparity(x,parity) 00022 for(i=0; i<i_max; i++) { 00023 *chi.address(x,i)=chi.lattice().random(x).gaussian(); 00024 } 00025 chi.update(); 00026 } 00027 00033 void set_wall_random(generic_field<mdp_complex> &chi, 00034 int t=0, 00035 int parity=EVENODD) { 00036 int i; 00037 int i_max=chi.size_per_site(); 00038 site x(chi.lattice()); 00039 forallsitesofparity(x,parity) if(x(0)==t) 00040 for(i=0; i<i_max; i++) { 00041 *chi.address(x,i)=chi.lattice().random(x).gaussian(); 00042 } 00043 chi.update(); 00044 } 00045 00046 00049 void set_zero(generic_field<mdp_complex> &chi, 00050 int parity=EVENODD) { 00051 int i; 00052 int i_max=chi.size_per_site(); 00053 site x(chi.lattice()); 00054 forallsitesofparity(x,parity) 00055 for(i=0; i<i_max; i++) { 00056 *chi.address(x,i)=mdp_complex(0,0); 00057 } 00058 chi.update(); 00059 }