7 #ifndef __one_flavor_ratio_rat_rat_monomial5d_w_h__
8 #define __one_flavor_ratio_rat_rat_monomial5d_w_h__
28 template<
typename P,
typename Q,
typename Phi>
46 push(xml_out,
"OneFlavorRatioRatRatExactWilsonTypeFermMonomial5D");
88 multi1d< multi1d<Phi> > X;
90 P F_1, F_2, F_tmp(
Nd);
91 multi1d<int> n_m_count(
getNPF());
102 for(
int i=0;
i < X.size(); ++
i)
107 M->deriv(F_1, X[
i], Y,
MINUS);
110 M->deriv(F_2, Y, X[
i],
PLUS);
114 for(
int mu=0;
mu <
F.size();
mu++)
127 write(xml_out,
"n_m_count", n_m_count);
164 push(xml_out,
"OneFlavorRatioRatRatExactWilsonTypeFermMonomial5DRefresh");
178 multi1d<int> n_m_count(
getNPF());
190 multi1d<Phi>
eta(
N5);
197 for(
int i=0;
i <
N5; ++
i)
204 for(
int i=0;
i <
N5; ++
i)
205 eta[
i][M->subset()] *= sqrt(0.5);
208 multi1d< multi1d<Phi> > X;
213 if (X.size() != sipfe.
pole.size())
214 QDP_error_exit(
"%s : sanity failure, internal size not getSIPartFracRoot size", __func__);
216 if (X[0].size() !=
N5)
217 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
223 for(
int j=0;
j <
N5; ++
j)
226 for(
int i=0;
i < X.size(); ++
i)
232 write(xml_out,
"n_m_count", n_m_count);
250 for(
int i=0 ;
i < fm.
getPhi().size();
i++) {
254 catch(std::bad_cast) {
255 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatioRatRatExactWilsonTypeFermMonomial5D" << std::endl;
285 push(xml_out,
"S_subset");
297 multi1d<int> n_m_count(
getNPF());
309 multi1d< multi1d<Phi> > X;
310 multi1d<Phi>
tmp(
N5);
320 if (X.size() != spfe.
pole.size())
321 QDP_error_exit(
"%s : sanity failure, internal size not getSPartFracRoot size", __func__);
323 if (X[0].size() !=
N5)
324 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
328 for(
int j=0;
j <
N5; ++
j)
331 for(
int i=0;
i < X.size(); ++
i)
336 action_m += norm2(
tmp, M->subset());
340 write(xml_out,
"n_m_count", n_m_count);
341 write(xml_out,
"S_m", action_m);
343 write(xml_out,
"S", action);
394 virtual const multi1d< multi1d<Phi> >&
getPhi(
void)
const = 0;
397 virtual multi1d< multi1d<Phi> >&
getPhi(
void) = 0;
410 template<
typename P,
typename Q,
typename Phi>
423 push(xml_out,
"OneFlavorRatioRatRatExactUnprecWilsonTypeFermMonomial5D");
427 write(xml_out,
"S", action);
452 template<
typename P,
typename Q,
typename Phi>
474 push(xml_out,
"OneFlavorRatioRatRatExactEvenOddPrecWilsonTypeFermMonomial5D");
478 Double action = action_e + action_o;
480 write(xml_out,
"S_even_even", action_e);
481 write(xml_out,
"S_odd_odd", action_o);
482 write(xml_out,
"S", action);
505 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 const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
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.
~OneFlavorRatioRatRatExactEvenOddPrecConstDetWilsonTypeFermMonomial5D()
virtual destructor:
Exact 1 flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
~OneFlavorRatioRatRatExactEvenOddPrecWilsonTypeFermMonomial5D()
virtual destructor:
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual Double S_odd_odd(const AbsFieldState< P, Q > &s)
Compute the odd odd contribution (eg.
Exact 1 flavor unpreconditioned fermact monomial living in extra dimensions.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
~OneFlavorRatioRatRatExactUnprecWilsonTypeFermMonomial5D()
virtual destructor:
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
Exact 1 flavor fermact monomial in extra dimensions.
virtual const RemezCoeff_t & getDenomSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual multi1d< multi1d< Phi > > & getPhi(void)=0
mutator for pseudofermion
virtual const GroupXML_t & getDenomForceInvParams(void) const =0
Get inverter params.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
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 GroupXML_t & getNumerForceInvParams(void) const =0
Get inverter params.
virtual int getNPF() const =0
Return number of pseudofermions.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy internal fields.
virtual const RemezCoeff_t & getNumerSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual const GroupXML_t & getNumerActionInvParams(void) const =0
Get inverter params.
virtual const GroupXML_t & getDenomActionInvParams(void) const =0
Get inverter params.
virtual const RemezCoeff_t & getDenomSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const
Get at fermion action.
~OneFlavorRatioRatRatExactWilsonTypeFermMonomial5D()
virtual destructor:
virtual const RemezCoeff_t & getNumerFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual Double S_subset(const AbsFieldState< P, Q > &s) const
Compute action on the appropriate subset.
virtual const multi1d< multi1d< Phi > > & getPhi(void) const =0
Accessor for pseudofermion (read only)
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