[Dune] [Dune-Commit] dune-grid r7829 - trunk/dune/grid/io/file

Christian Engwer christian.engwer at uni-muenster.de
Wed Jan 11 09:47:11 CET 2012


Hi Jö,

while it is nice to cleanup the unused variables, this code was also
some kind of documentation of the gmsh format. I'd prefer having the
code and adding support to actually use this data. The problem is,
that it is documented in the file format, but it is not clear how to
set and use these fields.

Christian

On Wed, Jan 11, 2012 at 12:44:10AM +0100, joe at dune-project.org wrote:
> Author: joe
> Date: 2012-01-11 00:44:10 +0100 (Wed, 11 Jan 2012)
> New Revision: 7829
> 
> Modified:
>    trunk/dune/grid/io/file/gmshreader.hh
> Log:
> [GmshReader] Fix more warnings about unused variables.
> 
> Modified: trunk/dune/grid/io/file/gmshreader.hh
> ===================================================================
> --- trunk/dune/grid/io/file/gmshreader.hh	2012-01-10 16:00:12 UTC (rev 7828)
> +++ trunk/dune/grid/io/file/gmshreader.hh	2012-01-10 23:44:10 UTC (rev 7829)
> @@ -349,29 +349,17 @@
>              {
>                  int id, elm_type, number_of_tags;
>                  readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
> -                int elementary_entity;
> -                std::vector<int> mesh_partitions;
> -                if ( version_number < 2.2 )
> -                {
> -                    mesh_partitions.resize(1);
> -                }
>                  for (int k=1; k<=number_of_tags; k++)
>                  {
>                      int blub;
>                      readfile(file,1,"%d ",&blub);
>                      // k == 1: physical entity (not used here)
> -                    if (k==2) elementary_entity = blub;
> -                    if ( version_number < 2.2 )
> -                    {
> -                        if (k==3) mesh_partitions[0] = blub;
> -                    }
> -                    else
> -                    {
> -                        if (k > 3)
> -                            mesh_partitions[k-4] = blub;
> -                        else
> -                            mesh_partitions.resize(blub);
> -                    }
> +                    // k == 2: elementary entity (not used here either)
> +                    // if version_number < 2.2:
> +                    //   k == 3: mesh partition 0
> +                    // else
> +                    //   k == 3: number of mesh partitions
> +                    //   k => 4: mesh partition k-4
>                  }
>                  pass1HandleElement(file, elm_type, renumber, nodes);
>              }
> 
> 
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
> 




More information about the Dune mailing list