//-------------------------------------------------------------------------- // 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); } } }