Ferrite-FEM / Ferrite-FEM/Tensors.jl
zero(x::MixedTensor) returns an array
Open
- Dominant language
- Julia
- Stars
- 182
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
```julia
julia> x = MixedTensor2{3,2}((1.0, 0.0, 0.0, 0.0, 1.0, 1.0))
3×2 MixedTensor2{3, 2, Float64, 6}:
1.0 0.0
0.0 1.0
0.0 1.0
julia> zero(x)
3×2 Matrix{Float64}:
0.0 0.0
0.0 0.0
0.0 0.0
julia> zero(typeof(x))
3×2 MixedTensor2{3, 2, Float64, 6}:
0.0 0.0
0.0 0.0
0.0 0.0
```
Because `MixedTensor` is not part of `Tensors.AllTensors` union, see constructors.jl, `@eval @inline Base.$op(t::AllTensors) = $op(typeof(t))` missing
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.