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

Add option to save the eigenvectors of the Laplacian.

If they are saved, then metadata saved are:
solverXml	Parameters for this LapEvec module instance
OperatorXml	module type and parameters (if any) for the module that created the gauge field
This commit is contained in:
Michael Marshall
2019-11-29 18:06:18 +00:00
parent b350a24ded
commit 6418f06771
2 changed files with 20 additions and 12 deletions

View File

@ -85,7 +85,8 @@ struct LapEvecPar: Serializable {
,std::string, gauge
,StoutParameters, Stout
,ChebyshevParameters, Cheby
,LanczosParameters, Lanczos)
,LanczosParameters, Lanczos
,std::string, FileName)
};
/******************************************************************************
@ -309,15 +310,22 @@ void TLapEvec<GImpl>::execute(void)
{
HADRONS_ERROR(Program,"The eingensolver failed to find enough eigenvectors on at least one node");
}
#if DEBUG
// Now write out the 4d eigenvectors
eig4d.record.operatorXml = "<OPERATOR>Distillation</OPERATOR>";
eig4d.record.solverXml = "<SOLVER>CG</SOLVER>";
std::string sEigenPackName(getName());
sEigenPackName.append(".");
sEigenPackName.append(std::to_string(vm().getTrajectory()));
eig4d.write(sEigenPackName,false);
#endif
std::string sEigenPackName(par().FileName);
if( !sEigenPackName.empty() )
{
eig4d.record.solverXml = parString();
ModuleBase * b{vm().getModule(par().gauge)};
std::string sOperatorXml{ "<module><id><type>" };
sOperatorXml.append( b->getRegisteredName() );
sOperatorXml.append( "</type></id><options>" );
sOperatorXml.append( b->parString() );
sOperatorXml.append( "</options></module>" );
eig4d.record.operatorXml = sOperatorXml;
sEigenPackName.append(".");
sEigenPackName.append(std::to_string(vm().getTrajectory()));
eig4d.write(sEigenPackName,false);
}
}
END_MODULE_NAMESPACE