Skip to content

How to compute the force equivalent to the application of a Dirichlet boundary condition #2101

Answered by thelfer
thelfer asked this question in Q&A
Discussion options

You must be logged in to vote

I finally managed to compute what I wanted which works whatever the way boundary conditions are handled.

I post here a pseudo-code which may help other users and that can be used in many problems (solid mechanics, heat transfer, etc...). The code that I reproduce here is adapted from the mfem-mgis project, so this code may not compile du to adaptations errors but the overall idea shall be ok.

@rcarson3, @jamiebramwell, @barker29 I would appreciate any comments on this code.

Let:

  • m: be a mesh
  • fes: be a finite element space
  • bid: be a boundary identifier
  • i: be a non linear form integrator which computes the inner forces
  • u: be the unknowns

Then the resultant force can be computed as follows:

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@thelfer
Comment options

thelfer Mar 26, 2021
Collaborator Author

Comment options

thelfer
Mar 30, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by thelfer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants