Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Critical bugfix NONLINEAR time stepping #17

Merged
merged 2 commits into from
Mar 4, 2016

Conversation

hydromarc
Copy link

fix to select self-adaptive time step which evaluates non-linear iterations.

before, it would select linear steps, as it found "linear" also in "nonlinear".

@norihiro-w
Copy link
Contributor

i am not understanding the bug you explained. Do you mean (1) convertIterationType("NONLINEAR") returns IterationType::LINEAR or (2) convertIterationType("LINEAR") returns IterationType::NONLINEAR?

@@ -583,7 +583,7 @@ IterationType::type convertIterationType(const std::string& str)
{
if (str.find("LINEAR")!=std::string::npos)
return IterationType::LINEAR;
else if (str.find("NONLINEAR")!=std::string::npos)
else if (str.find("NONLIN")!=std::string::npos)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make exact comparisons? like str.compare("NONLINEAR")==0 or str=="NONLINEAR"?

@norihiro-w norihiro-w added the bug label Mar 4, 2016
@hydromarc
Copy link
Author

@norihiro-w the bug is, that if you have "NONLINEAR" in the .tim file, ogs will still use IterationType::LINEAR. Your second comment, using exact comparisons, would solve that better. I'll correct.

norihiro-w added a commit that referenced this pull request Mar 4, 2016
[BUGFIX] Critical bugfix NONLINEAR time stepping
@norihiro-w norihiro-w merged commit 09bedb7 into ufz:master Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants