Correctly propagate “mfs” and “cutoff” to the static model

Those two settings were previously always at their default value for the static
model, independently of what the user would set in the .mod file.
master
Sébastien Villemot 2023-01-17 16:38:03 +01:00
parent fe503d3eab
commit f45a99fc68
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 3 additions and 2 deletions

View File

@ -686,7 +686,6 @@ ParsingDriver::cutoff(const string &value)
{
double val = stod(value);
mod_file->dynamic_model.cutoff = val;
mod_file->static_model.cutoff = val;
}
void
@ -694,7 +693,6 @@ ParsingDriver::mfs(const string &value)
{
int val = stoi(value);
mod_file->dynamic_model.mfs = val;
mod_file->static_model.mfs = val;
}
void

View File

@ -88,6 +88,9 @@ StaticModel::StaticModel(const DynamicModel &m) :
for (auto aux_eq : m.aux_equations)
addAuxEquation(aux_eq->toStatic(*this));
cutoff = m.cutoff;
mfs = m.mfs;
user_set_add_flags = m.user_set_add_flags;
user_set_subst_flags = m.user_set_subst_flags;
user_set_add_libs = m.user_set_add_libs;