Hi everyone!
I have the following question about setting the boundary conditions for dolfinx:
Problem : For mandatory Dirichlet boundary conditions.
Ax=b for example:x2
is known (i.e. Dirichlet boundary condition)
In order to obtain a solution that satisfies the Dirichlet boundary.Often, this equation is treated like this:
So I want to know how dolfinx achieves this?
By apply_lifting(b,[a],[bcs])
?
Yes, DOLFINx does this by:
- Supplying bcs to
assemble_matrix
, this sets the columns and rows with bcs to the identity row/column - Use apply lifting to get the system above (note still with some rows for the dirichlet bc dofs
- Using set_bc to avoid having to do back substitution after solving the problem
2 Likes