7 #ifndef __one_flavor_ratio_rat_conv_monomial_w_h__
8 #define __one_flavor_ratio_rat_conv_monomial_w_h__
27 template<
typename P,
typename Q,
typename Phi>
45 push(xml_out,
"OneFlavorRatioRatConvExactWilsonTypeFermMonomial");
97 P F_1, F_2, F_tmp(
Nd);
116 for(
int i=0;
i < X.size(); ++
i)
118 (*M_num)(Y, X[
i],
PLUS);
121 M_num->deriv(F_1, X[
i], Y,
MINUS);
124 M_num->deriv(F_2, Y, X[
i],
PLUS);
128 for(
int mu=0;
mu <
F.size();
mu++)
129 F_tmp[
mu] -= fpfe_num.
res[
i] * F_1[
mu];
173 push(xml_out,
"OneFlavorRatioRatConvExactWilsonTypeFermMonomial");
220 for(
int i=0;
i < X.size(); ++
i)
240 catch(std::bad_cast) {
241 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatioRatConvExactWilsonTypeFermMonomial " << std::endl;
269 push(xml_out,
"S_subset");
307 for(
int i=0;
i < X.size(); ++
i)
308 psi[M_num->subset()] += spfe.
res[
i] * X[
i];
310 action += norm2(
psi, M_num->subset());
314 write(xml_out,
"S", action);
353 virtual const multi1d<Phi>&
getPhi(
void)
const = 0;
367 template<
typename P,
typename Q,
typename Phi>
381 push(xml_out,
"OneFlavorRatioRatConvExactUnprecWilsonTypeFermMonomial");
385 write(xml_out,
"S", action);
409 template<
typename P,
typename Q,
typename Phi>
431 push(xml_out,
"OneFlavorRatioRatConvExactEvenOddPrecWilsonTypeFermMonomial");
435 Double action = action_e + action_o;
437 write(xml_out,
"S_even_even", action_e);
438 write(xml_out,
"S_odd_odd", action_o);
439 write(xml_out,
"S", action);
464 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 const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatConvExactEvenOddPrecConstDetWilsonTypeFermMonomial()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
virtual const EvenOddPrecWilsonTypeFermAct< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
Exact 1 flavor even-odd preconditioned fermact monomial.
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.
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 Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
~OneFlavorRatioRatConvExactEvenOddPrecWilsonTypeFermMonomial()
virtual destructor:
Exact 1 flavor unpreconditioned fermact monomial.
virtual const WilsonTypeFermAct< Phi, P, Q > & getDenomFermAct(void) const =0
Get at fermion action.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
~OneFlavorRatioRatConvExactUnprecWilsonTypeFermMonomial()
virtual destructor:
virtual const WilsonTypeFermAct< Phi, P, Q > & getNumerFermAct(void) 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 int getNPF() const =0
Return number of roots in used.
virtual const WilsonTypeFermAct< Phi, P, Q > & getDenomFermAct(void) const =0
Get at fermion action.
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const GroupXML_t & getNumerForceInvParams(void) const =0
Get inverter params.
~OneFlavorRatioRatConvExactWilsonTypeFermMonomial()
virtual destructor:
virtual multi1d< Phi > & getPhi(void)=0
mutator for pseudofermion
virtual const RemezCoeff_t & getNumerSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual const GroupXML_t & getNumerActionInvParams(void) const =0
Get inverter params.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
virtual const WilsonTypeFermAct< Phi, P, Q > & getNumerFermAct(void) const =0
Get at fermion action.
virtual const multi1d< Phi > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct(void) const
Get at fermion action.
virtual const RemezCoeff_t & getNumerFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual const RemezCoeff_t & getNumerSPFE() const =0
Return the partial fraction expansion for the action calc.
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