本文整理汇总了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);
}
}
}