getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] [getfem-commits] branch master updated: yet another sma


From: Yves Renard
Subject: [Getfem-commits] [getfem-commits] branch master updated: yet another small fix in region number for gmsh import
Date: Wed, 18 Nov 2020 02:34:53 -0500

This is an automated email from the git hooks/post-receive script.

renard pushed a commit to branch master
in repository getfem.

The following commit(s) were added to refs/heads/master by this push:
     new bbc5d76  yet another small fix in region number for gmsh import
bbc5d76 is described below

commit bbc5d7619d6b099fb517bd3a9abef9dbdca65100
Author: Yves Renard <Yves.Renard@insa-lyon.fr>
AuthorDate: Wed Nov 18 08:34:38 2020 +0100

    yet another small fix in region number for gmsh import
---
 src/getfem_import.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/getfem_import.cc b/src/getfem_import.cc
index bd8ab50..7056697 100644
--- a/src/getfem_import.cc
+++ b/src/getfem_import.cc
@@ -328,15 +328,13 @@ namespace getfem {
     std::vector<gmsh_cv_info> cvlst; cvlst.reserve(nb_cv);
     dal::bit_vector reg;
     for (size_type block=0; block < nb_block; ++block) {
-      unsigned type, region;
+      unsigned dimr, type, region;
       if (version >= 4.) { /* Format version 4 */
-        f >> region >> dummy >> type >> nb_cv;
-      
+        f >> dimr >> region >> type >> nb_cv;
         if (reg.is_in(region)) {
-          GMM_WARNING2("Two regions have the same number, "
-                       "modifying the region number");
-          reg.add(0); reg.add(1); 
-          region = unsigned(reg.first_false());
+          GMM_WARNING2("Two regions share the same number, "
+                       "the region numbering is modified");
+          while (reg.is_in(region)) region += 5;
         }
         reg.add(region);
       }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]