From a4bc539364ffa808f8ef3836600681c59f351c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 6 Oct 2023 16:50:53 -0400 Subject: [PATCH] Rename HomotopyStatement class to HomotopySetupStatement For consistency with other such classes, since it represents the homotopy_setup block. --- src/NumericalInitialization.cc | 10 +++++----- src/NumericalInitialization.hh | 6 +++--- src/ParsingDriver.cc | 2 +- src/ParsingDriver.hh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NumericalInitialization.cc b/src/NumericalInitialization.cc index f8b1d6b9..8c2e32e3 100644 --- a/src/NumericalInitialization.cc +++ b/src/NumericalInitialization.cc @@ -534,16 +534,16 @@ HistvalFileStatement::writeJsonOutput(ostream &output) const output << "}"; } -HomotopyStatement::HomotopyStatement(homotopy_values_t homotopy_values_arg, - const SymbolTable &symbol_table_arg) : +HomotopySetupStatement::HomotopySetupStatement(homotopy_values_t homotopy_values_arg, + const SymbolTable &symbol_table_arg) : homotopy_values{move(homotopy_values_arg)}, symbol_table{symbol_table_arg} { } void -HomotopyStatement::writeOutput(ostream &output, [[maybe_unused]] const string &basename, - [[maybe_unused]] bool minimal_workspace) const +HomotopySetupStatement::writeOutput(ostream &output, [[maybe_unused]] const string &basename, + [[maybe_unused]] bool minimal_workspace) const { output << "%" << endl << "% HOMOTOPY_SETUP instructions" << endl @@ -567,7 +567,7 @@ HomotopyStatement::writeOutput(ostream &output, [[maybe_unused]] const string &b } void -HomotopyStatement::writeJsonOutput(ostream &output) const +HomotopySetupStatement::writeJsonOutput(ostream &output) const { output << R"({"statementName": "homotopy", )" << R"("values": [)"; diff --git a/src/NumericalInitialization.hh b/src/NumericalInitialization.hh index fff69c74..3e7d910f 100644 --- a/src/NumericalInitialization.hh +++ b/src/NumericalInitialization.hh @@ -165,7 +165,7 @@ public: void writeJsonOutput(ostream &output) const override; }; -class HomotopyStatement : public Statement +class HomotopySetupStatement : public Statement { public: //! Stores the declarations of homotopy_setup @@ -175,8 +175,8 @@ private: const homotopy_values_t homotopy_values; const SymbolTable &symbol_table; public: - HomotopyStatement(homotopy_values_t homotopy_values_arg, - const SymbolTable &symbol_table_arg); + HomotopySetupStatement(homotopy_values_t homotopy_values_arg, + const SymbolTable &symbol_table_arg); void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeJsonOutput(ostream &output) const override; }; diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index 31416708..c01162e5 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -795,7 +795,7 @@ ParsingDriver::end_histval(bool all_values_required) void ParsingDriver::end_homotopy() { - mod_file->addStatement(make_unique<HomotopyStatement>(move(homotopy_values), mod_file->symbol_table)); + mod_file->addStatement(make_unique<HomotopySetupStatement>(move(homotopy_values), mod_file->symbol_table)); homotopy_values.clear(); } diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index 7ccee5e3..5edf4fca 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -172,7 +172,7 @@ private: //! Temporary storage for histval blocks HistValStatement::hist_values_t hist_values; //! Temporary storage for homotopy_setup blocks - HomotopyStatement::homotopy_values_t homotopy_values; + HomotopySetupStatement::homotopy_values_t homotopy_values; //! Temporary storage for moment_calibration MomentCalibration::constraints_t moment_calibration_constraints; //! Temporary storage for irf_calibration -- GitLab