DirichletBC pointwise approach is too slow

Issue #204 resolved
Mikael Mortensen created an issue

The pointwise DirichletBC is attractive since it does not compute facets and thus uses very little memory. However, the approach is currently slow in comparison to the others (at least for repeated applies), because all cells are iterated over each time it is applied (in compute_bc_pointwise). A trivial enhancement seems to be to store the cells where a boundary dof is found, just like for the "topological" and "geometric" approaches, where a list of facets is created the first time apply is called. The next apply can then simply iterate over these cells and save a lot of time.

Any objections, thoughts or reasons I'm not aware of for why this isn't already implemented?

Comments (1)

  1. Log in to comment