When e.g. solving the Helmholtz equation we set vector_type=Vector{ComplexF64} for the FESpace, in that case we obtain correctly that get_dof_value_type(V) == ComplexF64.
When the space is a FESpaceWithLinearConstraints then get_dof_value_type incorrectly returns Float64; based on the default implementation in FESpaceInterface.jl.
PS: It might be that the default implementation for get_dof_value_type in FESpaceInterface.jl is incorrect, as also for V a FESpace with vector_type=Vector{ComplexF64} I obtain get_dof_value_type(get_fe_basis(V), get_fe_dof_basis(V)) == Float64 instead of ComplexF64.
I have extended the tests in FESpacesWithLinearConstraintsTests.jl to have vector_type=Vector{ComplexF64} and added appropriate tests. The first commit in this merge request just shows the current bug with @test get_dof_value_type(Vc) == ComplexF64 broken=true and then fixes the bug as above and runs the test again without the broken=true; the second commit corrects the bug in FESpacesWithLinearConstraints.jl and just leaves a @test get_dof_value_type(Vc) == ComplexF64 in place.
When e.g. solving the Helmholtz equation we set
vector_type=Vector{ComplexF64}
for theFESpace
, in that case we obtain correctly thatget_dof_value_type(V) == ComplexF64
. When the space is aFESpaceWithLinearConstraints
thenget_dof_value_type
incorrectly returnsFloat64
; based on the default implementation inFESpaceInterface.jl
.My fix is to add
to
FESpacesWithLinearConstraints.jl
.PS: It might be that the default implementation for
get_dof_value_type
inFESpaceInterface.jl
is incorrect, as also forV
aFESpace
withvector_type=Vector{ComplexF64}
I obtainget_dof_value_type(get_fe_basis(V), get_fe_dof_basis(V)) == Float64
instead ofComplexF64
.I have extended the tests in
FESpacesWithLinearConstraintsTests.jl
to havevector_type=Vector{ComplexF64}
and added appropriate tests. The first commit in this merge request just shows the current bug with@test get_dof_value_type(Vc) == ComplexF64 broken=true
and then fixes the bug as above and runs the test again without thebroken=true
; the second commit corrects the bug inFESpacesWithLinearConstraints.jl
and just leaves a@test get_dof_value_type(Vc) == ComplexF64
in place.