interface for inputing gauge transforms

This commit is contained in:
Antonin Portelli 2024-03-19 13:36:15 +09:00
parent 97169d9f2f
commit 5ba6c36cf5

View File

@ -98,74 +98,62 @@ struct RbcUkqcd
const RbcUkqcd::DeflationParameters &deflPar, const RbcUkqcd::DeflationParameters &deflPar,
const std::string solverName, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary, const double residual); const std::string boundary, const double residual);
static inline void addC1MLightRuntimeIRLSolver(Application &app, const std::string solverName, static inline void addC1MLightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M16LightRuntimeIRLSolver(Application &app, const std::string solverName, static inline void addC1M16LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M20LightRuntimeIRLSolver(Application &app, const std::string solverName, static inline void addC1M20LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M32LightRuntimeIRLSolver(Application &app, const std::string solverName, static inline void addC1M32LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
// Strange solvers (undeflated) // Strange solvers (undeflated)
static inline void addStrangeSolver(Application &app, const RbcUkqcd::EnsembleParameters &par, static inline void addStrangeSolver(Application &app, const RbcUkqcd::EnsembleParameters &par,
const std::string solverName, const std::string gaugeName, const std::string solverName, const std::string gaugeName,
const std::string gaugeTransform, const std::string boundary, const std::string boundary, const double residual);
const double residual);
static inline void addC0StrangeSolver(Application &app, const std::string solverName, static inline void addC0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 1", const std::string boundary = "1 1 1 1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addM0StrangeSolver(Application &app, const std::string solverName, static inline void addM0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 1", const std::string boundary = "1 1 1 1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1MStrangeSolver(Application &app, const std::string solverName, static inline void addC1MStrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M16StrangeSolver(Application &app, const std::string solverName, static inline void addC1M16StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M20StrangeSolver(Application &app, const std::string solverName, static inline void addC1M20StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addC1M32StrangeSolver(Application &app, const std::string solverName, static inline void addC1M32StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary = "1 1 1 -1", const std::string boundary = "1 1 1 -1",
const double residual = 1.0e-8); const double residual = 1.0e-8);
// Charm solvers, mass is a free parameter // Charm solvers, mass is a free parameter
static inline void addC0CharmSolver(Application &app, const std::string solverName, static inline void addC0CharmSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const double mass,
const double mass, const std::string boundary = "1 1 1 1", const std::string boundary = "1 1 1 1",
const double residual = 1.0e-18); const double residual = 1.0e-18);
static inline void addM0CharmSolver(Application &app, const std::string solverName, static inline void addM0CharmSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const double mass,
const double mass, const std::string boundary = "1 1 1 1", const std::string boundary = "1 1 1 1",
const double residual = 1.0e-18); const double residual = 1.0e-18);
}; };
@ -179,12 +167,21 @@ void RbcUkqcd::addC0LightZMobiusLCDSolver(Application &app, const std::string so
const std::string boundary, const double residual) const std::string boundary, const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;
const bool gaugeFixed = !gaugeTransform.empty();
// Gauge field FP32 cast // Gauge field & transform FP32 cast
MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar; MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar;
gaugeCastPar.field = gaugeName; gaugeCastPar.field = gaugeName;
app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_fp32", gaugeCastPar); app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_fp32", gaugeCastPar);
if (gaugeFixed)
{
MUtilities::ColourMatrixSinglePrecisionCast::Par transformCastPar;
transformCastPar.field = gaugeTransform;
app.createModule<MUtilities::ColourMatrixSinglePrecisionCast>(prefix + "_gaugeTransform_fp32",
gaugeCastPar);
}
// Scaled DWF action + FP32 version // Scaled DWF action + FP32 version
MAction::ZMobiusDWF::Par actionPar; MAction::ZMobiusDWF::Par actionPar;
@ -212,7 +209,7 @@ void RbcUkqcd::addC0LightZMobiusLCDSolver(Application &app, const std::string so
epPar.Ls = 10; epPar.Ls = 10;
epPar.blockSize = "4 4 4 3 10"; epPar.blockSize = "4 4 4 3 10";
epPar.orthogonalise = false; epPar.orthogonalise = false;
epPar.gaugeXform = gaugeTransform; epPar.gaugeXform = gaugeFixed ? (prefix + "_gaugeTransform_fp32") : "";
app.createModule<MIO::LoadCoarseFermionEigenPack250F>(prefix + "_epack", epPar); app.createModule<MIO::LoadCoarseFermionEigenPack250F>(prefix + "_epack", epPar);
// Inner guesser // Inner guesser
@ -244,12 +241,21 @@ void RbcUkqcd::addM0LightLCDSolver(Application &app, const std::string solverNam
const double residual) const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;
const bool gaugeFixed = !gaugeTransform.empty();
// Gauge field FP32 cast // Gauge field FP32 cast
MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar; MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar;
gaugeCastPar.field = gaugeName; gaugeCastPar.field = gaugeName;
app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_fp32", gaugeCastPar); app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_fp32", gaugeCastPar);
if (gaugeFixed)
{
MUtilities::ColourMatrixSinglePrecisionCast::Par transformCastPar;
transformCastPar.field = gaugeTransform;
app.createModule<MUtilities::ColourMatrixSinglePrecisionCast>(prefix + "_gaugeTransform_fp32",
gaugeCastPar);
}
// Scaled DWF action + FP32 version // Scaled DWF action + FP32 version
MAction::ScaledDWF::Par actionPar; MAction::ScaledDWF::Par actionPar;
@ -276,7 +282,7 @@ void RbcUkqcd::addM0LightLCDSolver(Application &app, const std::string solverNam
epPar.Ls = 12; epPar.Ls = 12;
epPar.blockSize = "4 4 4 4 12"; epPar.blockSize = "4 4 4 4 12";
epPar.orthogonalise = false; epPar.orthogonalise = false;
epPar.gaugeXform = gaugeTransform; epPar.gaugeXform = gaugeFixed ? (prefix + "_gaugeTransform_fp32") : "";
app.createModule<MIO::LoadCoarseFermionEigenPack250F>(prefix + "_epack", epPar); app.createModule<MIO::LoadCoarseFermionEigenPack250F>(prefix + "_epack", epPar);
// Inner guesser // Inner guesser
@ -305,7 +311,6 @@ void RbcUkqcd::addM0LightLCDSolver(Application &app, const std::string solverNam
void RbcUkqcd::addLightRuntimeIRLSolver(Application &app, const RbcUkqcd::EnsembleParameters &par, void RbcUkqcd::addLightRuntimeIRLSolver(Application &app, const RbcUkqcd::EnsembleParameters &par,
const RbcUkqcd::DeflationParameters &deflPar, const RbcUkqcd::DeflationParameters &deflPar,
const std::string solverName, const std::string gaugeName, const std::string solverName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary, const double residual) const std::string boundary, const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;
@ -372,49 +377,44 @@ void RbcUkqcd::addLightRuntimeIRLSolver(Application &app, const RbcUkqcd::Ensemb
// Light C1M // Light C1M
void RbcUkqcd::addC1MLightRuntimeIRLSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1MLightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName, const std::string boundary,
const std::string gaugeTransform, const double residual)
const std::string boundary, const double residual)
{ {
RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1mIRLPar, RbcUkqcd::c1mDeflPar, solverName, RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1mIRLPar, RbcUkqcd::c1mDeflPar, solverName,
gaugeName, gaugeTransform, boundary, residual); gaugeName, boundary, residual);
} }
// Light C1M16 // Light C1M16
void RbcUkqcd::addC1M16LightRuntimeIRLSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M16LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary, const double residual) const std::string boundary, const double residual)
{ {
RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m16IRLPar, RbcUkqcd::c1m16DeflPar, solverName, RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m16IRLPar, RbcUkqcd::c1m16DeflPar, solverName,
gaugeName, gaugeTransform, boundary, residual); gaugeName, boundary, residual);
} }
// Light C1M20 // Light C1M20
void RbcUkqcd::addC1M20LightRuntimeIRLSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M20LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary, const double residual) const std::string boundary, const double residual)
{ {
RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m20IRLPar, RbcUkqcd::c1m20DeflPar, solverName, RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m20IRLPar, RbcUkqcd::c1m20DeflPar, solverName,
gaugeName, gaugeTransform, boundary, residual); gaugeName, boundary, residual);
} }
// Light C1M32 // Light C1M32
void RbcUkqcd::addC1M32LightRuntimeIRLSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M32LightRuntimeIRLSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeName,
const std::string gaugeTransform,
const std::string boundary, const double residual) const std::string boundary, const double residual)
{ {
RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m32IRLPar, RbcUkqcd::c1m32DeflPar, solverName, RbcUkqcd::addLightRuntimeIRLSolver(app, RbcUkqcd::c1m32IRLPar, RbcUkqcd::c1m32DeflPar, solverName,
gaugeName, gaugeTransform, boundary, residual); gaugeName, boundary, residual);
} }
// Strange // Strange
void RbcUkqcd::addStrangeSolver(Application &app, const RbcUkqcd::EnsembleParameters &par, void RbcUkqcd::addStrangeSolver(Application &app, const RbcUkqcd::EnsembleParameters &par,
const std::string solverName, const std::string gaugeName, const std::string solverName, const std::string gaugeName,
const std::string gaugeTransform, const std::string boundary, const std::string boundary, const double residual)
const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;
@ -452,58 +452,53 @@ void RbcUkqcd::addStrangeSolver(Application &app, const RbcUkqcd::EnsembleParame
} }
void RbcUkqcd::addC0StrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addC0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c0UnitaryPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c0UnitaryPar, solverName, gaugeName, boundary,
boundary, residual); residual);
} }
void RbcUkqcd::addM0StrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addM0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::m0UnitaryPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::m0UnitaryPar, solverName, gaugeName, boundary,
boundary, residual); residual);
} }
void RbcUkqcd::addC1MStrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1MStrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1mIRLPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1mIRLPar, solverName, gaugeName, boundary, residual);
boundary, residual);
} }
void RbcUkqcd::addC1M16StrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M16StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m16IRLPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m16IRLPar, solverName, gaugeName, boundary, residual);
boundary, residual);
} }
void RbcUkqcd::addC1M20StrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M20StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m20IRLPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m20IRLPar, solverName, gaugeName, boundary, residual);
boundary, residual);
} }
void RbcUkqcd::addC1M32StrangeSolver(Application &app, const std::string solverName, void RbcUkqcd::addC1M32StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const std::string boundary,
const std::string boundary, const double residual) const double residual)
{ {
RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m32IRLPar, solverName, gaugeName, gaugeTransform, RbcUkqcd::addStrangeSolver(app, RbcUkqcd::c1m32IRLPar, solverName, gaugeName, boundary, residual);
boundary, residual);
} }
// Charm C0 // Charm C0
void RbcUkqcd::addC0CharmSolver(Application &app, const std::string solverName, void RbcUkqcd::addC0CharmSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const double mass,
const double mass, const std::string boundary, const std::string boundary, const double residual)
const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;
@ -540,9 +535,8 @@ void RbcUkqcd::addC0CharmSolver(Application &app, const std::string solverName,
// Charm M0 // Charm M0
void RbcUkqcd::addM0CharmSolver(Application &app, const std::string solverName, void RbcUkqcd::addM0CharmSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform, const std::string gaugeName, const double mass,
const double mass, const std::string boundary, const std::string boundary, const double residual)
const double residual)
{ {
const std::string prefix = solverName; const std::string prefix = solverName;