I am solving quadratic minimization problem \begin{align} \min_{x}\ \frac{1}{2} x^T A x -b^T x, \end{align}

where matrix A results from discretization of Laplacian by FEM method, subjected to Dirichlet BC.

I am having concerns about computing energy. Should product $ \frac{1}{2} x^T A x -b^T x $ be computed by using matrix A with encoded modification for given BC (zero-ing off diagonals), or should it be done directly on unmodified (pure Neumann) matrix A ?

Is there any special treatment of boundary conditions needed ?

  • 1
    $\begingroup$ What is the unmodified matrix, what is the modified matrix? $\endgroup$ – shuhalo May 27 '17 at 21:14
  • $\begingroup$ If you have only homogeneous Dirichlet boundary conditions it would not matter. But in general, you should use your unmodified matrices to compute the energy. $\endgroup$ – nicoguaro May 28 '17 at 0:18
  • $\begingroup$ @nicoguaro, why? (just curious) $\endgroup$ – VorKir Jun 2 '17 at 4:04
  • $\begingroup$ @VorKir, they will be zeroes inside a summation. $\endgroup$ – nicoguaro Jun 2 '17 at 4:30
  • $\begingroup$ @nicoguaro, will not they be like $d_{ii} x_i^2$ where $d_{ii}$ is the corresponding diagonal element of $A$ (which might be set to 1)? $\endgroup$ – VorKir Jun 2 '17 at 4:36

Your Answer

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

Browse other questions tagged or ask your own question.