4 #ifndef __TWO_FLAVOR_MULTIHASEN_CANCEL_MONOMIAL_W_H__
5 #define __TWO_FLAVOR_MULTIHASEN_CANCEL_MONOMIAL_W_H__
28 namespace SymEvenOddPrecConstDetTwoFlavorWilsonMultihasenCancelMonomialEnv
34 namespace EvenOddPrecConstDetTwoFlavorWilsonMultihasenCancelMonomialEnv
39 template<
typename T,
typename P,
typename Q,
40 template<
typename,
typename,
typename>
class FAType,
41 template<
typename,
typename,
typename>
class LOType>
75 X[M->subset()] =
zero;
77 QDPIO::cout <<
"TwoFlavWilson4DCancelMonomial: resetting Predictor before energy calc solve" << std::endl;
82 std::istringstream xml(invParam.
xml);
83 XMLReader paramtop(xml);
89 QDPIO::cout<<
"2FlavCancel::invert, n_count = "<<res.
n_count<<std::endl;
92 Double action = innerProductReal(
getPhi(), X, M->subset());
94 write(xml_out,
"S", action);
106 push(xml_out,
"TwoFlavorWilsonTypeMultihasenCancelMonomial");
119 std::istringstream xml(invParam.
xml);
120 XMLReader paramtop(xml);
127 QDPIO::cout <<
"2FlavCancel::invert, n_count = " << res.
n_count << std::endl;
137 diffM.deriv(F_tmp, Y, X,
PLUS);
140 for(
int i=0;
i<
Nd; ++
i){
168 FA.getFermBC().modifyF(
eta);
173 QDPIO::cout <<
"TwoFlavWilson4DCancelMonomial: resetting Predictor after field refresh" << std::endl;
187 catch(std::bad_cast){
188 QDPIO::cerr<<
"Failed to cast input Monomial to PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial "<<std::endl;
226 template<
typename T,
typename P,
typename Q,
227 template<
typename,
typename,
typename>
class FAType,
228 template<
typename,
typename,
typename>
class LOType>
236 XMLReader fermact_reader(is);
237 QDPIO::cout<<__func__<<
": construct "
244 FAType<T,P,Q>* downcast=
dynamic_cast<FAType<T,P,Q>*
>(tmp_act);
247 QDPIO::cerr<<__func__<<
": unable to downcast FermAct"<<std::endl;
260 XMLReader chrono_xml(chrono_is);
265 QDPIO::cerr<<
"Caught Excepthion Reading XML: "<<e<<std::endl;
270 QDPIO::cerr<<
"Failed to create ZeroGuess4DChronoPredictor"<<std::endl;
273 chrono_predictor =
tmp;
Monomials - gauge action or fermion binlinear contributions for HMC.
Primary include file for CHROMA library code.
Abstract interface for a Chronological Solution predictor.
Differentiable Linear Operator.
virtual void deriv(P &ds_u, const T &chi, const T &psi, enum PlusMinus isign) const
Apply the derivative of the operator onto a source std::vector.
Fermionic monomials (binlinears in fermion fields)
Class for counted reference semantics.
An abstract monomial class, for inexact algorithms.
Handle< AbsChronologicalPredictor4D< T > > chrono_predictor
virtual const T & getPhi(void) const
const GroupXML_t & getInvParams(void) const
void operator=(const PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial &)
PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial(const PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial &m)
virtual ~PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial()
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
AbsChronologicalPredictor4D< T > & getMDSolutionPredictor(void)
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
virtual void resetPredictors(void)
Reset predictors.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system... Not specified how to actually do this.
PrecConstDetTwoFlavorWilsonMultihasenCancelMonomial()
Handle< const FAType< T, P, Q > > fermact
const FAType< T, P, Q > & getFermAct(void) const
Get at fermion action for pseudofermion field i.
Wilson-like fermion actions.
Zero initial guess predictor.
Even-odd const determinant Wilson-like fermact.
Even-odd const determinant Wilson-like fermact.
Fermion action factories.
All Wilson-type fermion actions.
Helper function for calculating forces.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void reset()
Reset the default gauge field state.
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")
LinOpSysSolverMGProtoClover::T T
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Symmetric even-odd const determinant Wilson-like fermact.
Symmetric even-odd const determinant Wilson-like fermact.
Hold group xml and type id.
Holds return info from SystemSolver call.
Factory for producing system solvers for MdagM*psi = chi.
multi1d< LatticeColorMatrix > P
Two-flavor monomial params cancel term for multi-Hasenbusch prec.
Zero initial guess predictor.
static INTERNAL_PRECISION F