4
$\begingroup$

If you use a FEM (on the variational formulation), you can discretize some continuous eigenvalue problem, $$L u = \lambda u \ \ \text{on} \ \Omega,$$ into some discrete, generalized eigenvalue problem, $$ K v = \lambda M v, $$ (here with K the stiffness and M the mass matrix; both symmetric and M additionally positive definite)
with $v_i$ being the the value of the eigenvector $v$ on the i'th node of some triangulation of the domain $\Omega$.

Since every PDE needs proper boundary conditions, we have to force the entries $v_k = 0$ for all $k$ corresponding to nodes with homogenous Dirchlet b.c.
One way to do such is zeroing all rows and columns of $K$ and $M$ according to these $k$'s, only letting the $k$'s diagonal entries of the matrix $K$ be non-zero (for example setting it to $1$). For Computation, here i use here the SLEPc library with lanzcos or krylov-schur solvers (with or without spectral transformations), working with large matrices $K$ and $M$ in CSR-format, so doing such transformations might be very costly. Probably more serious is the problem that i make the right-hand Matrix $M$ singular; solving the generalized eigenvalue problem basically is about solving the corresponding simple problem: $$ M^{-1} K v = \lambda x. $$

Now i wanted to ask some people with more experience in this how to apply the Dirichlet b.c. for this type of problem in an optimal way.

$\endgroup$
  • $\begingroup$ Instead of zeroing out the rows and columns, you should delete them (so that the resulting matrices are smaller); this corresponds to solving for the interior degrees of freedom only (which makes sense, since the values on the boundary are fixed and not free). You would then pass to SLEPc the reduced matrices only. $\endgroup$ – Christian Clason Aug 18 '14 at 18:34
  • $\begingroup$ Since you are using a Krylov method: If you prefer not to modify the matrices, you can wrap them in a procedure that first performs the matrix multiplication and then simply sets the boundary values to zero. $\endgroup$ – Christian Clason Aug 18 '14 at 18:40
  • 1
    $\begingroup$ Eliminating the Dirichlet dofs is often inconvenient and adds some complexity to the code for things like visualization, slip boundary conditions, and the like. You can work with either formulation, just don't use penalties or nonsymmetric formulations if you can help it. $\endgroup$ – Jed Brown Aug 19 '14 at 1:55
3
$\begingroup$

I like this formulation for implementing Dirichlet boundary conditions in cases where elimination of boundary dofs is not convenient. If you apply effectively the same procedure to $M$, the rows and columns corresponding to Dirichlet boundary dofs will be rows and columns of the identity. This will give you new eigenvalues equal to 1 (or $\alpha$ in the referenced answer). You can choose $\alpha$ to move them out of the way of the physical eigenvalues you are interested in.

$\endgroup$
  • 3
    $\begingroup$ I don't completely understand your referenced approach in terms of projectors and residuals, so i better ask/try to recap: If you have a Dirichlet node $k$ and set all $k$'th rows and columns of $K$ and $M$ to zero, except letting $K_{k,k} = \alpha$ and $M_{k,k} = 1$, then you basically force the condition: $v_k = \lambda \frac{1}{\alpha} v_k$, i.e. force $v_k = 0$ for all eigenvectors $v$ corresponding to eigenvalues $\lambda \neq \alpha$. If i'm only interested in the smallest eigenvalues and set $\alpha$ very large, the new created trivial $\alpha$-eigenvectors should be out of range. $\endgroup$ – Simul Aug 18 '14 at 20:09
  • $\begingroup$ Yes, exactly. Just choose $\alpha$ away from the region of interest and the eigenvalues and eigenvectors you are interested in will not be contaminated. $\endgroup$ – Jed Brown Aug 19 '14 at 1:49
  • $\begingroup$ The procedure I was describing is a natural way to make those rows and columns equal to a (scaled) identity without needing to assemble and then zero entries (not as clean in parallel). I recommend writing code that way, especially for nonlinear problems, but if you don't have access or otherwise refuse to modify the assembly code, you can implement by zeroing rows and columns. $\endgroup$ – Jed Brown Aug 19 '14 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.