getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] r5122 - in /trunk/getfem/src/getfem: bgeot_config.h get


From: logari81
Subject: [Getfem-commits] r5122 - in /trunk/getfem/src/getfem: bgeot_config.h getfem_export.h getfem_import.h
Date: Wed, 04 Nov 2015 22:22:20 -0000

Author: logari81
Date: Wed Nov  4 23:22:19 2015
New Revision: 5122

URL: http://svn.gna.org/viewcvs/getfem?rev=5122&view=rev
Log:
tidy up use of size_type

Modified:
    trunk/getfem/src/getfem/bgeot_config.h
    trunk/getfem/src/getfem/getfem_export.h
    trunk/getfem/src/getfem/getfem_import.h

Modified: trunk/getfem/src/getfem/bgeot_config.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/bgeot_config.h?rev=5122&r1=5121&r2=5122&view=diff
==============================================================================
--- trunk/getfem/src/getfem/bgeot_config.h      (original)
+++ trunk/getfem/src/getfem/bgeot_config.h      Wed Nov  4 23:22:19 2015
@@ -77,7 +77,7 @@
   static const size_t ST_NIL = size_t(-1);
   typedef gmm::uint16_type dim_type;
   typedef gmm::uint16_type short_type;
-  typedef size_t size_type;
+  using gmm::size_type;
   typedef double scalar_type;
   typedef std::complex<double> complex_type;
   inline double to_double(double &a) { return a; }

Modified: trunk/getfem/src/getfem/getfem_export.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_export.h?rev=5122&r1=5121&r2=5122&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_export.h     (original)
+++ trunk/getfem/src/getfem/getfem_export.h     Wed Nov  4 23:22:19 2015
@@ -128,14 +128,14 @@
         'name' */
     template<class VECT> void write_sliced_point_data(const VECT& Uslice,
                                                       const std::string& name,
-                                                      getfem::size_type 
qdim=1);
+                                                      size_type qdim=1);
     /** export data which is constant over each element. You should not use
         this function if you are exporting a slice.  U should have
         convex_index().card() elements.  */
 
     template<class VECT> void write_cell_data(const VECT& U,
                                               const std::string& name, 
-                                              getfem::size_type qdim = 1);
+                                              size_type qdim = 1);
     /** export a data_set correspounding to measures of quality for each convex
         of the supplied mesh (which should have the same number of convex than
         the one used in the vtk_export)
@@ -156,12 +156,12 @@
     void switch_to_cell_data();
     void switch_to_point_data();
     template<class T> void write_val(T v);
-    template<class V> void write_vec(V p, getfem::size_type qdim);
+    template<class V> void write_vec(V p, size_type qdim);
     template<class IT> void write_3x3tensor(IT p);
     void write_separ();
     template<class VECT> void write_dataset_(const VECT& U,
                                              const std::string& name,
-                                             getfem::size_type qdim,
+                                             size_type qdim,
                                              bool cell_data=false);
   };
 
@@ -176,7 +176,7 @@
     }
   }
 
-  template<class IT> void vtk_export::write_vec(IT p, getfem::size_type qdim) {
+  template<class IT> void vtk_export::write_vec(IT p, size_type qdim) {
     float v[3];
     for (size_type i=0; i < qdim; ++i) {
       v[i] = float(p[i]);
@@ -227,21 +227,21 @@
   }
 
   template<class VECT>
-  void vtk_export::write_cell_data(const VECT& U, const std::string& name, 
getfem::size_type qdim) {
+  void vtk_export::write_cell_data(const VECT& U, const std::string& name,
+                                   size_type qdim) {
     write_dataset_(U, name, qdim, true);
   }
 
   template<class VECT>
   void vtk_export::write_sliced_point_data(const VECT& U,
                                            const std::string& name,
-                                           getfem::size_type qdim) {
+                                           size_type qdim) {
     write_dataset_(U, name, qdim, false);
   }
 
   template<class VECT>
   void vtk_export::write_dataset_(const VECT& U, const std::string& name,
-                                  getfem::size_type qdim,
-                                  bool cell_data) {
+                                  size_type qdim, bool cell_data) {
     write_mesh();
     size_type nb_val = 0;
     if (cell_data) {

Modified: trunk/getfem/src/getfem/getfem_import.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_import.h?rev=5122&r1=5121&r2=5122&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_import.h     (original)
+++ trunk/getfem/src/getfem/getfem_import.h     Wed Nov  4 23:22:19 2015
@@ -109,7 +109,7 @@
       and their numbers:
       @code
         getfem::mesh myMesh;
-        typedef std::map<std::string, bgeot::size_type> RegMap;
+        typedef std::map<std::string, size_type> RegMap;
         typedef RegMap::iterator RegMapIter;
         RegMap regmap;
         getfem::import_mesh_gmsh("mesh.msh", myMesh, regmap);
@@ -129,26 +129,26 @@
       be tested.
   */
   void import_mesh_gmsh(const std::string& filename, mesh& m,
-                   std::map<std::string, bgeot::size_type> &region_map,
+                   std::map<std::string, size_type> &region_map,
                    bool remove_last_dimension = true,
                    std::map<size_type, std::set<size_type>> *nodal_map = NULL);
 
   void import_mesh_gmsh(std::istream& f, mesh& m,
-                        std::map<std::string, bgeot::size_type> &region_map,
+                        std::map<std::string, size_type> &region_map,
                         bool remove_last_dimension = true,
                         std::map<size_type, std::set<size_type>> *nodal_map = 
NULL);
 
   void import_mesh_gmsh(const std::string& filename, mesh& m,
                         bool add_all_element_type = false,
-                        std::pair<bgeot::size_type, bgeot::size_type> 
*face_region_range = NULL,
-                        std::map<std::string, bgeot::size_type> *region_map = 
NULL,
+                        std::pair<size_type, size_type> *face_region_range = 
NULL,
+                        std::map<std::string, size_type> *region_map = NULL,
                         bool remove_last_dimension = true,
                         std::map<size_type, std::set<size_type>> *nodal_map = 
NULL);
 
   void import_mesh_gmsh(std::istream& f, mesh& m,
                         bool add_all_element_type = false,
-                        std::pair<bgeot::size_type, bgeot::size_type> 
*face_region_range = NULL,
-                        std::map<std::string, bgeot::size_type> *region_map = 
NULL,
+                        std::pair<size_type, size_type> *face_region_range = 
NULL,
+                        std::map<std::string, size_type> *region_map = NULL,
                         bool remove_last_dimension = true,
                         std::map<size_type, std::set<size_type>> *nodal_map = 
NULL);
 




reply via email to

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