15 #include "lattice/solver.h"
16 #include "lattice/fgmres_common.h"
17 #include "lattice/qphix/invfgmres_qphix.h"
18 #include "lattice/qphix/qphix_qdp_utils.h"
19 #include "lattice/qphix/qphix_clover_linear_operator.h"
27 namespace LinOpSysSolverMGProtoQPhiXCloverEnv
45 Handle<
FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >
state,
88 QDPIO::cout <<
"Jolly Greetings from Multigridland" << std::endl;
100 QDPIO::cout <<
"MG Preconditioner not found in Named Obj. Creating" << std::endl;
110 MG::FGMRESParams fine_solve_params;
116 std::shared_ptr<MG::QPhiXWilsonCloverLinearOperator > M_ptr = (mg_pointer->M);
118 const LatticeInfo&
info = M_ptr->GetInfo();
119 QPhiXSpinor qphix_in(
info);
120 QPhiXSpinor qphix_out(
info);
122 MG::FGMRESSolverQPhiX FGMRESOuter(*M_ptr, fine_solve_params, (mg_pointer->v_cycle).get());
125 QDPSpinorToQPhiXSpinor(
chi,qphix_in);
130 MG::LinearSolverResults res=FGMRESOuter(qphix_out,qphix_in, RELATIVE);
133 QPhiXSpinorToQDPSpinor(qphix_out,
psi);
142 QDPIO::cout <<
"MG_PROTO_CLOVER_INVERTER: iters = "<< res.n_count <<
" rel resid = " << sqrt(n2rel) << std::endl;
149 throw convergence_fail;
154 QDPIO::cout <<
"MG_PROTO_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.
Handle< LinearOperator< T > > A
~LinOpSysSolverMGProtoQPhiXClover()
SystemSolverResults_t operator()(T &psi, const T &chi) const
Solve It!
Handle< FermState< T, Q, Q > > state
MGProtoSolverParams invParam
const Subset & subset() const
Return the subset on which the operator acts.
Class for counted reference semantics.
static bool registered
Local registration flag.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
LinOpSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
void createMGPreconditioner(const MGProtoSolverParams ¶ms, const multi1d< LatticeColorMatrix > &u)
shared_ptr< MGPreconditioner > getMGPreconditioner(const std::string &subspaceId)
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
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