Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
void LatticeContainer::Get(Lattice &lat){
	str_ord = lat.StrOrd();
	lat.CopyGaugeField(gauge_p);
}