dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25860
Re: Tabulating methods for Meshes
On 31 August 2012 07:31, Johan Hake <hake.dev@xxxxxxxxx> wrote:
> Hello!
>
> Once in a while (quite often) we get questions about dof management
> based on Mesh subdomains. There are different approaches to handle this.
> Some less robust than others.
>
> I wonder if it would be a good idea to add:
>
> /// Tabulate all dofs
> DofMap::tabulate_dofs(Array<uint>& dofs, const& Mesh mesh)
>
It's not clear to me what the above does. Why is the Mesh an argument?
> /// Tabulate dofs related to a MeshDomain
> DofMap::tabulate_dofs(Array<uint>& dofs,
> const& MeshFunction domains, uint domain)
>
I don't mind the above, but I think the name could be changed.
I'm really coming around to the syntax
std::vector<uint> DofMap::tabulate_dofs(......)
In most cases it has negligible performance impact. It's much easier
to wrap in Python!
> Then we could iterate over the mesh collect dofs, sort them and last but
> most important make sure they are all local (to processor) dofs.
It's more subtle than just local - on a process there are 'owned' and
'shared but not owned' dofs.
Garth
> This
> would also just work for SubDofMaps.
>
> For safety we could move the method to FunctionSpace, and remove Mesh
> from the top method, so we can make sure the correct Mesh is used.
>
> Johan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References