7 #include "qdp_config.h"
23 template<
typename T,
typename P,
typename Q,
template <
typename,
typename,
typename>
class L>
24 class CentralPrecTimeFermActQprop :
public SystemSolver<T>
32 CentralPrecTimeFermActQprop(Handle< L<T,P,Q> > A_,
33 Handle< LinOpSystemSolver<T> > invA_) :
A(A_), invA(invA_)
37 ~CentralPrecTimeFermActQprop() {}
40 const Subset& subset()
const {
return all;}
61 QDPIO::cout <<
"Preparing LinOp" << std::endl;
69 QDPIO::cout <<
"Solving" << std::endl;
70 SystemSolverResults_t res = (*invA)(psi_prime, chi_prime);
73 QDPIO::cout <<
"Reconstructing" << std::endl;
75 A->cRightLinOp(
psi, psi_prime,
PLUS);
82 res.resid = sqrt(norm2(
r));
92 CentralPrecTimeFermActQprop() {}
95 Handle< LinOpSystemSolver<T> > invA;
98 template<
typename T,
typename P,
typename Q,
template <
typename,
typename,
typename>
class L>
99 class Central2PrecTimeFermActQprop :
public SystemSolver<T>
107 Central2PrecTimeFermActQprop(Handle< L<T,P,Q> > A_,
108 Handle< LinOpSystemSolver<T> > invA_) :
A(A_), invA(invA_)
112 ~Central2PrecTimeFermActQprop() {}
115 const Subset& subset()
const {
return all;}
136 QDPIO::cout <<
"Preparing LinOp" << std::endl;
144 QDPIO::cout <<
"Solving" << std::endl;
145 SystemSolverResults_t res = (*invA)(psi_prime, chi_prime);
148 QDPIO::cout <<
"Reconstructing" << std::endl;
150 A->rightLinOp(
psi, psi_prime,
PLUS);
157 res.resid = sqrt(norm2(
r));
167 Central2PrecTimeFermActQprop() {}
169 Handle< L<T,P,Q> >
A;
170 Handle< LinOpSystemSolver<T> > invA;
174 typedef LatticeFermion
LF;
175 typedef multi1d<LatticeColorMatrix>
LCM;
181 const GroupXML_t& invParam)
const
183 return new CentralPrecTimeFermActQprop<LF,LCM,LCM,UnprecSpaceCentralPrecTimeLinearOperator>(Handle< UnprecSpaceCentralPrecTimeLinearOperator<LF,LCM,LCM> >((*this).linOp(
state)),
184 Handle< LinOpSystemSolver<LF> >((*this).invLinOp(
state,invParam)));
190 const GroupXML_t& invParam)
const
192 return new CentralPrecTimeFermActQprop<LF,LCM,LCM,ILUPrecSpaceCentralPrecTimeLinearOperator>(Handle< ILUPrecSpaceCentralPrecTimeLinearOperator<LF,LCM,LCM> >((*this).linOp(
state)),
193 Handle< LinOpSystemSolver<LF> >((*this).invLinOp(
state,invParam)));
200 const GroupXML_t& invParam)
const
202 return new Central2PrecTimeFermActQprop<LF,LCM,LCM,ILU2PrecSpaceCentralPrecTimeLinearOperator>(Handle< ILU2PrecSpaceCentralPrecTimeLinearOperator<LF,LCM,LCM> >((*this).linOp(
state)),
203 Handle< LinOpSystemSolver<LF> >((*this).invLinOp(
state,invParam)));
211 template<
typename T,
typename P,
typename Q,
template <
typename,
typename,
typename>
class L>
212 class EO3DPrecCentralPrecTimeFermActQprop :
public SystemSolver<T>
220 EO3DPrecCentralPrecTimeFermActQprop(Handle< L<T,P,Q> > A_,
221 Handle< LinOpSystemSolver<T> > invA_) :
A(A_), invA(invA_)
225 ~EO3DPrecCentralPrecTimeFermActQprop() {}
228 const Subset& subset()
const {
return all;}
249 A->cLeftLinOp(chi_prime,
chi,
PLUS,0);
250 A->cLeftLinOp(chi_prime,
chi,
PLUS,1);
255 A->evenEvenInvLinOp(tmp1, chi_prime,
PLUS);
257 chi_prime[rb3[1]] -=
tmp2;
262 QDPIO::cout <<
"Solving" << std::endl;
263 SystemSolverResults_t res = (*invA)(psi_prime, chi_prime);
264 A->evenEvenInvLinOp(psi_prime, chi_prime,
PLUS);
266 QDPIO::cout <<
"Reconstructing" << std::endl;
270 A->evenOddLinOp(tmp1, psi_prime,
PLUS);
272 psi_prime[rb3[0]] -=
tmp2;
275 A->cRightLinOp(
psi, psi_prime,
PLUS,0);
276 A->cRightLinOp(
psi, psi_prime,
PLUS,1);
283 res.resid = sqrt(norm2(
r));
293 EO3DPrecCentralPrecTimeFermActQprop() {}
295 Handle< L<T,P,Q> >
A;
296 Handle< LinOpSystemSolver<T> > invA;
302 const GroupXML_t& invParam)
const
304 return new EO3DPrecCentralPrecTimeFermActQprop<LF,LCM,LCM,EO3DPrecSpaceCentralPrecTimeLinearOperator>(Handle< EO3DPrecSpaceCentralPrecTimeLinearOperator<LF,LCM,LCM> >((*this).linOp(
state)),
305 Handle< LinOpSystemSolver<LF> >((*this).invLinOp(
state,invParam)));
virtual SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return quark prop solver, solution of unpreconditioned system.
virtual SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return quark prop solver, solution of unpreconditioned system.
virtual SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return quark prop solver, solution of unpreconditioned system.
virtual SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return quark prop solver, solution of unpreconditioned system.
ILUPreconditioned spatial Preconditioned Temporal Wilson like fermion action.
ILUPreconditioned spatial Preconditioned Temporal Wilson like fermion action.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
multi1d< LatticeFermion > chi(Ncb)
LatticeStaggeredFermion LF
multi1d< LatticeColorMatrix > LCM
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Unpreconditioned spatial Preconditioned Temporal Wilson like fermion action.