1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-08-08 07:27:06 +01:00

Adding simple lanczos, boundary to specflow(!)

This commit is contained in:
Chulwoo Jung
2025-08-06 23:41:53 +00:00
parent 2bf9179d2c
commit 7780d88d26
4 changed files with 950 additions and 5 deletions

View File

@@ -61,7 +61,8 @@ int main(int argc, char** argv) {
RNG5.SeedFixedIntegers(seeds5);
LatticeGaugeField Umu(UGrid);
SU<Nc>::HotConfiguration(RNG4, Umu);
// SU<Nc>::HotConfiguration(RNG4, Umu);
SU<Nc>::ColdConfiguration(Umu);
/*
std::vector<LatticeColourMatrix> U(4, UGrid);
@@ -69,9 +70,15 @@ int main(int argc, char** argv) {
U[mu] = PeekIndex<LorentzIndex>(Umu, mu);
}
*/
// std::vector<Complex> boundary = {1,1,1,-1};
std::vector<Complex> boundary = {1,1,1,1};
FermionOp::ImplParams Params(boundary);
RealD mass = -0.1;
FermionOp WilsonOperator(Umu,*FGrid,*FrbGrid,mass);
RealD mass = 0.0;
// FermionOp WilsonOperator(Umu,*FGrid,*FrbGrid,mass);
FermionOp WilsonOperator(Umu,*FGrid,*FrbGrid,mass,Params);
MdagMLinearOperator<FermionOp,LatticeFermion> HermOp(WilsonOperator); /// <-----
//SchurDiagTwoOperator<FermionOp,FermionField> HermOp(WilsonOperator);
@@ -89,7 +96,8 @@ int main(int argc, char** argv) {
FunctionHermOp<FermionField> OpCheby(Cheby,HermOp);
PlainHermOp<FermionField> Op (HermOp);
ImplicitlyRestartedLanczos<FermionField> IRL(OpCheby, Op, Nstop, Nk, Nm, resid, MaxIt);
// ImplicitlyRestartedLanczos<FermionField> IRL(OpCheby, Op, Nstop, Nk, Nm, resid, MaxIt);
SimpleLanczos<FermionField> IRL(Op,Nstop, Nk, Nm, resid, MaxIt);
std::vector<RealD> eval(Nm);
FermionField src(FGrid);
@@ -101,7 +109,8 @@ int main(int argc, char** argv) {
};
int Nconv;
IRL.calc(eval, evec, src, Nconv);
// IRL.calc(eval, evec, src, Nconv);
IRL.calc(eval, src, Nconv);
std::cout << eval << std::endl;

View File

@@ -134,6 +134,7 @@ int main(int argc, char** argv) {
LatticeGaugeField Umu(UGrid);
// SU<Nc>::HotConfiguration(RNG4, Umu);
// SU<Nc>::ColdConfiguration(Umu);
FieldMetaData header;
std::string file("./config");
@@ -185,6 +186,7 @@ int main(int argc, char** argv) {
FermionField src(FGrid);
gaussian(RNG5, src);
std::vector<Complex> boundary = {1,1,1,-1};
// std::vector<Complex> boundary = {1,1,1,1};
FermionOp::ImplParams Params(boundary);
@@ -208,6 +210,7 @@ while ( mass > - 2.5){
PlainHermOp<FermionField> Op2 (HermOp2);
ImplicitlyRestartedLanczos<FermionField> IRL(OpCheby, Op2, Nstop, Nk, Nm, resid, MaxIt);
// SimpleLanczos<FermionField> IRL(Op,Nstop, Nk, Nm, resid, MaxIt);
std::vector<RealD> eval(Nm);
std::vector<FermionField> evec(Nm, FGrid);
@@ -218,6 +221,7 @@ while ( mass > - 2.5){
int Nconv;
IRL.calc(eval, evec, src, Nconv);
// IRL.calc(eval, src, Nconv);
std::cout << mass <<" : " << eval << std::endl;