From d65e9306cb5eb6973622e799c2ce78504fd08982 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Wed, 19 Aug 2015 11:28:25 +0200 Subject: [PATCH] remove unnecessary get*Function functions --- preprocessor/DynamicModel.cc | 5 +---- preprocessor/ModFile.cc | 6 +++--- preprocessor/StaticModel.cc | 5 +---- preprocessor/SteadyStateModel.cc | 5 +---- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc index 794bf57e5..e95d926aa 100644 --- a/preprocessor/DynamicModel.cc +++ b/preprocessor/DynamicModel.cc @@ -1577,10 +1577,7 @@ DynamicModel::writeDynamicJuliaFile(const string &basename) const output << "module " << basename << "Dynamic" << endl << endl << "using Utils" << endl << endl - << "export getDynamicFunction" << endl << endl - << "function getDynamicFunction()" << endl - << " dynamic!" << endl - << "end" << endl << endl; + << "export dynamic!" << endl << endl; writeDynamicModel(output, false, true); output << "end" << endl; output.close(); diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index b575512ef..a94cbaad3 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -1145,9 +1145,9 @@ ModFile::writeExternalFilesJulia(const string &basename, FileOutputType output) } steady_state_model.writeSteadyStateFile(basename, mod_file_struct.ramsey_model_present, true); - jlOutputFile << "model.static = " << basename << "Static.getStaticFunction()" << endl - << "model.dynamic = " << basename << "Dynamic.getDynamicFunction()" << endl - << "model.steady_state = " << basename << "SteadyState2.getSteadyStateFunction()" << endl + jlOutputFile << "model.static = " << basename << "Static.static!" << endl + << "model.dynamic = " << basename << "Dynamic.dynamic!" << endl + << "model.steady_state = " << basename << "SteadyState2.steady_state!" << endl << "try" << endl << " using " << basename << "StaticParamsDerivs" << endl << " model.static_params_derivs = " << basename diff --git a/preprocessor/StaticModel.cc b/preprocessor/StaticModel.cc index 5e75e629b..587354d59 100644 --- a/preprocessor/StaticModel.cc +++ b/preprocessor/StaticModel.cc @@ -1590,10 +1590,7 @@ StaticModel::writeStaticJuliaFile(const string &basename) const output << "module " << basename << "Static" << endl << endl << "using Utils" << endl << endl - << "export getStaticFunction" << endl << endl - << "function getStaticFunction()" << endl - << " static!" << endl - << "end" << endl << endl; + << "export static!" << endl << endl; writeStaticModel(output, false, true); output << "end" << endl; } diff --git a/preprocessor/SteadyStateModel.cc b/preprocessor/SteadyStateModel.cc index 9dfbc22d9..f340fc422 100644 --- a/preprocessor/SteadyStateModel.cc +++ b/preprocessor/SteadyStateModel.cc @@ -128,10 +128,7 @@ SteadyStateModel::writeSteadyStateFile(const string &basename, bool ramsey_model << " info = 0;" << endl; else output << "module " << basename << "SteadyState2" << endl << endl - << "export getSteadyStateFunction" << endl << endl - << "function getSteadyStateFunction()" << endl - << " steady_state!" << endl - << "end" << endl << endl + << "export steady_state!" << endl << endl << "function steady_state!(ys_, exo_, params)" << endl; for (size_t i = 0; i < def_table.size(); i++)