Hot answers tagged


Use of Lagrange multipliers produces a saddle-point problem, $$ \begin{pmatrix} A & B^T \\ B & 0 \end{pmatrix} \begin{pmatrix} u \\ \lambda \end{pmatrix} = \begin{pmatrix} b \\ 0 \end{pmatrix} $$ As you've noticed, many preconditioners break down for this sort of system. One can use direct solvers that support pivoting, but if you want iterative ...


We can rewrite the equation as $ \frac{-2 f f'}{(1+f^2)^2} = \frac{f}{1+f^2} $ which reduces to $ f' = - \frac{1+f^2}{2} $ The latter does not have $1+f^2$ in the denominator, so it should not have the aforementioned numerical problem and can be easily integrated numerically. In fact, now the equation can be easily seen to have a trivial analytic solution, ...


You don't do that for large and sparse matrices. It's an inefficient operation. Rather, you zero out the $n$th row and column and put a nonzero entry on the diagonal. Then you think about what operations that you wanted to do on the $99\times 99$ matrix need to look like on the modified $100\times 100$ matrix.


If you're looking for an example, take a look at the MatrixBase class here:


It's a misunderstanding that you need two different meshes: The proper way to see things is that you are using the same mesh, but different polynomial spaces for the two variables. For example, for the Stokes equation, you'd have quadratic polynomials for the velocity $\mathbf u$ and linear polynomials for the pressure $p$. Appropriate parallelization ...

Only top voted, non community-wiki answers of a minimum length are eligible