@@ -7,6 +7,13 @@ and the range the scalar set.
77"""
88abstract type Dof <: Map end
99
10+ """
11+ struct LinearCombinationDof <: Dof
12+
13+ Type to represent an element of a [`LinearCombinationDofVector`](@ref).
14+ """
15+ struct LinearCombinationDof <: Dof end
16+
1017"""
1118 struct LinearCombinationDofVector{T<:Dof,V,F} <: AbstractVector{T}
1219 values :: V
@@ -23,7 +30,7 @@ Fields:
2330- `values::AbstractMatrix{<:Number}` the matrix of the change from dof basis (b) to (a)
2431- `predofs::AbstractVector{T}` A type representing dof pre-basis (b), with `T<:Dof`
2532"""
26- @ahe struct LinearCombinationDofVector{T,V,F} <: AbstractVector{T }
33+ @ahe struct LinearCombinationDofVector{T,V,F} <: AbstractVector{LinearCombinationDof }
2734 values:: V
2835 predofs:: F
2936 function LinearCombinationDofVector (
4653
4754Base. size (a:: LinearCombinationDofVector ) = (size (a. values,2 ),)
4855Base. IndexStyle (:: LinearCombinationDofVector ) = IndexLinear ()
49- Base. getindex (:: LinearCombinationDofVector{T} ,:: Integer ) where T = T ()
56+ Base. getindex (:: LinearCombinationDofVector ,:: Integer ) = LinearCombinationDof ()
5057
5158function linear_combination (a:: AbstractMatrix{<:Number} , b:: AbstractVector{<:Dof} )
5259 LinearCombinationDofVector (a,b)
@@ -104,7 +111,7 @@ function Base.getindex(b::ConcatenatedDofVector, i::Integer)
104111 lengths = length .(bases)
105112 first_indices = accumulate (+ , lengths)
106113 basis_index = findfirst (>= (i), first_indices)
107- first (bases[basis_index]) # this is PointValue() or Moment () whatever i
114+ first (bases[basis_index]) # this is PointValue(..), Moment() or LinearCombinationDof () whatever i
108115end
109116
110117function Arrays. return_cache (b:: ConcatenatedDofVector , field)
0 commit comments