← Back to team overview

dolfin team mailing list archive

Re: MeshData small improvements

 

On 15/12/08 02:26 PM, Bartosz Sawicki wrote:
Hi there,

I've recently found MeshData class which is very useful for storing boundary indicators, materials data and other stuff. I start to use this features for my projects, and realized that some details can be easily improved.
My ideas for the better MeshData structure:

1. const Mesh& Mesh::operator=(const Mesh& mesh)
I think that the live would be much easier, when you add line:
   _data = mesh._data;
This is probably the bug, because I can't understant why not to copy data related with mesh object.

2. MeshData::createMeshFunction(std::string name)
Would it be possible to create function with 'dim' parameter for new MeshFunction? Something like this: MeshFunction<dolfin::uint>* MeshData::createMeshFunction(std:string name, uint dim)

3. MeshData::clear()
The method should clear also 'maps'.

4. MeshData::display()
The method should print also 'maps'.

5. Mesh::data() and its const version can be inline.

6. Do we really need three kinds of structures inside the MeshData (MeshFunctions, Arrays, maps)? Every different structure need separate treatment, so it would be easier to mountain and learn when it would be as simple as possible.

Any way, I think that MeshData is great feature. :) Thanks.

regds.
BArtek

Could someone from the core team clarify me if my request has any sense.
The most of ideas is very simple to implement, and I can send you patch.

There are more problems with MeshData. For example function refine() change mesh topology, so it propably should change data related with mesh structure. But we don't have any direct relation between mesh entities and mesh data, so it would be very difficult to write any general code.

I my opinion only MeshFunction data can follow mesh transfomations, so i should be only data stored inside MeshData container.

regrd.
BArtek


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References