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

Update Laplacian jump indicator tests #10288

Merged
merged 4 commits into from Nov 17, 2017

Conversation

jwpeterson
Copy link
Member

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.

* 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.
@jwpeterson
Copy link
Member Author

I also fixed the tests in tests/variables/fe_hermite_convergence since they had similar inconsistent weak forms, i.e. too many boundary conditions were imposed on each boundary.

Copy link
Member

@permcody permcody left a 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?

{
public:
BiharmonicLapBC(const InputParameters & parameters);
virtual ~BiharmonicLapBC() {}
Copy link
Member

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.

virtual ~BiharmonicLapBC() {}

protected:
virtual Real computeQpResidual();
Copy link
Member

Choose a reason for hiding this comment

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

override

@moosebuild
Copy link
Contributor

moosebuild commented Nov 17, 2017

Job Documentation on 07cdc2c wanted to post the following:

View the site here

This comment will be updated on new commits.

@jwpeterson
Copy link
Member Author

I guess we don't require .md files for test objects?

Shhh don't tell Andrew...

@jwpeterson
Copy link
Member Author

BTW, here's what the error indicator looks like as we refine the grid for the new problem (true solution is a Gaussian centered at the origin).

error_10x10
error_20x20
error_40x40
error_80x80

@permcody permcody merged commit c95af76 into idaholab:devel Nov 17, 2017
@jwpeterson jwpeterson deleted the laplacian_jump_indicator_test branch November 17, 2017 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants