# inclined/general Dirichlet boundary conditions

For simpilcity, consider a single quad linear elasticity finite element in 2D. The Dirichlet boundary conditions on node 1 and node 2 are easy to implement and can be handled in the standard way. However, the Dirichlet boundary condition on node 3 is more general and is of the form:

$$au_{3x} + bu_{3y} = 0$$

where $$a$$ and $$b$$ are real numbers and $$u_{3x}$$ and $$u_{3y}$$ are the components of the displacement of the node 3, denoted by ($$\bf{u_3}$$), in the $$x$$ and $$y$$ direction. We can handle this boundary condition by Lagrange multipliers and this will result in a matrix system as below, which I think will have increased bandwidth as compared to the standard way of handling Dirichlet boundary conditions. Also, the presence of the $$0$$ matrix might cause problems for the linear system solver (please correct me if I'm wrong).

$$\begin{pmatrix} K & B \\ B & 0 \end{pmatrix} \begin{pmatrix} d \\ \lambda \end{pmatrix} = \begin{pmatrix} f\\ h \end{pmatrix}$$

This treatment is from here: Page 73.

What is the correct/best way of handling inclined/general Dirichlet boundary conditions? Is it Nitsche's method?

Can we handle inclined/general Dirichlet boundary conditions by incorporating them into our finite dimensional expansions for the displacement field?

Bill Greene presents the point of view of how things have been done traditionally. The "modern" way is to add "constraints" to your linear system which, in the current case, would be $$u_{3x} = -u_{3y}.$$ These constraints can be entered straight into the linear system without the detour of the augmented linear system you show -- although the modified linear system can also just be thought of as having done one Gauss elimination step to get rid of the extra row and column.
To provide just one example, in the deal.II finite element library, these sorts of constraints are implemented by the AffineConstraints class. (Disclaimer: I'm one of the principal developers of deal.II.)