[Gmsh] mesh partition colors

Christophe Geuzaine c.geuzaine at ulg.ac.be
Sat Jun 11 09:24:08 CEST 2005


Jozsef Bakosi wrote:
> Hello all,
> 
> after applying the patch from Chirstophe, in case of a mesh with
> different partitions, gmsh displays the mesh very nicely using
> different colors now. I have, however, a few minor questions/requests
> regarding this functionality.
> 
> If I have mesh-partition #0, how do I set its color? In
> Options->Mesh->Color there are only colors assigned starting from One,
> Two, etc. It would be great to be able to use partition number 0. This
> is a minor thing, however, because one could just save the partitioned
> mesh-file with partition numbers starting from 1 and also gmsh does handle
> partition #0 as a different partition, but still, I think it would
> be great have its color controllable, now that it handles it right.

Hi Jozsef - the current version actually associates the color "one" with
all partitions such that (partition_number % 10) == 0, the color "two"
with all the partitions s.t. (partition_number % 10) == 1, etc.

> 
> How are the colors to partition numbers higher than 10 assigned? Is this
> changeable (through ~/.gmsh-options at least)? I don't wish for too
> many more, but another 10 would be great. Also, I'm not sure, but I
> think I remember correctly that partitions over 10 get the same color
> (or end up having some of the already used colors). That can be confusing.

I've increased the number of colors in the carousel from 10 to 20, and
changed the numbering to start at "zero" instead of "one". It should be
less confusing this way :-)

> 
> When I save partitions of a bigger mesh into seperate files with
> different partition numbers (but each file only has one number of course),
> it would be great if gmsh displayed the mesh according to the number in the
> file (and not using the the color for partition One, since that is the
> only one in that file). (I know if I just wanted to look at the different
> partitions (from one file), I could just hide the ones I don't want to look
> at, but I needed to save different partitions to different files and wanted
> to look at them separately to see if they are correctly transmitted/received
> and -- locally to a processor -- reordered well. Yeah, that was a way of
> debugging for me... :-)

I don't understand your question: the color is already chosen according 
to the partition number (in the file).

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org