On 9/15/25 05:33, Praveen C wrote:
> The violated condition was: fe.is_primitive(i)
> Additional information: This function can only deal with requested
> boundary values that
> correspond to primitive (scalar) base elements. You may want to look
> up in the deal.II glossary what the term 'primitive' means.
> There are alternative boundary value interpolation functions in
> namespace 'VectorTools' that you can use for non-primitive finite
> elements.
>
> But FE_RaviartThomasNodal actually has nodal dofs on the boundary which
> fix u.n.
>
> Is this not working because it is not implemented, or it is not possible
> to do this at all ?
Praveen:
the issue is with this part of the error message:
This function can only deal with requested boundary values that
correspond to primitive (scalar) base elements.
The issue is that the function you're trying to call is trying to
evaluate the boundary values at the node points, and then assign that
value to the corresponding degree of freedom (=element in the solution
vector). But in the case you're considering here, the degree of freedom
value isn't supposed to be f(x_j), but f(x_j).n(x_j). The function just
doesn't know that because it's specific to the finite element what node
functionals are supposed to represent.
I believe that there are other functions that can deal with boundary
values for H_div conforming elements. There would also be ways to
implement computing the boundary values that make use of the concept of
"generalized support points" (see the glossary) but I don't recall
whether any of the functions for boundary values make use of this concept.
Best
W.