On 2013-11-26 08:47, Mikael Mortensen wrote:
Hi,
I just had a look at `MeshData` and find it somewhat confusing.
Yes, it's very confusing and flawed in design. It should only be used
for user data. I'd support any efforts to avoid its use inside DOLFIN.
`MeshData::create_array(std::string name, std::size_t dim)` always
creates emty vectors regardless of `dim`. In the header `MeshData.h`
the dim argument is called `The size (length) of the array`, but in
`create_array` it is treated as a geometrical dimension. Probably just
need to update the header, right?
I have found that the `MeshData` is being used in `SubMesh`,
`BisectionRefinement` and `RegularCutRefinement`. Here an empty array
is created through `create_array`, then resized and then filled with
values. This is not possible from Python, so probably these methods
should be hidden and not exposed? Or `resize` should be a method of
`MeshData`?
We should hide more low-level functions in the Python interface to (a)
prevent improper use; and (b) make it easier to change/improve low level
interfaces in the future.
Garth
Regards
Mikael
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics