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
00030 void set_zero(generic_field<mdp_complex> &chi,
00031 int parity=EVENODD) {
00032 int i;
00033 int i_max=chi.size_per_site();
00034 site x(chi.lattice());
00035 forallsitesofparity(x,parity)
00036 for(i=0; i<i_max; i++) {
00037 *chi.address(x,i)=mdp_complex(0,0);
00038 }
00039 chi.update();
00040 }