7 #ifndef __one_flavor_ratio_rat_conv_monomial5d_w_h__
8 #define __one_flavor_ratio_rat_conv_monomial5d_w_h__
28 template<
typename P,
typename Q,
typename Phi>
46 push(xml_out,
"OneFlavorRatioRatConvExactWilsonTypeFermMonomial5D");
85 multi1d< multi1d<Phi> > X;
87 P F_1, F_2, F_tmp(
Nd);
88 multi1d<int> n_m_count(
getNPF());
99 for(
int i=0;
i < X.size(); ++
i)
104 M->deriv(F_1, X[
i], Y,
MINUS);
107 M->deriv(F_2, Y, X[
i],
PLUS);
111 for(
int mu=0;
mu <
F.size();
mu++)
124 write(xml_out,
"n_m_count", n_m_count);
160 push(xml_out,
"OneFlavorRatioRatConvExactWilsonTypeFermMonomial5DRefresh");
174 multi1d<int> n_m_count(
getNPF());
186 multi1d<Phi>
eta(
N5);
193 for(
int i=0;
i <
N5; ++
i)
200 for(
int i=0;
i <
N5; ++
i)
201 eta[
i][M->subset()] *= sqrt(0.5);
204 multi1d< multi1d<Phi> > X;
209 if (X.size() != sipfe.
pole.size())
210 QDP_error_exit(
"%s : sanity failure, internal size not getSIPartFracRoot size", __func__);
212 if (X[0].size() !=
N5)
213 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
219 for(
int j=0;
j <
N5; ++
j)
222 for(
int i=0;
i < X.size(); ++
i)
228 write(xml_out,
"n_m_count", n_m_count);
247 for(
int i=0 ;
i < fm.
getPhi().size();
i++) {
251 catch(std::bad_cast) {
252 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatioRatConvExactWilsonTypeFermMonomial5D" << std::endl;
282 push(xml_out,
"S_subset");
294 multi1d<int> n_m_count(
getNPF());
306 multi1d< multi1d<Phi> > X;
307 multi1d<Phi>
tmp(
N5);
317 if (X.size() != spfe.
pole.size())
318 QDP_error_exit(
"%s : sanity failure, internal size not getSPartFracRoot size", __func__);
320 if (X[0].size() !=
N5)
321 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
325 for(
int j=0;
j <
N5; ++
j)
328 for(
int i=0;
i < X.size(); ++
i)
333 action_m += norm2(
tmp, M->subset());
337 write(xml_out,
"n_m_count", n_m_count);
338 write(xml_out,
"S_m", action_m);
340 write(xml_out,
"S", action);
376 virtual const multi1d< multi1d<Phi> >&
getPhi(
void)
const = 0;
379 virtual multi1d< multi1d<Phi> >&
getPhi(
void) = 0;
392 template<
typename P,
typename Q,
typename Phi>
405 push(xml_out,
"OneFlavorRatioRatConvExactUnprecWilsonTypeFermMonomial5D");
409 write(xml_out,
"S", action);
434 template<
typename P,
typename Q,
typename Phi>
456 push(xml_out,
"OneFlavorRatioRatConvExactEvenOddPrecWilsonTypeFermMonomial5D");
460 Double action = action_e + action_o;
462 write(xml_out,
"S_even_even", action_e);
463 write(xml_out,
"S_odd_odd", action_o);
464 write(xml_out,
"S", action);
487 template<
typename P,
typename Q,
typename Phi>
Monomials - gauge action or fermion binlinear contributions for HMC.
virtual DiffLinearOperatorArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const =0
Produce a linear operator for this action.
Even-odd preconditioned Wilson-like fermion actions including derivatives.
Fermionic monomials (binlinears in fermion fields)
virtual int size() const =0
Expected length of array index.
virtual const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this action.
virtual FermState< T, P, Q > * createState(const Q &q) const
Given links (coordinates Q) create the state needed for the linear operators.
Class for counted reference semantics.
An abstract monomial class, for inexact algorithms.
Exact 1 flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatConvExactEvenOddPrecConstDetWilsonTypeFermMonomial5D()
virtual destructor:
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
Exact 1 flavor even-odd preconditioned fermact monomial living in extra dimensions.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual Double S_odd_odd(const AbsFieldState< P, Q > &s)
Compute the odd odd contribution (eg.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatConvExactEvenOddPrecWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
Exact 1 flavor unpreconditioned fermact monomial living in extra dimensions.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatConvExactUnprecWilsonTypeFermMonomial5D()
virtual destructor:
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
Exact 1 flavor fermact monomial in extra dimensions.
virtual const RemezCoeff_t & getNumerSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual Double S_subset(const AbsFieldState< P, Q > &s) const
Compute action on the appropriate subset.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy internal fields.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
virtual const multi1d< multi1d< Phi > > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual int getNPF() const =0
Return number of pseudofermions.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual const GroupXML_t & getNumerForceInvParams(void) const =0
Get inverter params.
virtual const RemezCoeff_t & getNumerSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const RemezCoeff_t & getNumerFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const GroupXML_t & getNumerActionInvParams(void) const =0
Get inverter params.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const
Get at fermion action.
virtual multi1d< multi1d< Phi > > & getPhi(void)=0
mutator for pseudofermion
~OneFlavorRatioRatConvExactWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
Unpreconditioned Wilson-like fermion actions in extra dims with derivatives.
Wilson-like fermion actions.
virtual MdagMMultiSystemSolverArray< T > * mInvMdagM(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return a multi-shift linear operator solver for this action to solve (MdagM+shift)*psi=chi.
Even-odd const determinant Wilson-like fermact.
Helper function for calculating forces.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void monitorForces(XMLWriter &xml_out, const std::string &path, const multi1d< LatticeColorMatrix > &F)
Calculate and write out forces.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
push(xml_out,"Condensates")
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Remez algorithm coefficients.
Hold group xml and type id.
Convenient structure to package Remez coeffs.
Holds return info from SystemSolver call.
multi1d< LatticeColorMatrix > P
Wilson-like fermion actions.
static INTERNAL_PRECISION F