Skip to content

New functions to work with boundaries

Douglas Serson requested to merge feature/boundary into master

This MR creates new functions in MultiRegions to help in performing calculations on boundaries (pressure boundary condition, post-processing,...). The most important of these is GetBndElmtExpansion (we may need better names for these functions), which allows us to obtain an expansion (of the same dimension as the solution) containing only the elements in contact with one of the boundary condition expansions. Other functions are implemented to moving a phys array from the original expansion to this auxiliary expansion, and from the auxiliary expansion to the boundary condition expansion.

Some advantages of this approach are:

  • Reduce the need for expansion specific code in solvers and utilities
  • Encapsulate low-level operations (using BoundaryToElmtMap, looping through elements, etc) in Multi Regions
  • It is important for Homogeneous expansions. Since we don't have homogeneous elements, the current approach of looping through elements is very hard to implement when we need derivatives in the homogeneous direction.

These new functions were then applied to the wss module of FieldConvert, resulting in a simpler code that also works for 2D and 3DH1D (I may have reversed the orientation of the wss, because this is the way it makes sense to me. I do not mind changing it back if this affects someone). This could also be applied to Extrapolate.cpp (for the pressure boundary conditions), but I suppose it is better to do this in another branch (or leave it as it is).

Merge request reports