7 #ifndef __one_flavor_ratio_rat_rat_monomial_w_h__
8 #define __one_flavor_ratio_rat_rat_monomial_w_h__
27 template<
typename P,
typename Q,
typename Phi>
45 push(xml_out,
"OneFlavorRatioRatRatExactWilsonTypeFermMonomial");
103 P F_1, F_2, F_tmp(
Nd);
109 QDPIO::cout <<
"num_pf = " <<
getNPF() << std::endl;
119 for(
int i=0;
i < X.size(); ++
i)
121 (*M_num)(Y, X[
i],
PLUS);
124 M_num->deriv(F_1, X[
i], Y,
MINUS);
127 M_num->deriv(F_2, Y, X[
i],
PLUS);
131 for(
int mu=0;
mu <
F.size();
mu++)
132 F_tmp[
mu] -= fpfe_num.
res[
i] * F_1[
mu];
176 push(xml_out,
"OneFlavorRatioRatRatExactWilsonTypeFermMonomial");
220 for(
int i=0;
i < X.size(); ++
i)
221 getPhi()[
n][M_num->subset()] += sipfe_num.
res[
i] * X[
i];
240 catch(std::bad_cast) {
241 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatioRatRatExactWilsonTypeFermMonomial " << std::endl;
269 push(xml_out,
"S_subset");
301 for(
int i=0;
i < X.size(); ++
i)
302 psi[M_num->subset()] += spfe_num.
res[
i] * X[
i];
304 action += norm2(
psi, M_num->subset());
308 write(xml_out,
"S", action);
362 virtual const multi1d<Phi>&
getPhi()
const = 0;
376 template<
typename P,
typename Q,
typename Phi>
390 push(xml_out,
"OneFlavorRatioRatRatExactUnprecWilsonTypeFermMonomial");
394 write(xml_out,
"S", action);
418 template<
typename P,
typename Q,
typename Phi>
440 push(xml_out,
"OneFlavorRatioRatRatExactEvenOddPrecWilsonTypeFermMonomial");
444 Double action = action_e + action_o;
446 write(xml_out,
"S_even_even", action_e);
447 write(xml_out,
"S_odd_odd", action_o);
448 write(xml_out,
"S", action);
473 template<
typename P,
typename Q,
typename Phi>
Monomials - gauge action or fermion binlinear contributions for HMC.
virtual DiffLinearOperator< T, Q, P > * 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 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 constant determinant.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
~OneFlavorRatioRatRatExactEvenOddPrecConstDetWilsonTypeFermMonomial()
virtual destructor:
virtual const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
Exact 1 flavor even-odd preconditioned fermact monomial.
virtual Double S_odd_odd(const AbsFieldState< P, Q > &s)
Compute the odd odd contribution (eg.
virtual const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
~OneFlavorRatioRatRatExactEvenOddPrecWilsonTypeFermMonomial()
virtual destructor:
Exact 1 flavor unpreconditioned fermact monomial.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const WilsonTypeFermAct< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatRatExactUnprecWilsonTypeFermMonomial()
virtual destructor:
virtual const WilsonTypeFermAct< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
Exact 1 flavor fermact monomial using rational polynomials.
virtual Double S_subset(const AbsFieldState< P, Q > &s) const
Compute the action on the appropriate subset.
virtual const RemezCoeff_t & getNumerSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const RemezCoeff_t & getDenomFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion (read only)
virtual const GroupXML_t & getNumerForceInvParams() const =0
Get inverter params.
virtual const RemezCoeff_t & getNumerFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const RemezCoeff_t & getDenomSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual const WilsonTypeFermAct< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct() const
Get at fermion action.
virtual const RemezCoeff_t & getNumerSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual int getNPF() const =0
Return number of roots in used.
~OneFlavorRatioRatRatExactWilsonTypeFermMonomial()
virtual destructor:
virtual const GroupXML_t & getDenomActionInvParams() const =0
Get inverter params.
virtual const WilsonTypeFermAct< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const GroupXML_t & getDenomForceInvParams() const =0
Get inverter params.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual const RemezCoeff_t & getDenomSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const GroupXML_t & getNumerActionInvParams() const =0
Get inverter params.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion
Wilson-like fermion actions.
virtual MdagMMultiSystemSolver< 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.
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