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
Adding VariableResidualNorm postprocessor #8518
Conversation
I would like to have a vector postprocessor that runs on non linear and gathers residual norms. Seems more useful for convergence studies. |
6fc5612
to
25f7c20
Compare
For doing convergence studies, it is useful to be able to plot the residual norm of variables of the interest. MOOSE computes these values, but we want to be able to store them as postprocessor values, so we can plot them easily without postprocessing the console output. Closes idaholab#7206
25f7c20
to
7d4a3b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks OK, just one comment about
input = 'variable_residual.i' | ||
csvdiff = 'variable_residual_out.csv' | ||
max_threads = 1 | ||
max_parallel = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the restrictions? I know it's a small test but it should still run in parallel right?
VariableResidual::execute() | ||
{ | ||
NonlinearSystemBase & nl = _fe_problem.getNonlinearSystemBase(); | ||
_var_residual = nl.system().calculate_norm(nl.RHS(), _var.number(), DISCRETE_L2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any desire to support more than L2? We could make an enum if there might be and default it to L2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think L2 for residual is all we need. If somebody wanted something like H1, we would need a gradient of the residual and I do not think we can compute that...
|
||
# this is large on purpose so we don't reduce the variable residual to machine zero | ||
# and so that we can compare to larger numbers. This also means this test can run only | ||
# in serial, since parallel runs yield different convergence history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Here's the reason it's restricted
For doing convergence studies, it is useful to be able to plot the
residual norm of variables of the interest. MOOSE computes these
values, but we want to be able to store them as postprocessor values, so
we can plot them easily without postprocessing the console output.
Closes #7206