Ferrite.jl icon indicating copy to clipboard operation
Ferrite.jl copied to clipboard

Workspace/additional data for interpolations in CellValues

Open fredrikekre opened this issue 1 year ago • 2 comments

To generalize CellValues I think interpolations should be able to store stuff in an additional struct field, e.g.

struct CellValues{..., IPD}
   # ...
   interpolation_data::IPD
end

Two usecases:

  1. Interface elements (and I suppose regular embedded elements) it is useful to store the rotation, see e.g. https://github.com/kimauth/FerriteCohesiveZones.jl/blob/fa274d16020ff33e0772a882136c4c46ee630951/src/cohesive_values.jl#L13. This is used to rotate to and from the local coordinate system. Currently this is solved by defining a new CohesiveVectorValues struct https://github.com/kimauth/FerriteCohesiveZones.jl/blob/fa274d16020ff33e0772a882136c4c46ee630951/src/cohesive_values.jl#L4 but I think this wouldn't be necessary if the interpolation could ask to store this in the extra field instead. In that case, passing an interface interpolation to the regular CellValues would just work
  2. Vector-valued elements (RT, Nedelec) need to permute and change sign of their base functions during reinit!. This means that we need to store N(ξ) somewhere, and store the mapped value, with sign/permutation in the N(x) field of the current CellValues struct.

fredrikekre avatar Apr 24 '23 10:04 fredrikekre