11 namespace MinimalResidualExtrapolation4DChronoPredictorEnv
20 unsigned int max_chrono = 1;
24 XMLReader paramtop(xml, path);
25 read( paramtop,
"./MaxChrono", max_chrono);
28 QDPIO::cerr <<
"Caught exception reading XML: " << e << std::endl;
59 namespace MinimalResidualExtrapolation5DChronoPredictorEnv
69 unsigned int max_chrono = 1;
73 XMLReader paramtop(xml, path);
74 read( paramtop,
"./MaxChrono", max_chrono);
77 QDPIO::cerr <<
"Caught exception reading XML: " << e << std::endl;
106 multi1d<LatticeFermion>&
psi,
108 const multi1d<LatticeFermion>&
chi)
116 QDPIO::cout <<
"MRE Predictor: Zero vectors stored. Giving you zero guess" << std::endl;
122 QDPIO::cout <<
"MRE Predictor: Only 1 std::vector stored. Giving you last solution " << std::endl;
128 QDPIO::cout <<
"MRE Predictor: Finding extrapolation with "<< Nvec <<
" vectors" << std::endl;
140 multi1d<LatticeFermion>&
psi,
142 const multi1d<LatticeFermion>&
chi)
146 const Subset&
s=
A.subset();
154 multi2d<LatticeFermion> v(Nvec,
N5);
156 for(
int i=0;
i < Nvec;
i++) {
158 for(
int d5=0; d5 <
N5; d5++) {
163 multi1d<LatticeFermion> tmpvec(
N5);
169 for(
int d5=0; d5 <
N5; d5++) {
170 v[
i][d5][
s] = tmpvec[d5];
184 for(
int d5=0; d5 <
N5; d5++) {
185 v[
i][d5][
s] = tmpvec[d5];
193 for(
int d5=1; d5 <
N5; d5++) {
194 norm += norm2(v[
i][d5],
s);
201 for(
int d5=0; d5 <
N5; d5++) {
202 v[
i][d5][
s] /= root_norm;
209 multi2d<DComplex>
G(Nvec,Nvec);
211 for(
int m = 0 ;
m < Nvec;
m++) {
212 multi1d<LatticeFermion> tmpvec(
N5);
218 for(
int n = 0;
n < Nvec;
n++) {
222 for(
int d5=1; d5 <
N5; d5++) {
230 multi1d<DComplex>
b(Nvec);
232 for(
int n = 0;
n < Nvec;
n++) {
236 for(
int d5=1; d5 <
N5; d5++) {
244 multi1d<DComplex>
a(Nvec);
250 multi1d<DComplex> Ga(Nvec);
253 for(
int i=0;
i < Nvec;
i++) {
255 for(
int j=1;
j < Nvec;
j++) {
260 multi1d<DComplex>
r(Nvec);
261 for(
int i=0;
i < Nvec;
i++) {
265 QDPIO::cout <<
"Constraint Eq Solution Check" << std::endl;
266 for(
int i=0;
i < Nvec;
i++) {
267 QDPIO::cout <<
" r[ " <<
i <<
"] = " <<
r[
i] << std::endl;
274 for(
int d5=0; d5 <
N5; d5++) {
275 psi[d5][
s] = Complex(
a[0])*v[0][d5];
278 for(
int n=1;
n < Nvec;
n++) {
279 psi[d5][
s] += Complex(
a[
n])*v[
n][d5];
Primary include file for CHROMA library code.
Linear Operator to arrays.
Gramm-Schmidt orthogonolization.
Gramm-Schmidt orthogonolization.
void GramSchmArray(multi2d< LatticeFermion > &psi, const int Npsi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
Gramm-Schmidt orthogonolization.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void LUSolve(multi1d< DComplex > &a, const multi2d< DComplex > &M, const multi1d< DComplex > &b)
Solve M a = b by LU decomposition with partial pivoting.
static bool registered
Local registration flag.
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
multi1d< LatticeColorMatrix > G
Asqtad Staggered-Dirac operator.
multi1d< LatticeFermion > chi(Ncb)
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double