Skip to content

[BUGFIX] Critical bugfix NONLINEAR time stepping - #17

Merged
norihiro-w merged 2 commits into
ufz:masterfrom
hydromarc:master
Mar 4, 2016
Merged

norihiro-w merged 2 commits into
ufz:masterfrom
hydromarc:master

Conversation

@hydromarc

Copy link
Copy Markdown

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
Copy Markdown
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?

Comment thread FEM/FEMEnums.cpp Outdated
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
Copy Markdown
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
Copy Markdown
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