Open tyagi-ankit opened 2 months ago
In the case above, we are constraining a single constant value to an interface. Then we only supply a single space in the locate_dofs_topological
function.
When we want to use a function to apply the boundary condition in a sub space, we create a function in the collapsed sub-space
V0, _ = V.sub(0).collapse()
u_bc = dolfinx.fem.Function(V0)
u_bc.interpolate(....)
For this use-case, one provides a tuple (V.sub(0), V0)
to locate dofs topological, as we want the degrees of freedom in both V0
(to extract data from u_bc
) and V.sub(0)
(to apply the boundary condition to our system with the full function space V
.
Thanks Jørgen for a very quick reply. You are doing a great job. Your reply has clarified things for me.
Still, I think the mentioned chap-3 text still need updating, as it's not consistent with the code.
Also, the clarification you gave, isn't available either in the tutorials or particularly in the API docs. I find many things in FEniCSx to be magical, which the API docs don't clarify.
What you mentioned for locate_dofs_topological
, is that true for locate_dofs_geometrical
also?
One side question, is there an updated version of "FEniCS book" consistent with the FEniCSx?
Thanks a lot
It says:
But only the subspace is provided:
boundary_dofs_x = locate_dofs_topological(V.sub(0), mesh.topology.dim - 1, boundary_facets)
Please clarify. I have also seen examples on the discourse where both are specified. It's confusing.
Thanks.