6 #ifndef __TWO_FLAVOR_RATIO_CONV_CONV_MULTIHASEN_MONOMIAL_W_H__
7 #define __TWO_FLAVOR_RATIO_CONV_CONV_MULTIHASEN_MONOMIAL_W_H__
31 namespace SymEvenOddPrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomialEnv
37 namespace EvenOddPrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomialEnv
42 template<
typename T,
typename P,
typename Q,
43 template<
typename,
typename,
typename>
class FAType,
44 template<
typename,
typename,
typename>
class LOType>
57 push(xml_out,
"PrecConstDetTwoFlavorRatioConvConvMultihasenFermMonomial");
75 X[M->subset()] =
zero;
78 "TwoFlavorRatioConvConvMultihasenWilson4DMonomial: resetting Predictor before energy calc solve" << std::endl;
83 XMLReader paramtop(xml);
95 (*M_prec)(phi_tmp, X,
PLUS);
96 Double action = innerProductReal(
getPhi(
i), phi_tmp, M->subset());
99 std::string s_action =
"S_hasenterm_" + std::to_string(
i+1);
102 write(xml_out, s_action, action);
117 push(xml_out,
"TwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomial");
124 for(
int i=0;
i<
Nd; ++
i)
150 XMLReader paramtop(xml);
167 diffM.deriv(F_tmp, X, Y,
MINUS);
171 diffM.deriv(F_tmp, Y, X,
PLUS);
187 std::string force =
"Forces_hasenterm_" + std::to_string(
i+1);
214 FA.getFermBC().modifyF(
eta);
235 XMLReader paramtop(xml);
243 QDPIO::cout<<
"TwoFlavRatioConvConvMultihasenWilson4DMonomial: resetting Predictor at end of field refresh"<<std::endl;
246 std::string field_refrs =
"FieldRefreshment_"+std::to_string(
i);
248 push(xml_out, field_refrs);
263 }
catch(std::bad_cast){
264 QDPIO::cerr<<
"Failed to cast input Monomial to PrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomial"
326 template<
typename T,
typename P,
typename Q,
327 template<
typename,
typename,
typename>
class FAType,
328 template<
typename,
typename,
typename>
class LOType>
334 QDPIO::cout <<
"Constructor: " << __func__ << std::endl;
337 QDPIO::cerr <<
"Fermact inverter params are NULL" << std::endl;
346 XMLReader fermact_reader(is);
354 FAType<T,P,Q>* downcast=
dynamic_cast<FAType<T,P,Q>*
>(tmp_act);
357 if( downcast == 0x0 )
359 QDPIO::cerr << __func__ <<
": unable to downcast FermAct" << std::endl;
369 mu.resize(numHasenTerms+1);
370 for(
int i=0;
i< numHasenTerms+1; ++
i){
375 phi.resize(numHasenTerms);
376 for(
int i=0;
i<numHasenTerms; ++
i)
388 XMLReader chrono_xml(chrono_is);
393 QDPIO::cerr <<
"Caught Exception Reading XML: " << e << std::endl;
398 QDPIO::cerr <<
"Failed to create the 4D ChronoPredictor" << std::endl;
401 chrono_predictor =
tmp;
404 QDPIO::cout <<
"Finished constructing: " << __func__ << std::endl;
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.
void operator=(const PrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomial &)
virtual const T & getPhi(void) const
int getNumHasenTerms() const
void resetPredictors()
Reset predictors.
AbsChronologicalPredictor4D< T > & getMDSolutionPredictor()
const GroupXML_t & getInvParams() const
Get parameters for the inverter.
const FAType< T, P, Q > & getFermAct() const
Get at fermion action for pseudofermion field i.
Handle< AbsChronologicalPredictor4D< T > > chrono_predictor
PrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomial()
virtual ~PrecConstDetTwoFlavorRatioConvConvMultihasenWilsonTypeFermMonomial()
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system... Not specified how to actually do this.
virtual const T & getPhi(int i) const
Handle< const FAType< T, P, Q > > fermact
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual void refreshInternalFields(const AbsFieldState< P, Q > &s)
Refresh pseudofermions.
virtual T & getPhi(int 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.
bool registerAll()
Register all the factories.
multi1d< LatticeColorMatrix > P
bool registerAll()
Register all the factories.
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.
CompActionInv_t fermactInv
Factory for producing system solvers for MdagM*psi = chi.
multi1d< LatticeColorMatrix > P
Two flavor Monomials - gauge action or fermion binlinear contributions for HMC.
Two-flavor RatioConvConv monomial params.
Zero initial guess predictor.
static INTERNAL_PRECISION F