本文整理汇总了C++中Lattice::StrOrd方法的典型用法代码示例。如果您正苦于以下问题:C++ Lattice::StrOrd方法的具体用法?C++ Lattice::StrOrd怎么用?C++ Lattice::StrOrd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lattice
的用法示例。
在下文中一共展示了Lattice::StrOrd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pt_init
void pt_init(Lattice &Lat){
PTArg pt_arg;
//Size of local volume in all four directions
pt_arg.size[0] = GJP.XnodeSites();
pt_arg.size[1] = GJP.YnodeSites();
pt_arg.size[2] = GJP.ZnodeSites();
pt_arg.size[3] = GJP.TnodeSites();
//-------------------------------------------------
//Added by Michael C.
for(int i = 0; i < 4;i++)
if(GJP.Nodes(i) == 1)
pt_arg.local[i] = 1;
else
pt_arg.local[i] = 0;
//-------------------------------------------------
int temp = 0;
for(int i = 0;i<4;i++){
temp += GJP.NodeSites(i)*GJP.NodeCoor(i);
}
if (temp%2==0)
pt_arg.evenodd = PT_EVEN;
else
pt_arg.evenodd = PT_ODD;
pt_arg.gauge_field_addr = (IFloat *)Lat.GaugeField();
StrOrdType str_ord = Lat.StrOrd();
printf("str_ord=%d\n",str_ord);
switch(str_ord){
case CANONICAL:
pt_arg.g_str_ord = PT_XYZT;
pt_arg.v_str_ord = PT_XYZT;
pt_arg.v_str_ord_cb = PT_TXYZ;
pt_arg.g_conj = 0;
break;
case WILSON:
pt_arg.g_str_ord = PT_XYZT_CB_O;
pt_arg.v_str_ord = PT_XYZT_CB_O;
pt_arg.v_str_ord_cb = PT_TXYZ;
pt_arg.g_conj = 0;
break;
case STAG:
pt_arg.g_str_ord = PT_XYZT;
pt_arg.v_str_ord = PT_XYZT;
pt_arg.v_str_ord_cb = PT_TXYZ;
pt_arg.g_conj = 1;
break;
default:
break;
}
pt_arg.prec = sizeof(IFloat);
StaticPT.init(&pt_arg);
}
示例2: Set
void LatticeContainer::Set(Lattice &lat){
if (str_ord != lat.StrOrd())
ERR.General(cname,"Set()","Storage ordering of LatticeContainer(%d) doesn't agree with lattice ordering(%d)", str_ord,lat.StrOrd());
lat.GaugeField(gauge_p);
}
示例3: Get
void LatticeContainer::Get(Lattice &lat){
str_ord = lat.StrOrd();
lat.CopyGaugeField(gauge_p);
}