mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +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
|
,std::string, gauge
|
||||||
,StoutParameters, Stout
|
,StoutParameters, Stout
|
||||||
,ChebyshevParameters, Cheby
|
,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");
|
HADRONS_ERROR(Program,"The eingensolver failed to find enough eigenvectors on at least one node");
|
||||||
}
|
}
|
||||||
#if DEBUG
|
|
||||||
// Now write out the 4d eigenvectors
|
// Now write out the 4d eigenvectors
|
||||||
eig4d.record.operatorXml = "<OPERATOR>Distillation</OPERATOR>";
|
std::string sEigenPackName(par().FileName);
|
||||||
eig4d.record.solverXml = "<SOLVER>CG</SOLVER>";
|
if( !sEigenPackName.empty() )
|
||||||
std::string sEigenPackName(getName());
|
{
|
||||||
sEigenPackName.append(".");
|
eig4d.record.solverXml = parString();
|
||||||
sEigenPackName.append(std::to_string(vm().getTrajectory()));
|
ModuleBase * b{vm().getModule(par().gauge)};
|
||||||
eig4d.write(sEigenPackName,false);
|
std::string sOperatorXml{ "<module><id><type>" };
|
||||||
#endif
|
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
|
END_MODULE_NAMESPACE
|
||||||
|
@ -54,7 +54,7 @@ class PerambFromSolvePar: Serializable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(PerambFromSolvePar,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(PerambFromSolvePar,
|
||||||
std::string, eigenPack,
|
std::string, lapevec,
|
||||||
std::string, PerambFileName,
|
std::string, PerambFileName,
|
||||||
std::string, solve,
|
std::string, solve,
|
||||||
int, nvec_reduced,
|
int, nvec_reduced,
|
||||||
@ -95,7 +95,7 @@ TPerambFromSolve<FImpl>::TPerambFromSolve(const std::string name) : Module<Peram
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TPerambFromSolve<FImpl>::getInput(void)
|
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>
|
template <typename FImpl>
|
||||||
@ -137,7 +137,7 @@ void TPerambFromSolve<FImpl>::execute(void)
|
|||||||
const int LI_reduced{ par().LI_reduced};
|
const int LI_reduced{ par().LI_reduced};
|
||||||
auto &perambulator = envGet(PerambTensor, getName());
|
auto &perambulator = envGet(PerambTensor, getName());
|
||||||
auto &solve = envGet(std::vector<FermionField>, par().solve);
|
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, result4d_nospin);
|
||||||
envGetTmp(LatticeColourVector, result3d_nospin);
|
envGetTmp(LatticeColourVector, result3d_nospin);
|
||||||
|
Loading…
Reference in New Issue
Block a user