7 #ifndef __two_flavor_ratio_conv_conv_monomial5d_w_h__
8 #define __two_flavor_ratio_conv_conv_monomial5d_w_h__
33 template<
typename P,
typename Q,
typename Phi>
51 push(xml_out,
"TwoFlavorExactRatioConvConvWilsonTypeFermMonomial5D");
91 multi1d<Phi> X(FA.
size()), Y(FA.
size());
107 M->deriv(FM, X, Y,
MINUS);
110 M->deriv(F_tmp, Y, X,
PLUS);
148 multi1d<Phi>
eta(
N5);
155 for(
int s=0;
s <
N5; ++
s) {
163 for(
int s=0;
s <
N5; ++
s)
164 eta[
s][M->subset()] *= sqrt(0.5);
167 multi1d<Phi>
tmp(
N5);
184 QDPIO::cout <<
"TwoFlavRatioConvConvWilson5DMonomial: resetting Predictor at end of field refresh" << std::endl;
201 for(
int i=0 ;
i < fm.
getPhi().size();
i++) {
205 catch(std::bad_cast) {
206 QDPIO::cerr <<
"Failed to cast input Monomial to TwoFlavorExactRatioConvConvWilsonTypeFermMonomial5D" << std::endl;
222 virtual const multi1d<Phi>&
getPhi()
const = 0;
260 multi1d<Phi> MPrecDagPhi(FA.
size());
294 template<
typename P,
typename Q,
typename Phi>
308 push(xml_out,
"TwoFlavorExactUnprecRatioConvConvWilsonTypeFermMonomial5D");
317 multi1d<Phi> X(FA_prec.
size());
318 multi1d<Phi>
tmp(FA_prec.
size());
330 QDPIO::cout <<
"TwoFlavRatioConvConvWilson5DMonomial: resetting Predictor before energy calc solve" << std::endl;
339 for(
int s=0;
s < FA_prec.
size(); ++
s)
343 write(xml_out,
"S", action);
354 virtual const multi1d<Phi>&
getPhi()
const = 0;
380 template<
typename P,
typename Q,
typename Phi>
396 push(xml_out,
"S_odd_odd");
408 multi1d<Phi> X(FA.
size());
416 QDPIO::cout <<
"TwoFlavRatioConvConvWilson5DMonomial: resetting Predictor before energy calc solve" << std::endl;
425 for(
int s=0;
s < FA.
size(); ++
s)
426 action += innerProductReal(
getPhi()[
s],
tmp[
s], lin->subset());
430 write(xml_out,
"S_oo", action);
444 push(xml_out,
"TwoFlavorExactEvenOddPrecRatioConvConvWilsonTypeFermMonomial5D");
448 write(xml_out,
"S", action);
470 virtual const multi1d<Phi>&
getPhi()
const = 0;
483 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.
~TwoFlavorExactEvenOddPrecConstDetRatioConvConvWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg ln det Clover)
virtual const EvenOddPrecConstDetWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const EvenOddPrecConstDetWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
Exact 2 degen flavor even-odd preconditioned fermact monomial living in extra dimensions.
virtual const GroupXML_t getNumerInvParams() const =0
Get inverter params.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion with Pf index i
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion with Pf index i (read only)
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion 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)
~TwoFlavorExactEvenOddPrecRatioConvConvWilsonTypeFermMonomial5D()
virtual destructor:
virtual const EvenOddPrecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
Exact 2 degen flavor RatioConvConv like fermact monomial in extra dimensions.
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion with Pf index i (read only)
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion with Pf index i
virtual const WilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() 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 const WilsonTypeFermAct5D< Phi, P, Q > & getFermAct() const
Get at fermion action.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &field_state)
Refresh pseudofermions.
~TwoFlavorExactRatioConvConvWilsonTypeFermMonomial5D()
virtual destructor:
virtual int getX(multi1d< Phi > &X, const AbsFieldState< P, Q > &s)
Get (M^dagM)^{-1} phi.
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual void resetPredictors()
Reset predictors.
virtual const GroupXML_t getNumerInvParams() const =0
Get inverter params.
Exact 2 degen flavor unpreconditioned fermact monomial living in extra dimensions.
virtual const multi1d< Phi > & getPhi() const =0
Accessor for pseudofermion with Pf index i (read only)
~TwoFlavorExactUnprecRatioConvConvWilsonTypeFermMonomial5D()
virtual destructor:
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual multi1d< Phi > & getPhi()=0
mutator for pseudofermion with Pf index i
virtual AbsChronologicalPredictor5D< Phi > & getMDSolutionPredictor()=0
Get the initial guess predictor.
virtual const GroupXML_t getNumerInvParams() const =0
Get inverter params.
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getDenomFermAct() const =0
Get at fermion action.
virtual const UnprecWilsonTypeFermAct5D< Phi, P, Q > & getNumerFermAct() const =0
Get at fermion action.
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
Hold group xml and type id.
Holds return info from SystemSolver call.
Handle< LinearOperator< T > > MdagM
multi1d< LatticeColorMatrix > P
Wilson-like fermion actions.
static INTERNAL_PRECISION F