static void set_qop_invert_arg( QOP_invert_arg_t* qop_invert_arg, quark_invert_control *qic, int milc_parity ) { qop_invert_arg->max_iter = qic->nrestart*qic->max; qop_invert_arg->restart = qic->max; qop_invert_arg->max_restarts = qic->nrestart; qop_invert_arg->evenodd = milc2qop_parity(milc_parity); }
static void set_qop_invert_arg( QOP_invert_arg_t* qop_invert_arg, quark_invert_control *qic, int nsrc, int nmass[] ) { qop_invert_arg->max_iter = qic->nrestart * qic->max; /* QOP convention */ qop_invert_arg->restart = qic->max; qop_invert_arg->max_restarts = qic->nrestart; qop_invert_arg->evenodd = milc2qop_parity(qic->parity); /* For multimass inversion, don't restart */ if(nsrc != 1 || nmass[0] != 1) qop_invert_arg->restart = qop_invert_arg->max_iter; }
static QOP_FermionLinksAsqtad * CREATE_L_FROM_SITE_GAUGE( QOP_info_t *info, QOP_asqtad_coeffs_t *coeffs, field_offset src, int parity) { MYSU3MATRIX **raw; QOP_FermionLinksAsqtad *qop; QOP_GaugeField *gauge; raw = CREATE_RAW4_G_FROM_SITE(src, parity); if(raw == NULL)terminate(1); gauge = QOP_create_G_from_raw((MYREAL **)raw, milc2qop_parity(parity)); DESTROY_RAW4_G(raw); raw = NULL; qop = QOP_asqtad_create_L_from_G(info, coeffs, gauge); QOP_destroy_G(gauge); gauge = NULL; return qop; }
static void compute_qdp_residuals( int prop_type, QDP_D3_DiracFermion *qdp_resid[], QDP_D3_DiracFermion *qdp_rhs[], QOP_FermionLinksWilson *qop_links, QOP_DiracFermion **qop_sol[], void *dmps[], float *kappas[], int nkappa[], int nsrc, int milc_parity ){ QOP_info_t info = {0., 0., 0, 0, 0}; QDP_D3_DiracFermion *qdp_prod = QDP_D3_create_D(); QOP_DiracFermion *qop_prod; QOP_evenodd_t qop_parity = milc2qop_parity(milc_parity); QDP_Subset subset = milc2qdp_subset(milc_parity); int i; for(i = 0; i < nsrc; i++){ qop_prod = QOP_D3_convert_D_from_qdp(qdp_prod); if(prop_type == CLOVER_TYPE) QOP_wilson_dslash(&info, qop_links, kappas[i][0], +1, qop_prod, qop_sol[i][0], qop_parity, qop_parity); else {/* IFLA_TYPE */ QOP_wilson_ifla_coeffs_t dcof; /* If there are multiple kappas, we assume that the parameters are the same for all kappas in this solve */ load_qop_wilson_ifla_coeffs(&dcof, (newaction_ifla_param *)dmps[i] ); QOP_wilson_ifla_dslash(&info, qop_links, kappas[i][0], +1, &dcof, qop_prod, qop_sol[i][0], qop_parity, qop_parity); } qdp_prod = QOP_D3_convert_D_to_qdp( qop_prod ); QDP_D3_D_eq_D_minus_D( qdp_resid[i], qdp_rhs[i], qdp_prod, subset ); } QDP_D3_destroy_D(qdp_prod); }