r45558 - in /packages/gmsh-tetgen/trunk/debian: patches/cgns.patch patches/series rules

trophime-guest at users.alioth.debian.org trophime-guest at users.alioth.debian.org
Mon Feb 4 14:53:25 UTC 2013


Author: trophime-guest
Date: Mon Feb  4 14:53:24 2013
New Revision: 45558

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=45558
Log:
add cgns support

Modified:
    packages/gmsh-tetgen/trunk/debian/patches/cgns.patch
    packages/gmsh-tetgen/trunk/debian/patches/series
    packages/gmsh-tetgen/trunk/debian/rules

Modified: packages/gmsh-tetgen/trunk/debian/patches/cgns.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/gmsh-tetgen/trunk/debian/patches/cgns.patch?rev=45558&op=diff
==============================================================================
--- packages/gmsh-tetgen/trunk/debian/patches/cgns.patch (original)
+++ packages/gmsh-tetgen/trunk/debian/patches/cgns.patch Mon Feb  4 14:53:24 2013
@@ -1,11 +1,13 @@
 Description: <short summary of the patch>
 Author: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>
 Reviewed-by: Anton Gladky <gladky.anton at gmail.com>
-Last-Update: <YYYY-MM-DD>
+Last-Update: 2013-04-02
 
---- gmsh-2.5.1~beta2~svn12143~dfsg.orig/Geo/GModelIO_CGNS.cpp
-+++ gmsh-2.5.1~beta2~svn12143~dfsg/Geo/GModelIO_CGNS.cpp
-@@ -155,24 +155,24 @@ class CGNSNameStr
+Index: gmsh-tetgen-2.6.2~svn14678/Geo/GModelIO_CGNS.cpp
+===================================================================
+--- gmsh-tetgen-2.6.2~svn14678.orig/Geo/GModelIO_CGNS.cpp	2013-02-04 14:09:40.000000000 +0100
++++ gmsh-tetgen-2.6.2~svn14678/Geo/GModelIO_CGNS.cpp	2013-02-04 15:16:04.000000000 +0100
+@@ -155,24 +155,24 @@
  //    1D second-order elements
  //    MSH_NUM_TYPE+1 is used to place non-cgns elements last.
  static const int msh2cgns[MSH_NUM_TYPE][2] = {
@@ -47,7 +49,7 @@
    {-1, MSH_NUM_TYPE+1},  // MSH_PYR_13
    {-1, MSH_NUM_TYPE+1},  // MSH_TRI_9
    {-1, MSH_NUM_TYPE+1},  // MSH_TRI_10
-@@ -587,9 +587,9 @@ int GModel::readCGNS(const std::string &
+@@ -587,9 +587,9 @@
    for (int index_zone = 1; index_zone <= nZones; index_zone++) {
      Msg::Debug("Reading zone to compute MG level %i.", index_zone);
  
@@ -59,28 +61,28 @@
        Msg::Debug("Unstructured zone detected, skipping.");
        continue;
      }
-@@ -644,9 +644,9 @@ int GModel::readCGNS(const std::string &
+@@ -645,9 +645,9 @@
  
      int offset = vnum;
  
 -    ZoneType_t zoneType;
-+    CGNS_ENUMT( ZoneType_t ) zoneType;
++    CGNS_ENUMT(ZoneType_t) zoneType;
      cg_zone_type(index_file, index_base, index_zone, &zoneType);
 -    if ( zoneType == Unstructured ) {
 +    if ( zoneType == CGNS_ENUMV( Unstructured ) ) {
        Msg::Debug("Unstructured zone detected, skipping.");
        continue;
      }
-@@ -680,7 +680,7 @@ int GModel::readCGNS(const std::string &
+@@ -681,7 +681,7 @@
      int nCoords;
      cg_ncoords(index_file, index_base, index_zone, &nCoords);
-     
+ 
 -    DataType_t dataType;
 +    CGNS_ENUMT( DataType_t ) dataType;
      char coordName[35];
      void* coord;
      double nodes[nnodesZone][nCoords];
-@@ -695,7 +695,7 @@ int GModel::readCGNS(const std::string &
+@@ -696,7 +696,7 @@
        Msg::Debug("Reading coordinate %i : %s.", iCoord+1, coordName);
  
        switch(dataType) {
@@ -89,7 +91,7 @@
  	  Msg::Debug("        [Type is float]");
  	  coord = new float[nnodesZone];
  	  if ( cg_coord_read(index_file, index_base, index_zone, coordName, dataType, irmin, irmax, coord)) {
-@@ -708,7 +708,7 @@ int GModel::readCGNS(const std::string &
+@@ -709,7 +709,7 @@
  	  }
  	  delete [] (float*)coord;
  	  break;
@@ -98,62 +100,64 @@
  	  Msg::Debug("        [Type is double]");
  	  coord = new double[nnodesZone];
  	  if ( cg_coord_read(index_file, index_base, index_zone, coordName, dataType, irmin, irmax, coord)) {
-@@ -1490,7 +1490,8 @@ struct ZoneTask
+@@ -1491,8 +1491,9 @@
    ZoneTask() : status(0), indexInOwner(0) { }
-   void change_status(const int _status) 
+   void change_status(const int _status)
    {
 -#pragma omp atomic
-+    //invalid pragma =
-+    //#pragma omp atomic
-     status = _status;
+-    status = _status;
++    status = 0;
++    #pragma omp atomic
++    status += _status;
    }
  };
-@@ -1582,7 +1583,7 @@ int write_CGNS_zones(GModel &model, cons
+ 
+@@ -1583,7 +1584,7 @@
            cgZoneSize[2] = writeZone->numBoVert;  // Number of boundary vertices
            if(cg_zone_write(cgIndexFile, cgIndexBase,
                             writeTask->zoneName.c_str(), cgZoneSize,
 -                           Unstructured, &cgIndexZone))
-+                           CGNS_ENUMV( Unstructured ), &cgIndexZone))
++                           CGNS_ENUMV(Unstructured), &cgIndexZone))
            {
              return cgnsErr();
            }
-@@ -1609,7 +1610,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1610,7 +1611,7 @@
            for (int i = 0; i != cgZoneSize[0]; ++i) {
              dBuffer[i] = writeZone->zoneVertVec[i]->x()*scalingFactor;
            }
 -          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, RealDouble,
-+          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV( RealDouble ),
++          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV(RealDouble),
                              "CoordinateX", &dBuffer[0], &cgIndexCoord))
              return cgnsErr();
  
-@@ -1617,7 +1618,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1618,7 +1619,7 @@
            for(int i = 0; i != cgZoneSize[0]; ++i) {
              dBuffer[i] = writeZone->zoneVertVec[i]->y()*scalingFactor;
            }
 -          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, RealDouble,
-+          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV( RealDouble ),
++          if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV(RealDouble),
                              "CoordinateY", &dBuffer[0], &cgIndexCoord))
              return cgnsErr();
  
-@@ -1626,7 +1627,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1627,7 +1628,7 @@
              for(int i = 0; i != cgZoneSize[0]; ++i) {
                dBuffer[i] = writeZone->zoneVertVec[i]->z()*scalingFactor;
              }
 -            if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, RealDouble,
-+            if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV( RealDouble ),
++            if(cg_coord_write(cgIndexFile, cgIndexBase, cgIndexZone, CGNS_ENUMV(RealDouble),
                                "CoordinateZ", &dBuffer[0], &cgIndexCoord))
                return cgnsErr();
            }
