8 #ifndef __mre_shifted_predictor_h__
9 #define __mre_shifted_predictor_h__
21 namespace MinimalResidualExtrapolationShifted4DChronoPredictorEnv
29 template<
typename T,
typename R>
47 const Subset&
s=
M.subset();
75 multi2d<DComplex>
G(Nvec,Nvec);
76 multi1d<DComplex>
b(Nvec);
78 for(
int m = 0 ;
m < Nvec;
m++) {
85 for(
int n = 0;
n < Nvec;
n++) {
89 DComplex dcshift(shift);
98 multi1d<DComplex>
a(Nvec);
104 multi1d<DComplex> Ga(Nvec);
106 for(
int i=0;
i < Nvec;
i++) {
108 for(
int j=1;
j < Nvec;
j++) {
113 multi1d<DComplex>
r(Nvec);
114 for(
int i=0;
i < Nvec;
i++) {
119 QDPIO::cout <<
"Constraint Eq Solution Check" << std::endl;
120 for(
int i=0;
i < Nvec;
i++) {
121 QDPIO::cout <<
" r[ " <<
i <<
"] = " <<
r[
i] << std::endl;
129 psi[
s] += Complex(
a[0])*v;
130 for(
int n=1;
n < Nvec;
n++) {
132 psi[
s] += Complex(
a[
n])*v;
145 Double norm_r = sqrt(norm2(rvec,
s));
147 QDPIO::cout <<
"MRE Predictor: after prediction || r || / || b || =" << norm_r/norm_chi << std::endl;
185 QDPIO::cout <<
"MRE Predictor: Only 1 std::vector stored. Giving you last solution " << std::endl;
192 QDPIO::cout <<
"MRE Predictor: Finding X extrapolation with "<< Nvec <<
" vectors" << std::endl;
202 QDPIO::cout <<
"MRE_PREDICT_X_TIME = " << swatch.getTimeInSeconds() <<
" s" << std::endl;
224 QDPIO::cout <<
"MREPredictor: number of X vectors stored is = " <<
chrono_buf->size() << std::endl;
234 const Subset&
s =
M.subset();
243 QDPIO::cout <<
"MREPredictor: number of X vectors stored is = " <<
chrono_buf->size() << std::endl;
Primary include file for CHROMA library code.
Chronological predictor for HMC.
Class for counted reference semantics.
void LUSolve(multi1d< DComplex > &a, const multi2d< DComplex > &M, const multi1d< DComplex > &b)
Solve M a = b by LU decomposition with partial pivoting.
Class for counted reference semantics.
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
multi1d< LatticeColorMatrix > G
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double