00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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 ;
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