Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

dterms.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------
00002 //  
00003 //   dterms.h
00004 //  
00005 //   Header file for the  DTerms class. A class holding the derivative
00006 //   terms acting only on quarks. This is used to build all other derivative
00007 //   terms by appropriate communication
00008 //
00009 //   Based on Chulwoo's optimization proposal.
00010 //  
00011 //   April 2002
00012 //  
00013 //   Kostas Orginos
00014 //  
00015 //------------------------------------------------------------------*/
00016 #ifndef INCLUDED_DTERMS_H
00017 #define INCLUDED_DTERMS_H
00018 #include <stdio.h>
00019 #include <comms/scu.h>
00020 #include <util/data_types.h>
00021 #include <util/site.h>
00022 
00023 CPS_START_NAMESPACE
00024 
00025 
00032 class DTerms
00033 {
00034   Complex *term ;
00035   int  num     ; // Number of terms
00036   char *cname ;
00037 
00038   void Allocate() ; 
00039   void Delete() ;
00040   
00041 public:
00042   DTerms() ; 
00043   DTerms(int N) ; 
00044 
00045   Complex& operator()(int i, int site)
00046   {
00047     if((i>=num)||(i<0)||(site<0)||(site>=GJP.VolNodeSites()))
00048       {
00049         ERR.General(cname, "()", "out of range\n");
00050         return *term ;
00051       }
00052     return *(term + i + num*site) ;
00053   }
00054   
00055  Complex& GetTerm(const int d, const int *vec, Complex& tmp) const;
00056 
00057   ~DTerms(){Delete();}
00058   
00059 };
00060 
00061 CPS_END_NAMESPACE
00062 
00063 #endif // !INCLUDED_DTERMS_H  
00064 
00065 

Generated on Sat Oct 10 14:11:10 2009 for Columbia Physics System by  doxygen 1.3.9.1