Ferrite.jl
Ferrite.jl copied to clipboard
Workspace/additional data for interpolations in CellValues
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:
- 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 - Vector-valued elements (RT, Nedelec) need to permute and change sign of their base functions during
reinit!
. This means that we need to storeN(ξ)
somewhere, and store the mapped value, with sign/permutation in theN(x)
field of the currentCellValues
struct.