14 #include "lattice/qphix/qphix_blas_wrappers.h"
21 namespace LinOpSysSolverMGProtoQPhiXEOCloverEnv
39 Handle<
FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >
state,
69 A(A_),
state(state_), invParam(invParam_), subspaceId(invParam_.SubspaceId) {
74 QDPIO::cout <<
"EO MG Preconditioner not found in Named Obj. Creating" << std::endl;
86 MG::FGMRESParams fine_solve_params;
93 using EoFGMRES =
const MG::FGMRESSolverQPhiX;
114 QDPIO::cout <<
"Jolly Greetings from Even-Odd Multigridland" << std::endl;
115 const Subset&
s =
A->subset();
123 QDPIO::cout <<
"DEBUG: Norm2 Chi Before=" << norm2(
chi,
s) << std::endl;
124 const LatticeInfo&
info =
M_ptr->GetInfo();
125 QPhiXSpinor qphix_in(
info);
126 QPhiXSpinor qphix_out(
info);
130 using UnprecFGMRES = MG::UnprecFGMRESSolverQPhiXWrapper;
133 using EoFGMRES =
const MG::FGMRESSolverQPhiX;
140 QDPSpinorToQPhiXSpinor(
chi,qphix_in);
141 ZeroVec(qphix_out,SUBSET_ALL);
146 MG::LinearSolverResults res=(*eo_solver)(qphix_out,qphix_in, RELATIVE);
150 double qphix_out_norm_cb0 = MG::Norm2Vec(qphix_out, SUBSET_EVEN);
151 double qphix_out_norm_cb1 = MG::Norm2Vec(qphix_out, SUBSET_ODD);
154 QPhiXSpinorToQDPSpinor(qphix_out,
psi);
159 QDPIO::cout <<
"DEBUG: After solve Norm2 chi = " << chi_norm_after << std::endl;
160 QDPIO::cout <<
"DEBUG: Norm2 qphix_out_cb_0 = " << qphix_out_norm_cb0 <<
" Norm psi[0]="<< psi_norm_cb0 << std::endl;
161 QDPIO::cout <<
"DEBUG: Norm2 qphix_out_cb_1 = " << qphix_out_norm_cb1 <<
" Norm psi[1]="<< psi_norm_cb1 << std::endl;
172 QDPIO::cout <<
"MG_PROTO_QPHIX_EO_CLOVER_INVERTER: iters = "<< res.n_count <<
" rel resid = " << sqrt(n2rel) << std::endl;
179 throw convergence_fail;
184 QDPIO::cout <<
"MG_PROTO_QPHIX_EO_CLOVER_INVERTER_TIME: call_time = "<< swatch2.getTimeInSeconds() <<
" sec. total_time=" << swatch.getTimeInSeconds() <<
" sec." << std::endl;
Primary include file for CHROMA library code.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
~LinOpSysSolverMGProtoQPhiXEOClover()
Handle< LinearOperator< T > > A
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solve It!
MGProtoSolverParams invParam
const Subset & subset() const
Return the subset on which the operator acts.
std::shared_ptr< MGProtoHelpersQPhiX::MGPreconditionerEO > mg_pointer
std::shared_ptr< MG::QPhiXWilsonCloverEOLinearOperator > M_ptr
const std::string & subspaceId
std::shared_ptr< EoFGMRES > eo_solver
MG::UnprecFGMRESSolverQPhiXWrapper UnprecFGMRES
Handle< FermState< T, Q, Q > > state
std::shared_ptr< UnprecFGMRES > wrapped
Class for counted reference semantics.
static bool registered
Local registration flag.
const std::string name
Name to be used.
LinOpSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
bool registerAll()
Register all the factories.
shared_ptr< MGPreconditionerEO > getMGPreconditionerEO(const std::string &subspaceId)
void createMGPreconditionerEO(const MGProtoSolverParams ¶ms, const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
const MG::FGMRESSolverQPhiX EoFGMRES
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Support class for fermion actions and linear operators.
Double OuterSolverRsdTarget
Chroma::CloverFermActParams CloverParams
Holds return info from SystemSolver call.
Factory for solving M*psi=chi where M is not hermitian or pos. def.
multi1d< LatticeColorMatrix > Q