Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

fermiqcd_dwfermi_field.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00026 class dwfermi_field: public mdp_complex_field {
00027  public:
00028   int    nspin, nc, L5;
00029   dwfermi_field() {
00030     reset_field();
00031     L5=0;
00032   }
00033   dwfermi_field(mdp_lattice &a, int L5_, int nc_, int nspin_=4) {
00034     reset_field();
00035     L5=L5_;
00036     nc=nc_;
00037     nspin=nspin_;
00038     allocate_field(a, L5*nspin*nc);
00039   } 
00040   dwfermi_field(dwfermi_field &psi) {
00041     reset_field();
00042     L5=psi.L5;
00043     nc=psi.nc;
00044     nspin=psi.nspin;
00045     allocate_field(psi.lattice(), L5*nspin*nc);
00046   } 
00047   void allocate_dwfermi_field(mdp_lattice &a, 
00048                               int L5_, int nc_, int nspin_=4) {
00049     deallocate_field();
00050     L5=L5_;
00051     nc=nc_;
00052     nspin=nspin_;
00053     allocate_field(a, L5*nspin*nc);
00054   } 
00055   inline mdp_matrix operator() (site x, int L5_) {
00056     return mdp_matrix(address(x, L5_*nc*nspin),nspin,nc);
00057   }
00058   inline mdp_matrix operator() (site x, int L5_, int a) {
00059     return mdp_matrix(address(x,(L5_*nspin+a)*nc),nc,1);
00060   }
00061   inline mdp_complex& operator() (site x, int L5_, int a, int i) {
00062     return *(address(x,(L5_*nspin+a)*nc+i));
00063   }
00064   inline const mdp_complex& operator() (site x, int L5_, int a, int i) const {
00065     return *(address(x,(L5_*nspin+a)*nc+i));
00066   }
00067   void operator= (mdp_complex a) {
00068     for(long i=0; i<size; i++) m[i]=a;
00069   }
00070 };
00071 
00072 

Generated on Sun Feb 27 15:12:17 2005 by  doxygen 1.4.1