Correctly setting initial conditions using Expression() in DG problem

Maybe I’m missing something crucial, but I’m actually surprised this didn’t throw an error.

See the source. Note that it expects a formulation posed only within cell volumes. And consider Where to find 'project'-function in dolfinx? - #2 by nate.

The projection operation you’re proposing doesn’t make sense for an operator (avg(.)) defined on facets only. I’d suggest you construct your own projection operation as you require.

1 Like