Evaluation FEFunctions on embedded meshes
- Dominant language
- Julia
- Stars
- 879
- Forks
- 119
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 4
Description
Hi, below I am trying to evaluate a finite element function at a point where the function is in a FE space over on embedded mesh. The function can be created (and eg. plotted) but there is an error when I want to do interpolation at a point (which is
in the mesh).
```julia
using Gridap
domain = (0, 1, 0, 1)
partition = (5, 5)
mesh = CartesianDiscreteModel(domain, partition)
dmesh = BoundaryTriangulation(mesh)
elm = ReferenceFE(lagrangian, Float64, 1)
W = FESpace(dmesh, elm)
fh = interpolate_everywhere(x -> x[1]+x[2], W)
fh(Point(0., 0.)) # Errors
```
From the error I suspect that the issue is due to the fact that the the point is in $R^2$ while the mesh of `fh` is topologically 1d.
Can one use pseudo inverse in this case?
```
ERROR: LoadError: DimensionMismatch: matrix is not square: dimensions are (1, 2)
Stacktrace:
[1] checksquare(A::Type)
@ LinearAlgebra ~/Documents/Software/julia/usr/share/julia/stdlib/v1.8/LinearAlgebra/src/LinearAlgebra.jl:232
[2] #s25#506
@ ~/.julia/packages/StaticArrays/B0HhH/src/inv.jl:75 [inlined]
[3] var"#s25#506"(S::Any, ::Any, #unused#::Any, A::Any)
@ StaticArrays ./none:0
[4] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
@ Core ./boot.jl:582
[5] inv
@ ~/.julia/packages/StaticArrays/B0HhH/src/inv.jl:5 [inlined]
[6] inv(a::TensorValue{1, 2, Float64, 2})
@ Gridap.TensorValues ~/.julia/packages/Gridap/OTENN/src/TensorValues/Operations.jl:483
```
Contributor guide
Assessment
This issue has not been assessed yet.