[cig-commits] r13578 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Tue Dec 9 18:14:55 PST 2008


Author: luis
Date: 2008-12-09 18:14:55 -0800 (Tue, 09 Dec 2008)
New Revision: 13578

Modified:
   cs/cigma/trunk/src/Cell.cpp
   cs/cigma/trunk/src/Cell.h
Log:
Convert Cell::type to std::string

Modified: cs/cigma/trunk/src/Cell.cpp
===================================================================
--- cs/cigma/trunk/src/Cell.cpp	2008-12-10 02:14:54 UTC (rev 13577)
+++ cs/cigma/trunk/src/Cell.cpp	2008-12-10 02:14:55 UTC (rev 13578)
@@ -44,6 +44,18 @@
     return celltypes[name];
 }
 
+std::string Cell::type2string(Cell::type cellType)
+{
+    switch (cellType)
+    {
+    case HEX8:  return "hex8";
+    case TET4:  return "tet4";
+    case QUAD4: return "quad4";
+    case TRI3:  return "tri3";
+    }
+    return "";
+}
+
 boost::shared_ptr<Cell> Cell::New(Cell::type cellType)
 {
     boost::shared_ptr<Cell> tmp;

Modified: cs/cigma/trunk/src/Cell.h
===================================================================
--- cs/cigma/trunk/src/Cell.h	2008-12-10 02:14:54 UTC (rev 13577)
+++ cs/cigma/trunk/src/Cell.h	2008-12-10 02:14:55 UTC (rev 13578)
@@ -46,6 +46,7 @@
     virtual type cell_type() const = 0;
     static bool valid_cell_type(std::string name);
     static type string2type(std::string name);
+    static std::string type2string(Cell::type cellType);
     static boost::shared_ptr<Cell> New(Cell::type cellType);
     static boost::shared_ptr<Cell> New(const char *name);
 



More information about the CIG-COMMITS mailing list