chakravala / Grassmann.jl

⟨Grassmann-Clifford-Hodge⟩ multilinear differential geometric algebra

Home Page:https://grassmann.crucialflow.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in MultiVector constructor for Blades

karlwessel opened this issue · comments

There seems to be a bug in the constructor when creating a MultiVector from a blade:

julia> using Grassmann

julia> basis"++"
(⟨++⟩, v, v₁, v₂, v₁₂)

julia> a = v1 + v2
1v₁ + 1v₂

julia> typeof(a)
MBlade{Int64,⟨++⟩,1,2}

julia> MultiVector(a)
ERROR: type MArray has no field v
Stacktrace:
 [1] getproperty(::Any, ::Symbol) at ./sysimg.jl:18
 [2] MultiVector(::MBlade{Int64,⟨++⟩,1,2}) at .julia/packages/Grassmann/H9Zog/src/multivectors.jl:261
 [3] top-level scope at none:0

There is also another error when creating a Blade from a Basis (whyever one would want to do that, but the constructor is there):

SBlade(v)
ERROR: UndefVarError: N not defined
Stacktrace:
 [1] SBlade{Int64,⟨++⟩,0,364} where 364(::Int64, ::Basis{⟨++⟩,0,0x0000000000000000}) at .julia/packages/Grassmann/H9Zog/src/multivectors.jl:133
 [2] SBlade(::Basis{⟨++⟩,0,0x0000000000000000}) at .julia/packages/Grassmann/H9Zog/src/multivectors.jl:136
 [3] top-level scope at none:0

Constructing a SBlade from a Basis still fails, but now with a different error:

julia> SBlade(v)
ERROR: MethodError: no method matching SBlade{Int64,⟨++⟩,G,364} where 364 where G(::StaticArrays.MArray{Tuple{1},Int64,1,1})
Closest candidates are:
  SBlade{Int64,⟨++⟩,G,364} where 364 where G(::Basis{V,G,B} where B) where {T, V, G} at Grassmann.jl/src/multivectors.jl:167
  SBlade{Int64,⟨++⟩,G,364} where 364 where G(::SValue{V,G,B,T}) where {T, V, G, B} at Grassmann.jl/src/multivectors.jl:172
  SBlade{Int64,⟨++⟩,G,364} where 364 where G(::MValue{V,G,B,T}) where {T, V, G, B} at Grassmann.jl/src/multivectors.jl:173
  ...
Stacktrace:
 [1] SBlade{Int64,⟨++⟩,0,364} where 364(::Int64, ::Basis{⟨++⟩,0,0x0000000000000000}) at Grassmann.jl/src/multivectors.jl:134
 [2] SBlade(::Basis{⟨++⟩,0,0x0000000000000000}) at Grassmann.jl/src/multivectors.jl:137
 [3] top-level scope at none:0