Skip to content
Snippets Groups Projects
Commit ae72026e authored by graeser's avatar graeser Committed by graeser
Browse files

Simplify branch structure in damping code

[[Imported from SVN: r13079]]
parent 7135d642
No related branches found
No related tags found
No related merge requests found
......@@ -447,10 +447,11 @@ class BlockNonlinearTNNMGProblem
*/
double computeDampingParameter(const VectorType& u, const VectorType& projected_v) const
{
if (not(linesearch.enable_flag))
return 1.0;
double alpha = 1.0;
if (linesearch.enable_flag)
{
// normalize vector v to increase stability
VectorType v = projected_v;
double scalingFactor = 1.0;
......@@ -549,7 +550,6 @@ class BlockNonlinearTNNMGProblem
// rescale alpha
alpha = alpha/scalingFactor;
}
return alpha;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment