Constrained linear systems arise when Dirichlet boundary conditions are imposed on a variational formulation

Find $u\in U$ such that

for all $v \in V$, where

where $\bar{u}$ is the Dirichlet condition.

We additively decompose the solution into known and unknown parts:

and substitute into our variational formulation

We can take advantage of the linearity condition, and reformulate the variational formulation:

Find $w\in V$ such that

for all $v \in V$.

The algorithmic analogue of this formulation will be developed in the following section Direct Modification Approach.

# Static Condensation Approach

For a linear system

of size $N\times N$, we constrain the values of the solution or right-hand side at certain degrees of freedom. We sort the system so that these degrees of freedom are grouped together after the unconstrained degrees of freedom. The resulting system is,

Defining submatrices and vectors for the partitions, we can write

or

Let $\Bu_2 = \bar{\Bu}$ and $\Bb_1 = \bar{\Bb}$ have defined values. The objective is to solve for unknown $\Bu_1$ and $\Bb_2$. We have

and

\begin{align} \Bb_2 = (\BA_{22}-\BA_{21}\BA_{11}\inv\BA_{12})\Bu_2 + \BA_{21}\BA_{11}\inv\Bb_1 \end{align}

In case $\bar{\Bu} = \Bzero$, we have

and in case $\bar{\Bb} = \Bzero$, we have

## Example: Plane Stress and Strain in Linear Elasticity

The constitutive equation of isotropic linear elasticity reads

The plane stress condition reads $\sigma_{13} = \sigma_{23}= \sigma_{33} = 0$. We group the constrained degrees of freedom together:

which we write as

The purpose is to obtain a reduced system without $\Bsigma’$ or $\Bvarepsilon’$. We substitute the plane stress condition $\Bsigma’=\Bzero$, to obtain $\Bvarepsilon’=-\BC_{22}\inv\BC_{21}\Bvarepsilon$. Then we have

We define the plane stress version of the elasticity tensor as $\BC_\sigma = \BC_{11}-\BC_{12}\BC_{22}\inv\BC_{21}$ which results in

The plane strain condition reads $\Bvarepsilon’=\Bzero$. This simply results in

The plane strain version of the elasticity tensor $\BC_\varepsilon=\BC_{11}$ is calculated as

The procedure defined above is called static condensation, named after its application in structural analysis. One impracticality of this formulation is that systems do not always exist with their constrained degrees of freedom grouped together. These are generally scattered arbitrarily throughout the solution vector, and grouping them manually is impractical with current data structure implementations.

# Direct Modification Approach

Suppose we have a system where $\Bu_2$ and $\Bb_1$ are known and $\Bu_1$ and $\Bb_2$ are unknown:

We can modify the system so that it can be solved without separating the partitions

We can additively decompose both sides

Therefore, the following is equivalent to \eqref{eq:u1staticcond1}:

This is solved for $\Bu$:

The unknown right hand side can be obtained from the original matrix $\BA$

Observe that the modifications on $\BA$ are symmetric, so we do not need the constrained degrees of freedom be grouped together. $\tilde{\BA}$ is obtained by zeroing out the rows and columns corresponding to constraints and setting the diagonal components to one. For $\tilde{\Bb}$, we do not need to extract $\BA_{12}$; we simply let

where

We then equate the constrained degrees of freedom to their specified values $\Bu_2$.

Below is a pseudocode outlining the algorithm.

fun solve_constrained_system(A, b_known, u_known, is_contrained):
# A: unmodified matrix, size NxN
# b_known: known values of the rhs, size N
# u_known: known values of the solution, size N
# is_constrained: bool array whether dof is constrained, size N

N = length(b)
A_mod = copy(A)
b_mod = b_known - A_known*u_known # Calculate rhs vector

for i=1 to N do:
if is_constained[i] then:
for j = 1 to N do:
A_mod[i][j] = 0 # Set row to zero
A_mod[j][i] = 0 # Set column to zero
endfor
A_mod[i][i] = 1 # Set diagonal to one
b_mod[i] = u_known[i]
endif
endfor

u = inverse(A_mod)*b_mod # Solve constrained system
# Could also say solve(A_mod, b_mod)
b = A*u # Substitute solution to get final rhs vector

return u, b
endfun


# Constrained Update Schemes

When using an iterative solution approach, one generally has an update equation of the form

where $\Bu$ is the solution vector of the primary unknown. The update vector $\Var\Bu$ is obtained by solving a linear system and added to the solution vector in each iteration. This process is usually terminated when the approximation error drops below a threshold value.

\When the solution vector itself is constrained, the update system needs to be modified accordingly. Grouping the constrained degrees of freedom together,

Let $\Bu_2$ be known and $\Bu_1$ be unknown.

We can make the substitution $\Var\Bu_2=\Bu_2-\bar{\Bu}_2$:

This system can then be solved for the unknown $\Var\Bu_1$ and $\Var\Bb_2$ with the procedure defined in the previous section. The only difference is that,