7 #ifndef __two_flavor_monomial_w_h__
8 #define __two_flavor_monomial_w_h__
34 template<
typename P,
typename Q,
typename Phi>
52 push(xml_out,
"TwoFlavorExactWilsonTypeFermMonomial");
88 QDPIO::cout <<
"2Flav::invert, n_count = " << res.
n_count << std::endl;
101 M->deriv(F_tmp, Y, X,
PLUS);
104 for(
int mu=0;
mu <
F.size(); ++
mu)
141 S_f.getFermBC().modifyF(
eta);
149 QDPIO::cout <<
"TwoFlavWilson4DMonomial: resetting Predictor after field refresh" << std::endl;
165 catch(std::bad_cast) {
166 QDPIO::cerr <<
"Failed to cast input Monomial to TwoFlavorExactWilsonTypeFermMonomial " << std::endl;
181 virtual const Phi&
getPhi(
void)
const = 0;
206 template<
typename P,
typename Q,
typename Phi>
220 push(xml_out,
"TwoFlavorExactUnprecWilsonTypeFermMonomial");
235 QDPIO::cout <<
"TwoFlavWilson4DMonomial: resetting Predictor before energy calc solve" << std::endl;
240 QDPIO::cout <<
"2Flav::invert, n_count = " << res.
n_count << std::endl;
246 write(xml_out,
"S", action);
257 virtual const Phi&
getPhi(
void)
const = 0;
280 template<
typename P,
typename Q,
typename Phi,
template <
class,
class,
class>
class EOFermActT,
281 template <
class,
class,
class>
class EOLinOpT>
297 push(xml_out,
"S_odd_odd");
312 X[ M->subset() ] =
zero;
315 QDPIO::cout <<
"TwoFlavWilson4DMonomial: resetting Predictor before energy calc solve" << std::endl;
320 QDPIO::cout <<
"2Flav::invert, n_count = " << res.
n_count << std::endl;
323 Double action = innerProductReal(
getPhi(), X, M->subset());
326 write(xml_out,
"S_oo", action);
340 push(xml_out,
"TwoFlavorExactEvenOddPrecWilsonTypeFermMonomial");
344 write(xml_out,
"S", action);
360 virtual const Phi&
getPhi(
void)
const = 0;
368 template<
typename P,
typename Q,
typename Phi>
372 template<
typename P,
typename Q,
typename Phi>
383 template<
typename P,
typename Q,
typename Phi,
384 template<
class,
class,
class>
class EOFermActT,
385 template<
class,
class,
class>
class EOLinOpT>
407 template<
typename P,
typename Q,
typename Phi>
411 template<
typename P,
typename Q,
typename Phi>
422 template<
typename P,
typename Q,
typename Phi,
423 template<
class,
class,
class>
class EOFermActT,
424 template<
class,
class,
class>
class EOLinOpT>
445 push(xml_out,
"S_even_even");
446 write(xml_out,
"S_ee", S_ee);
460 push(xml_out,
"TwoFlavorExactEvenOddPrecLogDetWilsonTypeFermMonomial");
466 Double action = S_ee + S_oo;
468 write(xml_out,
"S", action);
484 push(xml_out,
"TwoFlavorExactEvenOddPrecLogDetWilsonTypeFermMonomial");
521 QDPIO::cout <<
"2Flav::invert, n_count = " << res.
n_count << std::endl;
533 M->deriv(F_tmp, Y, X,
PLUS);
536 for(
int mu=0;
mu <
F.size(); ++
mu) {
541 M->derivLogDetEvenEvenLinOp(F_tmp,
PLUS);
543 F[
mu] += Real(-2)*F_tmp[
mu];
557 virtual const Phi&
getPhi(
void)
const = 0;
573 template<
typename P,
typename Q,
typename Phi>
578 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.
virtual const Q & getQ(void) const =0
virtual DiffLinearOperator< T, Q, P > * linOp(Handle< FermState< T, P, Q > > state) const =0
Produce a linear operator for this action.
Even-odd preconditioned linear operator.
Even-odd preconditioned Wilson-like fermion action, specialised to clover like (gauge dependent diago...
Fermionic monomials (binlinears in fermion fields)
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.
Even-odd preconditioned linear operator.
Symmetric even-odd preconditioned Wilson-like fermion action, specialised to clover like (gauge depen...
Exact 2 degen flavor even-odd preconditioned fermact monomial.
virtual const EOFermActT< Phi, P, Q > & getFermAct() const =0
Get at fermion action For now the prototype is the same as before – wait until we refactor these befo...
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution (eg For this kind of Monomial it is 0)
virtual ~TwoFlavorExactEOPrecConstDetWilsonTypeFermMonomialT()
virtual destructor:
Exact 2 degen flavor even-odd preconditioned fermact monomial.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)
Even even contribution.
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual const GroupXML_t & getInvParams(void) const =0
Get inverter params.
virtual ~TwoFlavorExactEOPrecLogDetWilsonTypeFermMonomialT()
virtual destructor:
virtual const EOFermActT< Phi, P, Q > & getFermAct() const =0
Get at fermion action For now the prototype is the same as before – wait until we refactor these befo...
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual AbsChronologicalPredictor4D< Phi > & getMDSolutionPredictor(void)=0
Get the initial guess predictor.
virtual const Phi & getPhi(void) const =0
Accessor for pseudofermion with Pf index i (read only)
virtual Phi & getPhi(void)=0
mutator for pseudofermion with Pf index i
Exact 2 degen flavor even-odd preconditioned fermact monomial.
virtual AbsChronologicalPredictor4D< Phi > & getMDSolutionPredictor(void)=0
Get the initial guess predictor.
virtual Phi & getPhi(void)=0
mutator for pseudofermion with Pf index i
virtual ~TwoFlavorExactEOPrecWilsonTypeFermMonomialT()
virtual destructor:
virtual Double S_odd_odd(const AbsFieldState< P, Q > &s)
Compute the odd odd contribution (eg.
virtual const EOFermActT< Phi, P, Q > & getFermAct() const =0
Get at fermion action.
Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
virtual const GroupXML_t & getInvParams(void) const =0
Get inverter params.
virtual Double S_even_even(const AbsFieldState< P, Q > &s)=0
Even even contribution (eg ln det Clover)
virtual const Phi & getPhi(void) const =0
Accessor for pseudofermion with Pf index i (read only)
Exact 2 degen flavor unpreconditioned fermact monomial.
virtual Phi & getPhi(void)=0
mutator for pseudofermion with Pf index i
virtual const Phi & getPhi(void) const =0
Accessor for pseudofermion with Pf index i (read only)
virtual AbsChronologicalPredictor4D< Phi > & getMDSolutionPredictor(void)=0
Get at the chronological predcitor.
virtual const GroupXML_t & getInvParams(void) const =0
Get inverter params.
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual Double S(const AbsFieldState< P, Q > &s)
Compute the total action.
~TwoFlavorExactUnprecWilsonTypeFermMonomial()
virtual destructor:
Exact 2 degen flavor fermact monomial.
virtual const Phi & getPhi(void) const =0
Accessor for pseudofermion with Pf index i (read only)
virtual void dsdq(P &F, const AbsFieldState< P, Q > &s)
Compute dsdq for the system...
virtual Phi & getPhi(void)=0
mutator for pseudofermion with Pf index i
virtual void resetPredictors(void)
Reset predictors.
virtual AbsChronologicalPredictor4D< Phi > & getMDSolutionPredictor(void)=0
Get the initial guess predictor.
~TwoFlavorExactWilsonTypeFermMonomial()
virtual destructor:
virtual void refreshInternalFields(const AbsFieldState< P, Q > &field_state)
Refresh pseudofermions.
virtual const WilsonTypeFermAct< Phi, P, Q > & getFermAct(void) const =0
Get at fermion action.
virtual void setInternalFields(const Monomial< P, Q > &m)
Copy pseudofermions if any.
virtual const GroupXML_t & getInvParams(void) const =0
Get inverter params.
virtual Double S(const AbsFieldState< P, Q > &s)=0
Compute the total action.
Wilson-like fermion actions.
virtual MdagMSystemSolver< 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.
Even-odd const determinant Wilson-like fermact.
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 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")
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
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.
multi1d< LatticeColorMatrix > P
Wilson-like fermion actions.
static INTERNAL_PRECISION F