diff --git a/src/Arrays/Autodiff.jl b/src/Arrays/Autodiff.jl index a879365a0..3199e9068 100644 --- a/src/Arrays/Autodiff.jl +++ b/src/Arrays/Autodiff.jl @@ -29,13 +29,12 @@ function autodiff_array_gradient(a,i_to_x,j_to_i) T0=T end i_to_xdual = lazy_map(DualizeMap(ForwardDiff.gradient),T,i_to_x) - j_to_ydual = a(i_to_xdual,T0) + j_to_ydual = a(i_to_xdual) j_to_cfg = lazy_map(ConfigMap(ForwardDiff.gradient),j_to_x) j_to_result = lazy_map(AutoDiffMap(ForwardDiff.gradient),j_to_ydual,j_to_x,j_to_cfg) j_to_result end - function autodiff_array_jacobian(a,i_to_x,j_to_i) i_to_xdual = lazy_map(DualizeMap(ForwardDiff.jacobian),i_to_x) j_to_ydual = a(i_to_xdual) diff --git a/src/FESpaces/FEAutodiff.jl b/src/FESpaces/FEAutodiff.jl index 1238defc5..baa706c48 100644 --- a/src/FESpaces/FEAutodiff.jl +++ b/src/FESpaces/FEAutodiff.jl @@ -80,10 +80,10 @@ end function _change_argument(op,f,trian,uh::SingleFieldFEFunction) U = get_fe_space(uh) - function g(cell_u,T) + function g(cell_u) v = get_fe_basis(U) cell_basis = get_data(v) - #T=typeof(cell_u) + T=typeof(cell_u) cell_field = lazy_map(linear_combination,T,cell_u,cell_basis) cf = GenericCellField(cell_field,get_triangulation(v),DomainStyle(v)) cell_grad = f(cf) diff --git a/src/MultiField/MultiFieldFEAutodiff.jl b/src/MultiField/MultiFieldFEAutodiff.jl index afb3422c4..5f88b2bf3 100644 --- a/src/MultiField/MultiFieldFEAutodiff.jl +++ b/src/MultiField/MultiFieldFEAutodiff.jl @@ -23,10 +23,11 @@ end function FESpaces._change_argument( op::typeof(gradient),f,trian,uh::MultiFieldFEFunction) U = get_fe_space(uh) - function g(cell_u,T) + function g(cell_u) single_fields = GenericCellField[] nfields = length(U.spaces) for i in 1:nfields + T = eltype(eltype(cell_u)) cell_values_field = lazy_map(a->a.array[i],T,cell_u) v = get_fe_basis(U.spaces[i]) cell_basis = get_data(v)