← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5294: Renumber colors to start at zero and add check for contiguous coloring.

 

On Thu, Nov 18, 2010 at 11:36:05AM +0000, Garth N. Wells wrote:
>
>
> On 18/11/10 11:03, noreply@xxxxxxxxxxxxx wrote:
> >------------------------------------------------------------
> >revno: 5294
> >committer: Anders Logg<logg@xxxxxxxxx>
> >branch nick: dolfin
> >timestamp: Thu 2010-11-18 12:00:07 +0100
> >message:
> >   Renumber colors to start at zero and add check for contiguous coloring.
> >   Something fails (segfault in coloring demo), will fix later.
>
> I think that I've fixed the seg fault. It was related to code like
>
>  const MeshFunction<dolfin::uint>& colors_vertex = mesh.color("vertex");
>  const MeshFunction<dolfin::uint>& colors_edge = mesh.color("edge");
>
> The function Mesh::color deletes the old data when asking for a new
> colouring, which leave colors_vertex dangling. Could we re-use data,
> so that the reference to colors_vertex remains valid? Or could we
> store different colourings (vertex, edge, facet)?

Yes, we could reuse the coloring MeshFunction, but not the arrays for
the number of such arrays may change.

I've fixed this now and will push soon.

--
Anders



References