2021-11-03 Software discussion

Last time

  • Running multigrid with PETSc

  • Projects

  • GitHub codesearch, JOSS search

  • Decide what’s next: Finite Element or Finite Volume

Today

  • Project discussion

  • Weak forms

Integration by parts

One dimension

it’s the product rule backwards

(34)\[\begin{align} \int_a^b d(uv) &= \int_a^b u dv + \int_a^b v du \\ (uv)_a^b &= \int_a^b u dv + \int_a^b v du \\ \int_a^b u dv &= (uv)_a^b - \int_a^b v du \end{align}\]

you can move the derivative to the other term; it’ll cost you a minus sign and a boundary term

Multiple dimensions

(35)\[\begin{align} \int_\Omega v \nabla\cdot \mathbf f = -\int_\Omega \nabla v \cdot \mathbf f + \int_{\partial \Omega} v \mathbf f \cdot \mathbf n \end{align}\]

Strong form

\[ -\nabla\cdot(\kappa \nabla u) = 0 \]

Weak form

  • multiply by a test function and integrate by parts

(36)\[\begin{align} -\int_\Omega v \nabla\cdot(\kappa \nabla u) = 0, \forall v \\ \int_\Omega \nabla v \cdot \kappa \nabla u - \int_{\partial\Omega} v \underbrace{\kappa \nabla u \cdot \mathbf n}_{\text{boundary condition}} = 0 \end{align}\]