mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00: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:
parent
b350a24ded
commit
6418f06771
@ -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
|
||||
|
@ -54,7 +54,7 @@ class PerambFromSolvePar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(PerambFromSolvePar,
|
||||
std::string, eigenPack,
|
||||
std::string, lapevec,
|
||||
std::string, PerambFileName,
|
||||
std::string, solve,
|
||||
int, nvec_reduced,
|
||||
@ -95,7 +95,7 @@ TPerambFromSolve<FImpl>::TPerambFromSolve(const std::string name) : Module<Peram
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TPerambFromSolve<FImpl>::getInput(void)
|
||||
{
|
||||
return {par().solve, par().eigenPack, par().DistilParams};
|
||||
return {par().solve, par().lapevec, par().DistilParams};
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
@ -137,7 +137,7 @@ void TPerambFromSolve<FImpl>::execute(void)
|
||||
const int LI_reduced{ par().LI_reduced};
|
||||
auto &perambulator = envGet(PerambTensor, getName());
|
||||
auto &solve = envGet(std::vector<FermionField>, par().solve);
|
||||
auto &epack = envGet(Grid::Hadrons::EigenPack<LatticeColourVector>, par().eigenPack);
|
||||
auto &epack = envGet(Grid::Hadrons::EigenPack<LatticeColourVector>, par().lapevec);
|
||||
|
||||
envGetTmp(LatticeColourVector, result4d_nospin);
|
||||
envGetTmp(LatticeColourVector, result3d_nospin);
|
||||
|
Loading…
Reference in New Issue
Block a user