Ferrite-FEM / Ferrite-FEM/FerriteInterfaceElements.jl
facedof_indices and edgedof_indices wrong fallback?
- Langage dominant
- Julia
- Étoiles
- 10
- Forks
- 3
- Merge moyen
- 3 j 11 h
- PR mergées (30 j)
- 2
Description
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)
((), ())
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.