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
Update Laplacian jump indicator tests #10288
Update Laplacian jump indicator tests #10288
Conversation
* Drop redundant periodic, FunctionNeumannBCs, and associated Functions. * We have to use FunctionPenaltyDirichletBC with Hermites because MOOSE does not correctly handle the setting of DirichletBCs for HERMITE elements. * Switch test to use new [Adaptivity] system. Note that this changes this output of the 'dofs' postprocessor since there are now elemental dofs for the marker variable in the system. This required regolding the tests, but I checked to make sure that the solutions were still the same. * Drop gold files that were not used for anything. * If you use periodic BCs, you should not apply any other kind of BC on that boundary. * Reduce the order of the custom quadrature rule used. This seemed to make no difference in the results and might speed up the test just a bit. Refs idaholab#2190.
These Kernels/BCs are needed for properly testing the LaplacianJumpIndicator, but they are probably general enough that they could be added to MOOSE proper, if desired. Refs idaholab#2190.
These new tests are based on the Biharmonic equation (and its transient variant) so the Laplacian jump indicator is appropriate for estimating the error. In the process of developing these tests, it was discovered that MOOSE is not currently imposing Dirichlet BCs for Hermite elements correctly. Specifically, MOOSE constrains only the *value* degrees of freedom when Dirichlet BCs are imposed, but setting BCs for Hermite elements involves the gradient degrees of freedom as well, according to @roystgnr. The current workaround is to use a penalty approach for enforcing the boundary conditions, but this comes with the obvious drawbacks of dramatically increasing the initial residual and changing the conditioning of the system. Refs idaholab#2190.
I also fixed the tests in |
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.
Very minor comments. Looks much better, thanks! I guess we don't require .md files for test objects?
test/include/bcs/BiharmonicLapBC.h
Outdated
{ | ||
public: | ||
BiharmonicLapBC(const InputParameters & parameters); | ||
virtual ~BiharmonicLapBC() {} |
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 usually don't bother putting these in on derived classes anymore.
test/include/bcs/BiharmonicLapBC.h
Outdated
virtual ~BiharmonicLapBC() {} | ||
|
||
protected: | ||
virtual Real computeQpResidual(); |
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.
override
Job Documentation on 07cdc2c wanted to post the following: View the site here This comment will be updated on new commits. |
Shhh don't tell Andrew... |
These tests were previously solving an incorrect weak form of the advection-diffusion equation that somehow "worked" although @roystgnr and myself remain stumped as to why. This PR adds test Kernels/BCs for solving the biharmonic equation (which requires C1 elements) and tests the Laplacian jump indicator with this PDE instead.
In the course of investigating this issue, it was discovered that the way MOOSE imposes Dirichlet boundary conditions is not correct for Hermite elements, since the constraints must involve not only the value dofs but the gradient dofs as well. The current workaround is to use penalty BCs for these tests, but there are known drawbacks to this. A longer term fix is to look into the
DirichletBoundary
objects in libMesh to see if they can be used in MOOSE, or to employ a non-penalty approach like Nitsche's method for imposing BCs (I know this works for H1 problems and Lagrange elements, not sure about the Biharmonic problem.)Refs #2190.