-@@ -1706,7 +1707,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1707,7 +1708,7 @@
                int cgIndexSection;
                if(cg_section_write
                   (cgIndexFile, cgIndexBase, cgIndexZone, elemName,
 -                  static_cast<ElementType_t>(typeCGNS), iElemSection + 1,
-+                  static_cast<CGNS_ENUMT( ElementType_t )>(typeCGNS), iElemSection + 1,
++                  static_cast<CGNS_ENUMT(ElementType_t)>(typeCGNS), iElemSection + 1,
                    writeZone->zoneElemConn[typeMSHm1].numElem + iElemSection,
                    writeZone->zoneElemConn[typeMSHm1].numBoElem + iElemSection,
                    (cgsize_t*)&writeZone->zoneElemConn[typeMSHm1].connectivity[0],
-@@ -1746,9 +1747,9 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1747,9 +1748,9 @@
              // In the first zone
              if(cg_conn_write
                 (cgIndexFile, cgIndexBase, zoneInfo[gCIt->first.zone1].cgIndex,
@@ -165,7 +169,7 @@
                  &cgIndexInterface))
              {
                return cgnsErr();
-@@ -1756,9 +1757,9 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1757,9 +1758,9 @@
              // In the second zone
              if(cg_conn_write
                 (cgIndexFile, cgIndexBase, zoneInfo[gCIt->first.zone2].cgIndex,
@@ -177,21 +181,43 @@
                  &cgIndexInterface))
              {
                return cgnsErr();
-@@ -1878,7 +1879,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1879,7 +1880,7 @@
                }
                if(cg_boco_write(cgIndexFile, cgIndexBase,
                                 zoneInfo[zoneIndex].cgIndex, patchName.c_str(),
 -                               BCTypeNull, PointList, numBCVert, &iBuffer1[0],
-+                               CGNS_ENUMV( BCTypeNull ), CGNS_ENUMV( PointList ), numBCVert, &iBuffer1[0],
++                               CGNS_ENUMV( BCTypeNull), CGNS_ENUMV(PointList), numBCVert, &iBuffer1[0],
                                 &cgIndexBoco))
                {
                  return cgnsErr();
-@@ -1888,7 +1889,7 @@ int write_CGNS_zones(GModel &model, cons
+@@ -1889,7 +1890,7 @@
                  int normalIndex;
                  if(cg_boco_normal_write(cgIndexFile, cgIndexBase,
                                          zoneInfo[zoneIndex].cgIndex, cgIndexBoco,
 -                                        &normalIndex, 1, RealDouble, &dBuffer[0]))
-+                                        &normalIndex, 1, CGNS_ENUMV( RealDouble ), &dBuffer[0]))
++                                        &normalIndex, 1, CGNS_ENUMV(RealDouble), &dBuffer[0]))
                  {
                    return cgnsErr();
                  }
+Index: gmsh-tetgen-2.6.2~svn14678/Geo/CustomContainer.h
+===================================================================
+--- gmsh-tetgen-2.6.2~svn14678.orig/Geo/CustomContainer.h	2013-02-04 10:39:54.000000000 +0100
++++ gmsh-tetgen-2.6.2~svn14678/Geo/CustomContainer.h	2013-02-04 15:16:49.000000000 +0100
+@@ -559,7 +559,7 @@
+   }
+ 
+   // Destructor
+-  ~FaceVector() { deallocate(_capacity, faces); }
++  ~FaceVector() { this->deallocate(_capacity, faces); }
+ 
+   // Index the vector
+   const T &operator[](const int i) const { return faces[i]; }
+@@ -568,7 +568,7 @@
+   // Add element to end
+   T &push_back(const T val)
+   {
+-    if(_size == _capacity) grow(_capacity, faces);
++    if(_size == _capacity) this->grow(_capacity, faces);
+     return faces[_size++] = val;
+   }
+ 

