From 2a27717172484d55bc07de6e4dd607300ac3ec32 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 31 Mar 2022 15:47:35 +0100 Subject: [PATCH 1/6] First version of ConservedBilinear --- Hadrons/Modules/MNPR/ConservedBilinear.cpp | 33 +++ Hadrons/Modules/MNPR/ConservedBilinear.hpp | 229 +++++++++++++++++++++ 2 files changed, 262 insertions(+) create mode 100644 Hadrons/Modules/MNPR/ConservedBilinear.cpp create mode 100644 Hadrons/Modules/MNPR/ConservedBilinear.hpp diff --git a/Hadrons/Modules/MNPR/ConservedBilinear.cpp b/Hadrons/Modules/MNPR/ConservedBilinear.cpp new file mode 100644 index 00000000..f9e695b5 --- /dev/null +++ b/Hadrons/Modules/MNPR/ConservedBilinear.cpp @@ -0,0 +1,33 @@ +/* + * ConservedBilinear.cpp, part of Hadrons (https://github.com/aportelli/Hadrons) + * + * Copyright (C) 2015 - 2022 + * + * Author: Antonin Portelli + * + * Hadrons is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Hadrons is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Hadrons. If not, see . + * + * See the full license in the file "LICENSE" in the top level distribution + * directory. + */ + +/* END LEGAL */ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MNPR; + +template class Grid::Hadrons::MNPR::TConservedBilinear; + diff --git a/Hadrons/Modules/MNPR/ConservedBilinear.hpp b/Hadrons/Modules/MNPR/ConservedBilinear.hpp new file mode 100644 index 00000000..9abefdd6 --- /dev/null +++ b/Hadrons/Modules/MNPR/ConservedBilinear.hpp @@ -0,0 +1,229 @@ +/* + * ConservedBilinear.hpp, part of Hadrons (https://github.com/aportelli/Hadrons) + * + * Copyright (C) 2015 - 2022 + * + * Author: Antonin Portelli + * Author: Julia Kettle J.R.Kettle-2@sms.ed.ac.uk + * Author: Peter Boyle + * Author: Fabian Joswig + * Author: Felix Erben + * + * Hadrons is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Hadrons is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Hadrons. If not, see . + * + * See the full license in the file "LICENSE" in the top level distribution + * directory. + */ + +/* END LEGAL */ + +#ifndef Hadrons_ConservedBilinear_hpp_ +#define Hadrons_ConservedBilinear_hpp_ + +#include +#include +#include +#include + +BEGIN_HADRONS_NAMESPACE + +/****************************************************************************** + * TConservedBilinear * + Performs bilinear contractions of the type tr[g5*adj(qOut')*g5*G*qIn'] + Suitable for non exceptional momenta in Rome-Southampton NPR + +Compute the bilinear vertex needed for the NPR. +V(G) = sum_x [ g5 * adj(S'(x,p2)) * g5 * G * S'(x,p1) ]_{si,sj,ci,cj} +G is one of the 16 gamma vertices [I,gmu,g5,g5gmu,sig(mu,nu)] + + * G + / \ + p1/ \p2 + / \ + / \ + +Returns a spin-colour matrix, with indices si,sj, ci,cj + +Conventions: +p1 - incoming momenta +p2 - outgoing momenta +**************************************************************************/ +BEGIN_MODULE_NAMESPACE(MNPR) + +class ConservedBilinearPar: Serializable +{ +public: + GRID_SERIALIZABLE_CLASS_MEMBERS(ConservedBilinearPar, + std::string, qIn, + std::string, qOut, + std::string, pIn, + std::string, pOut, + std::string, action, + std::string, output); +}; + +template +class TConservedBilinear: public Module +{ +public: + FERM_TYPE_ALIASES(FImpl,); + class Metadata: Serializable + { + public: + GRID_SERIALIZABLE_CLASS_MEMBERS(Metadata, + Gamma::Algebra, gamma, + std::string, pIn, + std::string, pOut); + }; + typedef Correlator Result; +public: + // constructor + TConservedBilinear(const std::string name); + // destructor + virtual ~TConservedBilinear(void) {}; + // dependencies/products + virtual std::vector getInput(void); + virtual std::vector getOutput(void); + // setup + virtual void setup(void); + // execution + virtual void execute(void); +private: + unsigned int Ls_; +}; + +MODULE_REGISTER_TMP(ConservedBilinear, ARG(TConservedBilinear), MNPR); + +/****************************************************************************** + * TConservedBilinear implementation * + ******************************************************************************/ +// constructor ///////////////////////////////////////////////////////////////// +template +TConservedBilinear::TConservedBilinear(const std::string name) +: Module(name) +{} + +// setup /////////////////////////////////////////////////////////////////////// +template +void TConservedBilinear::setup(void) +{ + LOG(Message) << "Running setup for ConservedBilinear" << std::endl; + + // The propagator can be 4d or 5d, but must match the action + const unsigned int ActionLs_{ env().getObjectLs(par().action) }; + Ls_ = env().getObjectLs( par().pIn ); + if (Ls_ != ActionLs_) + { + std::string sError{ "Ls mismatch: propagator Ls="}; + sError.append( std::to_string( Ls_ ) ); + sError.append( ", action Ls=" ); + sError.append( std::to_string( ActionLs_ ) ); + HADRONS_ERROR(Size, sError); + } + + envTmpLat(PropagatorField, "qIn_phased"); + envTmpLat(PropagatorField, "qOut_phased"); + envTmpLat(PropagatorField, "lret"); + envTmpLat(PropagatorField, "dummy_phys_source"); + envTmpLat(ComplexField, "pDotXIn"); + envTmpLat(ComplexField, "pDotXOut"); + envTmpLat(ComplexField, "xMu"); +} + +// dependencies/products /////////////////////////////////////////////////////// +template +std::vector TConservedBilinear::getInput(void) +{ + std::vector input = {par().qIn, par().qOut, par().action}; + + return input; +} + +template +std::vector TConservedBilinear::getOutput(void) +{ + std::vector out = {}; + + return out; +} + +template +void TConservedBilinear::execute(void) +{ + + LOG(Message) << "Computing conserved bilinear contractions '" << getName() << "' using" + << " propagators '" << par().qIn << "' and '" << par().qOut << "'" + << "with action " << par().action << std::endl; + + auto &act = envGet(FMat, par().action); + + // Propagators + auto &qIn = envGet(PropagatorField, par().qIn); + auto &qOut = envGet(PropagatorField, par().qOut); + envGetTmp(PropagatorField, qIn_phased); + envGetTmp(PropagatorField, qOut_phased); + envGetTmp(PropagatorField, lret); + envGetTmp(PropagatorField, dummy_phys_source); + envGetTmp(ComplexField, pDotXIn); + envGetTmp(ComplexField, pDotXOut); + envGetTmp(ComplexField, xMu); + + // momentum on legs + std::vector pIn = strToVec(par().pIn), + pOut = strToVec(par().pOut); + Coordinate latt_size = GridDefaultLatt(); + Gamma g5(Gamma::Algebra::Gamma5); + Complex Ci(0.0,1.0); + std::vector result; + Result r; + + Real volume = 1.0; + for (int mu = 0; mu < Nd; mu++) { + volume *= latt_size[mu]; + } + + NPRUtils::dot(pDotXIn,pIn); + qIn_phased = qIn * exp(-Ci * pDotXIn); + NPRUtils::dot(pDotXOut,pOut); + qOut_phased = qOut * exp(-Ci * pDotXOut); + + r.info.pIn = par().pIn; + r.info.pOut = par().pOut; + + Gamma::Algebra Gmu [] = { + Gamma::Algebra::GammaX, + Gamma::Algebra::GammaY, + Gamma::Algebra::GammaZ, + Gamma::Algebra::GammaT, + }; + + for (int mu = 0; mu < Nd; mu++) + { + r.info.gamma = Gmu[mu]; + act.ContractConservedCurrent(qOut_phased, qIn_phased, lret, dummy_phys_source, Current::Vector, mu); + r.corr.push_back( (1.0 / volume) * sum_large(lret) ); + result.push_back(r); + r.corr.erase(r.corr.begin()); + } + + ////////////////////////////////////////////////// + saveResult(par().output, "ConservedBilinear", result); + LOG(Message) << "Complete. Writing results to " << par().output << std::endl; +} + +END_MODULE_NAMESPACE + +END_HADRONS_NAMESPACE + +#endif // Hadrons_ConservedBilinear_hpp_ From 0d8bc2af00658110855118327ba8ebc852e2697c Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 31 Mar 2022 16:36:47 +0100 Subject: [PATCH 2/6] Small bugs in ConservedBilinear fixed --- Hadrons/Modules/MNPR/ConservedBilinear.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Hadrons/Modules/MNPR/ConservedBilinear.hpp b/Hadrons/Modules/MNPR/ConservedBilinear.hpp index 9abefdd6..0521ae30 100644 --- a/Hadrons/Modules/MNPR/ConservedBilinear.hpp +++ b/Hadrons/Modules/MNPR/ConservedBilinear.hpp @@ -65,11 +65,11 @@ class ConservedBilinearPar: Serializable { public: GRID_SERIALIZABLE_CLASS_MEMBERS(ConservedBilinearPar, + std::string, action, std::string, qIn, std::string, qOut, std::string, pIn, std::string, pOut, - std::string, action, std::string, output); }; @@ -122,7 +122,7 @@ void TConservedBilinear::setup(void) // The propagator can be 4d or 5d, but must match the action const unsigned int ActionLs_{ env().getObjectLs(par().action) }; - Ls_ = env().getObjectLs( par().pIn ); + Ls_ = env().getObjectLs( par().qIn ); if (Ls_ != ActionLs_) { std::string sError{ "Ls mismatch: propagator Ls="}; @@ -145,7 +145,7 @@ void TConservedBilinear::setup(void) template std::vector TConservedBilinear::getInput(void) { - std::vector input = {par().qIn, par().qOut, par().action}; + std::vector input = {par().action, par().qIn, par().qOut}; return input; } @@ -183,7 +183,6 @@ void TConservedBilinear::execute(void) std::vector pIn = strToVec(par().pIn), pOut = strToVec(par().pOut); Coordinate latt_size = GridDefaultLatt(); - Gamma g5(Gamma::Algebra::Gamma5); Complex Ci(0.0,1.0); std::vector result; Result r; @@ -198,6 +197,7 @@ void TConservedBilinear::execute(void) NPRUtils::dot(pDotXOut,pOut); qOut_phased = qOut * exp(-Ci * pDotXOut); + r.info.pIn = par().pIn; r.info.pOut = par().pOut; From 57afe1420bfb22c8817a6c16a58799b36320af7c Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 5 Apr 2022 11:57:25 +0100 Subject: [PATCH 3/6] Error added to ConservedBilinear if action is 5d. Documentation extended. --- Hadrons/Modules/MNPR/ConservedBilinear.hpp | 30 +++++----------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/Hadrons/Modules/MNPR/ConservedBilinear.hpp b/Hadrons/Modules/MNPR/ConservedBilinear.hpp index 0521ae30..a44e5d1e 100644 --- a/Hadrons/Modules/MNPR/ConservedBilinear.hpp +++ b/Hadrons/Modules/MNPR/ConservedBilinear.hpp @@ -41,23 +41,10 @@ BEGIN_HADRONS_NAMESPACE /****************************************************************************** * TConservedBilinear * Performs bilinear contractions of the type tr[g5*adj(qOut')*g5*G*qIn'] - Suitable for non exceptional momenta in Rome-Southampton NPR - -Compute the bilinear vertex needed for the NPR. -V(G) = sum_x [ g5 * adj(S'(x,p2)) * g5 * G * S'(x,p1) ]_{si,sj,ci,cj} -G is one of the 16 gamma vertices [I,gmu,g5,g5gmu,sig(mu,nu)] - - * G - / \ - p1/ \p2 - / \ - / \ + Suitable for non exceptional momenta in Rome-Southampton NPR where G is + the non-local conserved vector current which depends on the action. Returns a spin-colour matrix, with indices si,sj, ci,cj - -Conventions: -p1 - incoming momenta -p2 - outgoing momenta **************************************************************************/ BEGIN_MODULE_NAMESPACE(MNPR) @@ -100,7 +87,6 @@ class TConservedBilinear: public Module // execution virtual void execute(void); private: - unsigned int Ls_; }; MODULE_REGISTER_TMP(ConservedBilinear, ARG(TConservedBilinear), MNPR); @@ -122,13 +108,9 @@ void TConservedBilinear::setup(void) // The propagator can be 4d or 5d, but must match the action const unsigned int ActionLs_{ env().getObjectLs(par().action) }; - Ls_ = env().getObjectLs( par().qIn ); - if (Ls_ != ActionLs_) + if (ActionLs_ != 1) { - std::string sError{ "Ls mismatch: propagator Ls="}; - sError.append( std::to_string( Ls_ ) ); - sError.append( ", action Ls=" ); - sError.append( std::to_string( ActionLs_ ) ); + std::string sError{ "ConservedBilinear currently only implemented for 4d actions."}; HADRONS_ERROR(Size, sError); } @@ -181,7 +163,7 @@ void TConservedBilinear::execute(void) // momentum on legs std::vector pIn = strToVec(par().pIn), - pOut = strToVec(par().pOut); + pOut = strToVec(par().pOut); Coordinate latt_size = GridDefaultLatt(); Complex Ci(0.0,1.0); std::vector result; @@ -226,4 +208,4 @@ END_MODULE_NAMESPACE END_HADRONS_NAMESPACE -#endif // Hadrons_ConservedBilinear_hpp_ +#endif // Hadrons_ConservedBilinear_hpp_ \ No newline at end of file From 90904d4098212a4fa4ade32534f602be418a7efd Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 3 May 2022 11:01:12 +0100 Subject: [PATCH 4/6] Distillation tests fixed, test Makefile updated. --- tests/Make.inc | 11 +++++++---- tests/Makefile.am | 8 ++++++-- tests/Test_exact_distil.cpp | 2 +- tests/Test_stoch_distil.cpp | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/Make.inc b/tests/Make.inc index e353baaf..a2041d57 100644 --- a/tests/Make.inc +++ b/tests/Make.inc @@ -1,8 +1,11 @@ -tests-local: Test_QED_Local Test_QED Test_diskvector Test_exact_distil Test_free_prop Test_hadrons_meson_3pt Test_hadrons_spectrum Test_sigma_to_nucleon Test_stoch_distil Test_xi_to_sigma -EXTRA_PROGRAMS = Test_QED_Local Test_QED Test_diskvector Test_exact_distil Test_free_prop Test_hadrons_meson_3pt Test_hadrons_spectrum Test_sigma_to_nucleon Test_stoch_distil Test_xi_to_sigma +tests-local: Test_conserved_bilinear Test_QED_Local Test_QED Test_diskvector Test_exact_distil Test_free_prop Test_hadrons_meson_3pt Test_hadrons_spectrum Test_sigma_to_nucleon Test_stoch_distil Test_xi_to_sigma +EXTRA_PROGRAMS = Test_conserved_bilinear Test_QED_Local Test_QED Test_diskvector Test_exact_distil Test_free_prop Test_hadrons_meson_3pt Test_hadrons_spectrum Test_sigma_to_nucleon Test_stoch_distil Test_xi_to_sigma -Test_QED_Local_SOURCES=Test_QED.cc -Test_QED_LDADD=-lHadrons -lGrid +Test_conserved_bilinear_SOURCES=Test_conserved_bilinear.cc +Test_conserved_bilinear_LDADD=-lHadrons -lGrid + +Test_QED_Local_SOURCES=Test_QED_Local.cc +Test_QED_Local_LDADD=-lHadrons -lGrid Test_QED_SOURCES=Test_QED.cc Test_QED_LDADD=-lHadrons -lGrid diff --git a/tests/Makefile.am b/tests/Makefile.am index faf179a0..d74180bb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,8 @@ AM_LDFLAGS += -L$(top_builddir)/Hadrons AM_CXXFLAGS += -I$(top_srcdir) - + EXTRA_PROGRAMS = \ + Test_conserved_bilinear \ Test_QED_Local \ Test_QED \ Test_database \ @@ -20,7 +21,10 @@ CLEANFILES = $(EXTRA_PROGRAMS) tests-local: $(EXTRA_PROGRAMS) -Test_QED_Local_SOURCES=Test_QED_LOCAL.cpp +Test_conserved_bilinear_SOURCES=Test_conserved_bilinear.cpp +Test_conserved_bilinear_LDADD=-lHadrons -lGrid + +Test_QED_Local_SOURCES=Test_QED_Local.cpp Test_QED_Local_LDADD=-lHadrons -lGrid Test_QED_SOURCES=Test_QED.cpp diff --git a/tests/Test_exact_distil.cpp b/tests/Test_exact_distil.cpp index 83eeccea..ffb614f2 100644 --- a/tests/Test_exact_distil.cpp +++ b/tests/Test_exact_distil.cpp @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) globalPar.database.restoreSchedule = false; globalPar.database.restoreModules = false; globalPar.database.restoreMemoryProfile = false; - globalPar.database.makeStatDb = false; + //globalPar.database.makeStatDb = false; application.setPar(globalPar); // gauge field application.createModule("gauge"); diff --git a/tests/Test_stoch_distil.cpp b/tests/Test_stoch_distil.cpp index 44d42aa6..654379f8 100644 --- a/tests/Test_stoch_distil.cpp +++ b/tests/Test_stoch_distil.cpp @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) globalPar.database.restoreSchedule = false; globalPar.database.restoreModules = false; globalPar.database.restoreMemoryProfile = false; - globalPar.database.makeStatDb = false; + //globalPar.database.makeStatDb = false; application.setPar(globalPar); // gauge field application.createModule("gauge"); From d1859c72ebac8bf2ff05d21462bf8493a938b39e Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 4 May 2022 14:25:45 +0100 Subject: [PATCH 5/6] Test_conserved_bilinear added. --- tests/Test_conserved_bilinear.cpp | 137 ++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 tests/Test_conserved_bilinear.cpp diff --git a/tests/Test_conserved_bilinear.cpp b/tests/Test_conserved_bilinear.cpp new file mode 100644 index 00000000..8d3eed71 --- /dev/null +++ b/tests/Test_conserved_bilinear.cpp @@ -0,0 +1,137 @@ +/* + * Test_hadrons_meson_3pt.cpp, part of Hadrons (https://github.com/aportelli/Hadrons) + * + * Copyright (C) 2015 - 2022 + * + * Author: Antonin Portelli + * Author: Fabian Joswig + * + * Hadrons is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * Hadrons is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Hadrons. If not, see . + * + * See the full license in the file "LICENSE" in the top level distribution + * directory. + */ + +/* END LEGAL */ + +#include +#include + +using namespace Grid; +using namespace Hadrons; + +int main(int argc, char *argv[]) +{ + // initialization ////////////////////////////////////////////////////////// + Grid_init(&argc, &argv); + HadronsLogError.Active(GridLogError.isActive()); + HadronsLogWarning.Active(GridLogWarning.isActive()); + HadronsLogMessage.Active(GridLogMessage.isActive()); + HadronsLogIterative.Active(GridLogIterative.isActive()); + HadronsLogDebug.Active(GridLogDebug.isActive()); + LOG(Message) << "Grid initialized" << std::endl; + + // run setup /////////////////////////////////////////////////////////////// + Application application; + + // global parameters + Application::GlobalPar globalPar; + globalPar.trajCounter.start = 1500; + globalPar.trajCounter.end = 1520; + globalPar.trajCounter.step = 20; + globalPar.runId = "test_conserved_bilinear"; + globalPar.genetic.maxGen = 1000; + globalPar.genetic.maxCstGen = 200; + globalPar.genetic.popSize = 20; + globalPar.genetic.mutationRate = .1; + application.setPar(globalPar); + + // gauge field + application.createModule("gauge"); + + // set fermion boundary conditions to be periodic space, antiperiodic time. + std::string boundary = "1 1 1 1"; + std::string twist = "0. 0. 0. 0."; + + // actions + MAction::WilsonExpClover::Par actionPar; + actionPar.gauge = "gauge"; + actionPar.mass = 0.01; + actionPar.csw_r = 1.12; + actionPar.csw_t = 1.12; + actionPar.cF = 1.0; + actionPar.boundary = boundary; + actionPar.twist = twist; + application.createModule("eWC", actionPar); + + // solvers + MSolver::RBPrecCG::Par solverPar; + solverPar.action = "eWC"; + solverPar.residual = 1.0e-15; + solverPar.maxIteration = 10000; + application.createModule("CG", solverPar); + + // momentum source1 + MSource::Momentum::Par momentumPar1; + momentumPar1.mom = "2 2 0 0"; + application.createModule("mom1", momentumPar1); + + // momentum source2 + MSource::Momentum::Par momentumPar2; + momentumPar2.mom = "2 0 2 0"; + application.createModule("mom2", momentumPar2); + + // propagator1 + MFermion::GaugeProp::Par quarkPar1; + quarkPar1.solver = "CG"; + quarkPar1.source = "mom1"; + application.createModule("prop1", quarkPar1); + + // propagator2 + MFermion::GaugeProp::Par quarkPar2; + quarkPar2.solver = "CG"; + quarkPar2.source = "mom2"; + application.createModule("prop2", quarkPar2); + + // ExternalLeg1 + MNPR::ExternalLeg::Par externalLegPar1; + externalLegPar1.qIn = "prop1"; + externalLegPar1.pIn = "2 2 0 0"; + application.createModule("leg1", externalLegPar1); + + // ExternalLeg2 + MNPR::ExternalLeg::Par externalLegPar2; + externalLegPar2.qIn = "prop2"; + externalLegPar2.pIn = "2 0 2 0"; + application.createModule("leg2", externalLegPar2); + + // ConservedBilinear + MNPR::ConservedBilinear::Par ConservedBilinearPar; + ConservedBilinearPar.action = "eWC"; + ConservedBilinearPar.qIn = "prop1"; + ConservedBilinearPar.pIn = "2 2 0 0"; + ConservedBilinearPar.qOut = "prop2"; + ConservedBilinearPar.pOut = "2 0 2 0"; + application.createModule("ConservedBilinear", ConservedBilinearPar); + + // execution + application.saveParameterFile("conserved_bilinear.xml"); + application.run(); + + // epilogue + LOG(Message) << "Grid is finalizing now" << std::endl; + Grid_finalize(); + + return EXIT_SUCCESS; +} From aea127c79180582c5657c6ccd7d69388b361093d Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 16 Sep 2022 13:39:55 +0100 Subject: [PATCH 6/6] feat: getOutputFiles method added to ConservedBilinear module. --- Hadrons/Modules/MNPR/ConservedBilinear.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Hadrons/Modules/MNPR/ConservedBilinear.hpp b/Hadrons/Modules/MNPR/ConservedBilinear.hpp index a44e5d1e..094d1a26 100644 --- a/Hadrons/Modules/MNPR/ConservedBilinear.hpp +++ b/Hadrons/Modules/MNPR/ConservedBilinear.hpp @@ -82,6 +82,7 @@ class TConservedBilinear: public Module // dependencies/products virtual std::vector getInput(void); virtual std::vector getOutput(void); + virtual std::vector getOutputFiles(void); // setup virtual void setup(void); // execution @@ -140,6 +141,14 @@ std::vector TConservedBilinear::getOutput(void) return out; } +template +std::vector TConservedBilinear::getOutputFiles(void) +{ + std::vector output = {resultFilename(par().output)}; + + return output; +} + template void TConservedBilinear::execute(void) {