When trying to compute a hessian on a form including the skeleton:
module HessianSkeletonTests
using Gridap
model = CartesianDiscreteModel((0.,1.,0.,1.),(2,2))
Λ = SkeletonTriangulation(model)
dΛ = Measure(Λ,2)
reffe = ReferenceFE(lagrangian,Float64,1)
V = FESpace(model,reffe,conformity=:L2)
uh = FEFunction(V,rand(num_free_dofs(V)))
e(uh) = ∫(mean(uh)*mean(uh))*dΛ
hessian(e,uh)
end # module
The following error is produced:
ERROR: MethodError: no method matching lazy_map(::Gridap.Arrays.AutoDiffMap, ::Gridap.Arrays.LazyArray{…}, ::Gridap.Arrays.VectorBlock{…})
The function `lazy_map` exists, but no method is defined for this combination of argument types.
Closest candidates are:
lazy_map(::Any, ::AbstractArray...)
@ Gridap ~/Documents/Gridap.jl/src/Arrays/LazyArrays.jl:55
lazy_map(::typeof(Gridap.Fields.integrate), ::AbstractArray, ::AbstractArray, ::AbstractArray, ::AbstractArray)
@ Gridap ~/Documents/Gridap.jl/src/Fields/ApplyOptimizations.jl:292
lazy_map(::typeof(Gridap.Fields.integrate), ::AbstractArray, ::AbstractArray, ::AbstractArray)
@ Gridap ~/Documents/Gridap.jl/src/Fields/ApplyOptimizations.jl:285
...
Stacktrace:
[1] autodiff_array_jacobian(a::Gridap.Arrays.var"#148#149"{…}, i_to_x::Gridap.Arrays.LazyArray{…}, j_to_i::Gridap.Geometry.SkeletonPair{…})
@ Gridap.FESpaces ~/Documents/Gridap.jl/src/FESpaces/FEAutodiff.jl:187
[2] autodiff_array_hessian(a::Function, i_to_x::Gridap.Arrays.LazyArray{…}, j_to_i::Gridap.Geometry.SkeletonPair{…})
@ Gridap.Arrays ~/Documents/Gridap.jl/src/Arrays/Autodiff.jl:47
[3] _hessian(f::Function, uh::Gridap.FESpaces.SingleFieldFEFunction{…}, fuh::Gridap.CellData.DomainContribution)
@ Gridap.FESpaces ~/Documents/Gridap.jl/src/FESpaces/FEAutodiff.jl:75
[4] hessian(f::typeof(Main.HessianSkeletonTests.e), uh::Gridap.FESpaces.SingleFieldFEFunction{…})
@ Gridap.FESpaces ~/Documents/Gridap.jl/src/FESpaces/FEAutodiff.jl:57
[5] top-level scope
@ ~/Documents/Gridap.jl/test/FESpacesTests/FEAutodiffTests.jl:10
Some type information was truncated. Use `show(err)` to see complete types.```
When trying to compute a hessian on a form including the skeleton:
The following error is produced: