Personal tools
You are here: Home / openCMISS / Wiki / Libmesh Boundary Conditions
Log in

Forgot your password?

Libmesh Boundary Conditions

Section 2.4 Boundary Conditions of Ondrej Certik's "notes on FEM": describes the penalty method used to apply Dirichlet boundary conditions.

  • The boundary fluxes for the conservation equations corresponding to test functions that are non-zero on the Dirichlet boundary are not known. Zero appears to be substituted for the fluxes, making the equations incorrect.
  • The L2 projection of the Dirichlet boundary value errors are added to the matrix, "multiplied by some large factor so that, in floating point arithmetic, the existing (smaller) entries in the matrix and right-hand-side are effectively ignored" ("Example 3": and so the incorrect conservation equations are effectively ignored.
  • These issues are discussed in "this thread":

The Nitsche method for Dirichlet boundary conditions is similar to the penalty method but corrects the conservation equations so that they are consistent.

  • There is still a parameter to be selected for the Dirichlet terms that depends on the mesh, but it does not need to be so large as to swamp the conservation equations and so the system is better conditioned.
  • More details are in M. Juntunen and R. Stenberg's "A finite element method for general boundary conditions": for the Proceedings of the 18 Nordic Seminar on Computational Mechanics, which also points out the inconsistency of the penalty method.
  • The Nitsche method can also be used on interfaces between portions of the domain with non-matching meshs, as analysed in R. Becker, P. Hansbo, and R. Stenberg's "A finite element method for domain decomposition with non-matching grids": in Mathematical Modelling and Numerical Analysis 37 (2003) 209-225.

"This message from Ben Kirk": says "there is a more "conventional" way to assign Dirichlet BCs in

the case of lagrange elements..."
  • DenseMatrix::condense can be used to do this. Some of the issues involved are mentioned in "this thread":
  • It may be possible to use 'DofMap::add_constraint_row' to add a zero contraint to remove equations corresponding to Dirichlet boundaries. Corrections would need to be made to the solution and right hand side for non-homogeneous Dirichlet conditions. "This message": uses add_constraint_row for periodic boundary conditions (but check followups for suggested improvements).

"This message": and "this message": discuss 'BoundaryMesh' and 'Mesh::boundary_info'.

  • I (Travis) have created an example that implements Dirichlet boundary conditions in the more natural (to me) way. Rows of the matrix corresponding to Dirichlet points are replaced by identity equations. The other rows of the matrix are then changed to make the matrix symmetric. Furthermore, the right-hand side incorporates the effect of boundary conditions.