7 #ifndef __one_flavor_rat_monomial5d_w_h__
8 #define __one_flavor_rat_monomial5d_w_h__
28 template<
typename P,
typename Q,
typename Phi>
46 push(xml_out,
"OneFlavorRatExactWilsonTypeFermMonomial5D");
86 multi1d< multi1d<Phi> > X;
88 P F_1, F_2, F_tmp(
Nd);
89 multi1d<int> n_m_count(
getNPF());
100 for(
int i=0;
i < X.size(); ++
i)
105 M->deriv(F_1, X[
i], Y,
MINUS);
108 M->deriv(F_2, Y, X[
i],
PLUS);
112 for(
int mu=0;
mu <
F.size();
mu++)
125 write(xml_out,
"n_m_count", n_m_count);
162 push(xml_out,
"OneFlavorRatExactWilsonTypeFermMonomial5DRefresh");
176 multi1d<int> n_m_count(
getNPF());
188 multi1d<Phi>
eta(
N5);
195 for(
int i=0;
i <
N5; ++
i)
202 for(
int i=0;
i <
N5; ++
i)
203 eta[
i][M->subset()] *= sqrt(0.5);
206 multi1d< multi1d<Phi> > X;
211 if (X.size() != sipfe.
pole.size())
212 QDP_error_exit(
"%s : sanity failure, internal size not getSIPartFracRoot size", __func__);
214 if (X[0].size() !=
N5)
215 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
221 for(
int j=0;
j <
N5; ++
j)
224 for(
int i=0;
i < X.size(); ++
i)
230 write(xml_out,
"n_m_count", n_m_count);
248 for(
int i=0 ;
i < fm.
getPhi().size();
i++) {
252 catch(std::bad_cast) {
253 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatExactWilsonTypeFermMonomial5D" << std::endl;
283 push(xml_out,
"S_subset");
295 multi1d<int> n_m_count(
getNPF());
307 multi1d< multi1d<Phi> > X;
308 multi1d<Phi>
tmp(
N5);
318 if (X.size() != spfe.
pole.size())
319 QDP_error_exit(
"%s : sanity failure, internal size not getSPartFracRoot size", __func__);
321 if (X[0].size() !=
N5)
322 QDP_error_exit(
"%s : sanity failure, internal size not N5", __func__);
326 for(
int j=0;
j <
N5; ++
j)
329 for(
int i=0;
i < X.size(); ++
i)
334 action_m += norm2(
tmp, M->subset());
338 write(xml_out,
"n_m_count", n_m_count);
339 write(xml_out,
"S_m", action_m);
341 write(xml_out,
"S", action);
361 virtual const multi1d< multi1d<Phi> >&
getPhi(
void)
const = 0;
364 virtual multi1d< multi1d<Phi> >&
getPhi(
void) = 0;
386 template<
typename P,
typename Q,
typename Phi>
399 push(xml_out,
"OneFlavorRatExactUnprecWilsonTypeFermMonomial5D");
403 write(xml_out,
"S", action);
426 virtual const multi1d< multi1d<Phi> >&
getPhi(
void)
const = 0;
429 virtual multi1d< multi1d<Phi> >&
getPhi(
void) = 0;
450 template<
typename P,
typename Q,
typename Phi>
472 push(xml_out,
"OneFlavorRatExactEvenOddPrecWilsonTypeFermMonomial5D");
476 Double action = action_e + action_o;
478 write(xml_out,
"S_even_even", action_e);
479 write(xml_out,
"S_odd_odd", action_o);
480 write(xml_out,
"S", action);
502 virtual const multi1d< multi1d<Phi> >&
getPhi(
void)
const = 0;
505 virtual multi1d< multi1d<Phi> >&
getPhi(
void) = 0;
524 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.
~OneFlavorRatExactEvenOddPrecConstDetWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const =0
Get at fermion action.
Exact 1 flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual const RemezCoeff_t & getSPFE() const =0
Return the partial fraction expansion for the action calc.
~OneFlavorRatExactEvenOddPrecWilsonTypeFermMonomial5D()
virtual destructor:
virtual const GroupXML_t & getActionInvParams(void) const =0
Get inverter params.
virtual const RemezCoeff_t & getFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const =0
Get at fermion action.
virtual multi1d< multi1d< Phi > > & getPhi(void)=0
mutator for pseudofermion
virtual const multi1d< multi1d< Phi > > & getPhi(void) const =0
Accessor for pseudofermion (read only)
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)
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
virtual int getNPF() const =0
Return number of roots in used.
virtual const RemezCoeff_t & getSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
Exact 1 flavor unpreconditioned fermact monomial living in extra dimensions.
virtual const multi1d< multi1d< Phi > > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual const RemezCoeff_t & getSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual int getNPF() const =0
Return number of roots in used.
virtual const RemezCoeff_t & getSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual multi1d< multi1d< Phi > > & getPhi(void)=0
mutator for pseudofermion
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const GroupXML_t & getActionInvParams(void) const =0
Get inverter params.
~OneFlavorRatExactUnprecWilsonTypeFermMonomial5D()
virtual destructor:
virtual const RemezCoeff_t & getFPFE() const =0
Return the partial fraction expansion for the force calc.
Exact 1 flavor fermact monomial in extra dimensions.
virtual const RemezCoeff_t & getSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual int getNPF() const =0
Return number of pseudofermions.
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
virtual multi1d< multi1d< Phi > > & getPhi(void)=0
mutator for pseudofermion
~OneFlavorRatExactWilsonTypeFermMonomial5D()
virtual destructor:
virtual const GroupXML_t & getActionInvParams(void) const =0
Get inverter params.
virtual const RemezCoeff_t & getSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const multi1d< multi1d< Phi > > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy internal fields.
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual const RemezCoeff_t & getFPFE() 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 void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
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