7 #ifndef __two_flavor_ratio_conv_rat_monomial5d_w_h__
8 #define __two_flavor_ratio_conv_rat_monomial5d_w_h__
36 template<
typename P,
typename Q,
typename Phi>
54 push(xml_out,
"TwoFlavorExactRatioConvRatWilsonTypeFermMonomial5D");
94 multi1d<Phi> X(FA.
size()), Y(FA.
size());
110 M->deriv(FM, X, Y,
MINUS);
113 M->deriv(F_tmp, Y, X,
PLUS);
151 multi1d<Phi>
eta(
N5);
158 for(
int s=0;
s <
N5; ++
s) {
166 for(
int s=0;
s <
N5; ++
s)
167 eta[
s][M->subset()] *= sqrt(0.5);
170 multi1d<Phi>
tmp(
N5);
187 QDPIO::cout <<
"TwoFlavRatioConvRatWilson5DMonomial: resetting Predictor at end of field refresh" << std::endl;
204 for(
int i=0 ;
i < fm.
getPhi().size();
i++) {
208 catch(std::bad_cast) {
209 QDPIO::cerr <<
"Failed to cast input Monomial to TwoFlavorExactRatioConvRatWilsonTypeFermMonomial5D" << std::endl;
225 virtual const multi1d<Phi>&
getPhi()
const = 0;
277 multi1d<Phi> MPrecDagPhi(FA.
size());
311 template<
typename P,
typename Q,
typename Phi>
325 push(xml_out,
"TwoFlavorExactUnprecRatioConvRatWilsonTypeFermMonomial5D");
334 multi1d<Phi> X(FA_prec.
size());
335 multi1d<Phi>
tmp(FA_prec.
size());
347 QDPIO::cout <<
"TwoFlavRatioConvRatWilson5DMonomial: resetting Predictor before energy calc solve" << std::endl;
356 for(
int s=0;
s < FA_prec.
size(); ++
s)
360 write(xml_out,
"S", action);
371 virtual const multi1d<Phi>&
getPhi()
const = 0;
394 template<
typename P,
typename Q,
typename Phi>
410 push(xml_out,
"S_odd_odd");
422 multi1d<Phi> X(FA.
size());
430 QDPIO::cout <<
"TwoFlavRatioConvRatWilson5DMonomial: resetting Predictor before energy calc solve" << std::endl;
439 for(
int s=0;
s < FA.
size(); ++
s)
440 action += innerProductReal(
getPhi()[
s],
tmp[
s], lin->subset());
444 write(xml_out,
"S_oo", action);
458 push(xml_out,
"TwoFlavorExactEvenOddPrecRatioConvRatWilsonTypeFermMonomial5D");
462 write(xml_out,
"S", action);
479 virtual const multi1d<Phi>&
getPhi()
const = 0;
492 template<
typename P,
typename Q,
typename Phi>
Monomials - gauge action or fermion binlinear contributions for HMC.
Chronological predictor for HMC.
Abstract interface for a Chronological Solution predictor in 5D.
virtual const Q & getQ(void) const =0
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.
Even-odd preconditioned Wilson-like fermion actions including derivatives.
virtual EvenOddPrecLinearOperatorArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const =0
Override to produce an even-odd prec. linear operator for this action.
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 2 degen flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual const EvenOddPrecConstDetWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
virtual const EvenOddPrecConstDetWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
~TwoFlavorExactEvenOddPrecConstDetRatioConvRatWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
Exact 2 degen flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion.
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
~TwoFlavorExactEvenOddPrecRatioConvRatWilsonTypeFermMonomial5D()
virtual destructor:
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)
Exact 2 degen flavor RatioConvRat like fermact monomial in extra dimensions.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion with Pf index i (read only)
virtual int getX(multi1d< Phi > &X, const AbsFieldState< P, Q > &s)
Get (M^dagM)^{-1} phi.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const
Get at fermion action.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual void resetPredictors()
Reset predictors.
virtual const GroupXML_t & getNumerInvParams() const =0
Get parameters for the inverter.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual const RemezCoeff_t & getDenomSIPFE() const =0
Return the partial fraction expansion for the heat-bath.
virtual const RemezCoeff_t & getDenomFPFE() const =0
Return the partial fraction expansion for the force calc.
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion with Pf index i
virtual void refreshInternalFields(const AbsFieldState< P, Q > &field_state)
Refresh pseudofermions.
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
virtual const GroupXML_t & getDenomActionInvParams() const =0
Get inverter params.
~TwoFlavorExactRatioConvRatWilsonTypeFermMonomial5D()
virtual destructor:
virtual const GroupXML_t & getDenomForceInvParams() const =0
Get inverter params.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
virtual const RemezCoeff_t & getDenomSPFE() const =0
Return the partial fraction expansion for the action calc.
Exact 2 degen flavor unpreconditioned fermact monomial living in extra dimensions.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion with Pf index i (read only)
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion with Pf index i
~TwoFlavorExactUnprecRatioConvRatWilsonTypeFermMonomial5D()
virtual destructor:
Unpreconditioned Wilson-like fermion actions in extra dims with derivatives.
Wilson-like fermion actions.
virtual MdagMSystemSolverArray< T > * invMdagM(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return a linear operator solver for this action to solve MdagM*psi=chi.
virtual DiffLinearOperatorArray< T, P, Q > * lMdagM(Handle< FermState< T, P, Q > > state) const
Produce a linear operator M^dag.M for this action.
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.
Handle< LinearOperator< T > > MdagM
multi1d< LatticeColorMatrix > P
Wilson-like fermion actions.
static INTERNAL_PRECISION F