dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #11438
Re: MeshData small improvements
On Thu, Dec 18, 2008 at 11:55:12AM -0700, Bartosz Sawicki wrote:
> 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.
Fixed, but I left the assignment operator in MeshData for you to
implement if you need it. It's there now but there's a warning where
there needs to be some code. Note that all mesh data must be recreated
and then the values copied (not one by one, but list by list, the STL
structures can be copied).
> > 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)
Fixed.
> > 3. MeshData::clear()
> > The method should clear also 'maps'.
Fixed.
> > 4. MeshData::display()
> > The method should print also 'maps'.
Please send a patch... :-)
> > 5. Mesh::data() and its const version can be inline.
Fixed.
> > 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.
I think we need all three. We obviously need MeshFunction. Then we
also need Arrays (or rather std::vector) for boundary conditions where
we have markers on the facets only on the boundary (not the internal
facets) so we can't use MeshFunction (since the size of the array must
then be equal to the total number of facets). Then we need the map for
parallel stuff.
> > Any way, I think that MeshData is great feature. :) Thanks.
Thanks. Looking forward to your patch. ;-)
--
Anders
> > 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
> >
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Attachment:
signature.asc
Description: Digital signature
Follow ups
References