7 #ifndef __one_flavor_rat_monomial_w_h__
8 #define __one_flavor_rat_monomial_w_h__
28 template<
typename P,
typename Q,
typename Phi>
46 push(xml_out,
"OneFlavorRatExactWilsonTypeFermMonomial");
95 QDPIO::cout <<
"num_pf = " <<
getNPF() << std::endl;
112 for(
int i=0;
i < X.size(); ++
i)
114 (*lin)(Y, X[
i],
PLUS);
117 lin->deriv(F_1, X[
i], Y,
MINUS);
120 lin->deriv(F_2, Y, X[
i],
PLUS);
124 for(
int mu=0;
mu <
F.size();
mu++) {
131 multi1d<Phi> Y(X.size());
132 for(
int i=0;
i < X.size();
i++) {
137 lin->derivMultipole(F_1, X, Y,
MINUS);
139 lin->derivMultipole(F_1, Y, X,
PLUS);
183 push(xml_out,
"OneFlavorRatExactWilsonTypeFermMonomial");
232 for(
int i=0;
i < X.size(); ++
i)
253 catch(std::bad_cast) {
254 QDPIO::cerr <<
"Failed to cast input Monomial to OneFlavorRatExactWilsonTypeFermMonomial " << std::endl;
282 push(xml_out,
"S_subset");
321 LatticeDouble site_S=
zero;
327 site_S[ lin->subset() ] = -
Double(12);
330 for(
int i=0;
i < X.size(); ++
i) {
331 psi[lin->subset()] += spfe.
res[
i] * X[
i];
335 site_S[ lin->subset()] += localNorm2(
psi);
340 action +=
sum(site_S, lin->subset());
344 write(xml_out,
"S", action);
376 virtual const multi1d<Phi>&
getPhi(
void)
const = 0;
390 template<
typename P,
typename Q,
typename Phi>
404 push(xml_out,
"OneFlavorRatExactUnprecWilsonTypeFermMonomial");
408 write(xml_out,
"S", action);
439 virtual const multi1d<Phi>&
getPhi(
void)
const = 0;
453 template<
typename P,
typename Q,
typename Phi,
454 template<
class,
class,
class>
class EOFermActT>
476 push(xml_out,
"OneFlavorRatExactEvenOddPrecWilsonTypeFermMonomial");
480 Double action = action_e + action_o;
482 write(xml_out,
"S_even_even", action_e);
483 write(xml_out,
"S_odd_odd", action_o);
484 write(xml_out,
"S", action);
515 virtual const multi1d<Phi>&
getPhi(
void)
const = 0;
521 template<
typename P,
typename Q,
typename Phi>
525 template<
typename P,
typename Q,
typename Phi>
538 template<
typename P,
typename Q,
typename Phi,
539 template<
class,
class,
class>
class EOFermActT>
557 template<
typename P,
typename Q,
typename Phi>
561 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.
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 EOFermActT< Phi, P, Q > & getFermAct() const =0
Replace thiw with PrecConstDet.
virtual ~OneFlavorRatExactEOPrecConstDetWilsonTypeFermMonomialT()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
Exact 1 flavor even-odd preconditioned fermact monomial.
virtual const multi1d< Phi > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
virtual ~OneFlavorRatExactEOPrecWilsonTypeFermMonomialT()
virtual destructor:
virtual int getNPF() const =0
Return number of roots in used.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const EOFermActT< Phi, P, Q > & getFermAct() const =0
Get at fermion action.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
virtual Double S_odd_odd(const AbsFieldState< P, Q > &s)
Compute the odd odd contribution (eg.
virtual const RemezCoeff_t & getSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual const RemezCoeff_t & getFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual const GroupXML_t & getActionInvParams(void) const =0
Get inverter params.
virtual multi1d< Phi > & getPhi(void)=0
mutator for pseudofermion
virtual const RemezCoeff_t & getSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
Exact 1 flavor unpreconditioned fermact monomial.
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual const multi1d< Phi > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
~OneFlavorRatExactUnprecWilsonTypeFermMonomial()
virtual destructor:
virtual const RemezCoeff_t & getSPFE() const =0
Return the partial fraction expansion for the action calc.
virtual multi1d< Phi > & getPhi(void)=0
mutator for pseudofermion
virtual const RemezCoeff_t & getFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual const GroupXML_t & getActionInvParams(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.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
Exact 1 flavor fermact monomial using rational polynomials.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual int getNPF() const =0
Return number of roots in used.
virtual Double S_subset(const AbsFieldState< P, Q > &s) const
Compute the action on the appropriate subset.
~OneFlavorRatExactWilsonTypeFermMonomial()
virtual destructor:
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual const multi1d< Phi > & getPhi(void) const =0
Accessor for pseudofermion (read only)
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual const GroupXML_t & getForceInvParams(void) const =0
Get inverter params.
virtual const RemezCoeff_t & getSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
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 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 multi1d< Phi > & getPhi(void)=0
mutator for pseudofermion
virtual const RemezCoeff_t & getFPFE() const =0
Return the partial fraction expansion for the force 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.
virtual MdagMMultiSystemSolverAccumulate< T > * mInvMdagMAcc(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
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.
multi1d< LatticeColorMatrix > P
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::Q Q
push(xml_out,"Condensates")
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Remez algorithm coefficients.
Symmetric even-odd const determinant Wilson-like fermact.
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