On Thu, Mar 13, 2014 at 09:36:33PM +0000, Martin Sandve Alnæs wrote:
> For nonaffine geometries it would be much cleaner if the mesh coordinates were
> always represented by a Function.
>
> In the initial iteration this can be made working by essentially ignoring the
> mesh.geometry() in the assembly, but to get that working it must be special
> cased in various places around dolfin.
>
> So it would be much nicer if MeshGeometry could simply be a Function. Or
> optionally have a Function, maybe that's easier to do. The problem is circular
> dependencies, which are in a way caused by the grouping of geometry and
> topology in the mesh.
>
> I don't really have a question at this point, just want to let everyone know
> that this is an issue that needs considering from various angles.

My first reaction to this is that it would be terribly slow. In many
places, we rely on being able to get the vertex coordinates for a
given cell very quickly. Placing those coordinates in a Function would
add a number of layers on top of the arrays (the whole machinery of
Functions and DofMaps).

Possibilities:

1. Add some special access functions to (a subclass of) Function for
  direct access to vertex coordinates.

or

2. Keep MeshGeometry as is but add a member to the Mesh class named
CoordinateFunction which is either populated by a field of coordinates
(as a Function), or is generated from the vertex coordinates in
MeshGeometry if it has not been set by the user.

--
Anders
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to