Ferrite-FEM / Ferrite-FEM/FerriteInterfaceElements.jl

facedof_indices and edgedof_indices wrong fallback?

オープン
#32 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
10
フォーク
3
平均マージ
3日 11時間
マージ済み PR(30日)
2

説明

In https://github.com/Ferrite-FEM/Ferrite.jl/pull/1293 I got a failure because `typeof(ip::InterfaceCellInterpolation)()` doesn't work (which is ok of course), but it also seems like the current default fallback is wrong since the wrong number is used.

Since `facedof_indices` and `edgedof_indices` are only used AFAIU for applying `Dirichlet` boundary conditions (via `dirichlet_facedof_indices` and `dirichlet_edgedof_indices`), this is not used in the interface elements? Of course, for interpolations inside an interface cell, one would have dofs on the external boundary of the interface element, but currently it seems like the implementation assumes that even though `ipi = InterfaceCellInterpolation(Lagrange{RefLine,1}())::Interpolation{RefQuadrilateral}`, there are only 2 edges... And these dofs would be on the 2 (zero-length) edges that are currently missing (but that would belong to something like an `InternalInterfaceCellInterpolation` I guess...).

To support https://github.com/Ferrite-FEM/Ferrite.jl/pull/1293, would it be ok to add the default implementations here instead for `InterfaceCellInterpolation`, given the current behavior? (At least as a temporary solution until the above can be worked out) CC: @DRollin / @kimauth
```julia
Ferrite.edgedof_indices(ip::InterfaceCellInterpolation) = ntuple(i -> (), Ferrite.nedges(ip))
Ferrite.faceedof_indices(ip::InterfaceCellInterpolation) = ntuple(i -> (), Ferrite.nfaces(ip))
```

Output showing the inconsistencies wrt. number of edges/faces between interior and non-interior:
```julia
julia> ipi = InterfaceCellInterpolation(Lagrange{RefLine,1}())
InterfaceCellInterpolation{RefQuadrilateral, 1, Lagrange{RefLine, 1}}(Lagrange{RefLine, 1}())

julia> Ferrite.edgedof_interior_indices(ipi)
((), ())

julia> Ferrite.edgedof_indices(ipi)
((), (), (), ())

julia> ipi2 = InterfaceCellInterpolation(Lagrange{RefLine,2}())
InterfaceCellInterpolation{RefQuadrilateral, 2, Lagrange{RefLine, 2}}(Lagrange{RefLine, 2}())

julia> Ferrite.edgedof_interior_indices(ipi2)
((5,), (6,))

julia> Ferrite.edgedof_indices(ipi2)
((), (), (), ())

julia> ipi_3d = InterfaceCellInterpolation(Lagrange{RefQuadrilateral,1}())
InterfaceCellInterpolation{RefHexahedron, 1, Lagrange{RefQuadrilateral, 1}}(Lagrange{RefQuadrilateral, 1}())

julia> Ferrite.edgedof_interior_indices(ipi_3d)
((), (), (), (), (), (), (), ())

julia> Ferrite.edgedof_indices(ipi_3d)
((), (), (), (), (), (), (), (), (), (), (), ())

julia> Ferrite.facedof_indices(ipi_3d)
((), (), (), (), (), ())

julia> Ferrite.facedof_interior_indices(ipi_3d)
((), ())
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。