当前位置: 首页>>代码示例>>C++>>正文


C++ Lattice::Fclass方法代码示例

本文整理汇总了C++中Lattice::Fclass方法的典型用法代码示例。如果您正苦于以下问题:C++ Lattice::Fclass方法的具体用法?C++ Lattice::Fclass怎么用?C++ Lattice::Fclass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lattice的用法示例。


在下文中一共展示了Lattice::Fclass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Alg

//--------------------------------------------------------------------------
// AlgWspect CTOR
//--------------------------------------------------------------------------
AlgWspect::AlgWspect(Lattice& latt, 
		     CommonArg *c_arg,
		     WspectArg *w_arg,
		     CgArg *cg,
		     int n_quark_masses) 
  : Alg(latt, c_arg),
    d_arg_p(w_arg),
    cg_arg_p(cg),
    d_num_args(n_quark_masses)
{
//  cg_arg = cg;

  // Obtain an instance of the support class WspectGinfo
  //------------------------------------------------------------------------
  WspectGinfo g_info;
  VRB.Func(d_class_name, g_info.ctor_str);


  // Check the lattice type
  //------------------------------------------------------------------------
  if ((latt.Fclass() != F_CLASS_WILSON) &&
      (latt.Fclass() != F_CLASS_CLOVER) &&
      (latt.Fclass() != F_CLASS_DWF))        {
    ERR.General(d_class_name,
		g_info.ctor_str,
		g_info.wrong_type_str);
  }

  // Check the WspectArg pointer
  //------------------------------------------------------------------------
  if (d_arg_p == 0) {
    ERR.Pointer(d_class_name,
		g_info.ctor_str, 
		"arg");
  }
  if (cg_arg_p == 0) {
    ERR.Pointer(d_class_name,
                g_info.ctor_str,
                "arg");
  }


  // Check the num of masses, prop_dir and AOTS
  //------------------------------------------------------------------------
  int prop_dir   = d_arg_p->prop_dir;
  int aots_start = d_arg_p->aots_start;
  int aots_step  = d_arg_p->aots_step;
  int aots_num   = d_arg_p->aots_num;
  if (d_num_args < 1 ||
      prop_dir < 0   || prop_dir >= g_info.LORENTZs ||
      aots_start+aots_step*(aots_num-1) >= g_info.glb_sites[prop_dir]) {
    ERR.General(d_class_name, 
		g_info.ctor_str, 
		g_info.out_range_str);
  }

  // Check the prop consistency among different quark masses
  //------------------------------------------------------------------------
  // Ping:  will we use different aots for non-degenerate quarks
  //        and then mix them up to form a hadron???
  for (int i = 0; i < d_num_args; ++i) {
    if (d_arg_p[i].prop_dir    != prop_dir   ||
	d_arg_p[i].aots_start  != aots_start ||
	d_arg_p[i].aots_step   != aots_step  ||
	d_arg_p[i].aots_num    != aots_num) {
      ERR.General(d_class_name, 
		  g_info.ctor_str, 
		  g_info.inconsistent_str);
    }
  }
}
开发者ID:DeanHowarth,项目名称:QUDA-CPS,代码行数:74,代码来源:alg_w_spect.C


注:本文中的Lattice::Fclass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。