Modified: packages/gmsh-tetgen/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/gmsh-tetgen/trunk/debian/patches/series?rev=45558&op=diff
==============================================================================
--- packages/gmsh-tetgen/trunk/debian/patches/series (original)
+++ packages/gmsh-tetgen/trunk/debian/patches/series Mon Feb  4 14:53:24 2013
@@ -5,7 +5,7 @@
 switch_from_opencascade_to_oce.patch
 api_demos.patch
 fix_FTBFS_linking.patch
-#cgns.patch
+cgns.patch
 #pedantic.patch
 metis.patch
 alauzet.patch

Modified: packages/gmsh-tetgen/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/gmsh-tetgen/trunk/debian/rules?rev=45558&op=diff
==============================================================================
--- packages/gmsh-tetgen/trunk/debian/rules (original)
+++ packages/gmsh-tetgen/trunk/debian/rules Mon Feb  4 14:53:24 2013
@@ -32,7 +32,7 @@
 -DENABLE_MPI:BOOL=ON \
 -DENABLE_OSMESA:BOOL=OFF \
 -DENABLE_POPPLER:BOOL=OFF \
--DENABLE_CGNS:BOOL=OFF \
+-DENABLE_CGNS:BOOL=ON \
 -DENABLE_WRAP_PYTHON:BOOL=ON \
 -DENABLE_WRAP_JAVA:BOOL=ON \
 -DCMAKE_INCLUDE_PATH:STRING="/usr/include/mpi" \




More information about the debian-science-commits mailing list