Note that this function is of questionable use for DoFHandler objects built on parallel::distributed::Triangulation since in that case ownership of individual degrees of freedom by MPI processes is controlled by the DoF handler object, not based on some geometric algorithm in conjunction with subdomain id. In particular, the degrees of freedom identified by the functions in this namespace as associated with a subdomain are not the same the DoFHandler class identifies as those it owns.
[...]
However, the documentation of the former function statesNote that this function is of questionable use for DoFHandler objects built on parallel::distributed::Triangulation since in that case ownership of individual degrees of freedom by MPI processes is controlled by the DoF handler object, not based on some geometric algorithm in conjunction with subdomain id. In particular, the degrees of freedom identified by the functions in this namespace as associated with a subdomain are not the same the DoFHandler class identifies as those it owns.What is the meaning of the second line? I suppose this has something to do with the FiniteElement type of the dof handler. Does this mean to say that irrespective of whether the FiniteElement has dofs on cell faces or not, this function approves a dof if it is geometrically residing on a face? This behaviour is actually what I want because although FE_DGQ element doesn't attach any dofs to cell faces, I want to get dof indices of the dofs (geometrically) lying on the face.
DoFTools::dof_indices_with_subdomain_association returns the degrees of freedom of all the cells that have the given subdomain id. For parallel::distributed::Triangulation objects the subdomain id is the the MPI rank and this is the only valid input.
In this case, the function simply returns all the degrees of freedom on locally owned cells. If a finite element defines degrees of freedoms that are associated with a face, these degrees of freedom are part of all the IndexSet objects in case the face is located on the interface between two subdomains. For a parallel::distributed::Triangulation object, these are the degrees of freedom on the faces to ghosted cells
You could still ask for the unit support points and figure out which of them are geometrically on a given face.
However, note that as soon as gradients are involved all the degrees of freedom contribute to values on faces.
You could still ask for the unit support points and figure out which of them are geometrically on a given face.This is definitely possible, but would probably be inefficient if I code for it. Isn't there a function in DoFTools which does this? Because not marking all dofs of ghost cells as relevant will give much savings in communication, I was wondering if DoFTools already doesn't have an implementation for this.
However, note that as soon as gradients are involved all the degrees of freedom contribute to values on faces.I don't have much experience in parallel programming, but I think we can circumvent this by computing gradients at all dof locations in a subdomain and again only communicating data of dofs lying on subdomain interfaces. I might need some correction on this :).