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

luis at geodynamics.org luis at geodynamics.org
Wed Jan 28 09:05:19 PST 2009


Author: luis
Date: 2009-01-28 09:05:18 -0800 (Wed, 28 Jan 2009)
New Revision: 13986

Modified:
   cs/cigma/trunk/src/Cell.cpp
Log:
Factory method for cigma::tri6 element.

Also need to update the conversion functions between string and Cell::type

Modified: cs/cigma/trunk/src/Cell.cpp
===================================================================
--- cs/cigma/trunk/src/Cell.cpp	2009-01-28 17:05:17 UTC (rev 13985)
+++ cs/cigma/trunk/src/Cell.cpp	2009-01-28 17:05:18 UTC (rev 13986)
@@ -9,6 +9,7 @@
 #include "fe_tet4.h"
 #include "fe_quad4.h"
 #include "fe_tri3.h"
+#include "fe_tri6.h"
 
 using namespace std;
 using namespace cigma;
@@ -22,7 +23,8 @@
     CellTypeMapEntry("hex8", Cell::HEX8),
     CellTypeMapEntry("tet4", Cell::TET4),
     CellTypeMapEntry("quad4", Cell::QUAD4),
-    CellTypeMapEntry("tri3", Cell::TRI3)
+    CellTypeMapEntry("tri3", Cell::TRI3),
+    CellTypeMapEntry("tri6", Cell::TRI6)
 };
 
 int numTypeEntries = sizeof(cellTypeMapEntries) / sizeof(CellTypeMapEntry);
@@ -40,7 +42,6 @@
 {
     if (!Cell::valid_cell_type(name))
     {
-        //throw cigma::Exception("Cell::string2type", "Invalid type name");
         return Cell::NONE;
     }
     return celltypes[name];
@@ -54,6 +55,7 @@
     case TET4:  return "tet4";
     case QUAD4: return "quad4";
     case TRI3:  return "tri3";
+    case TRI6:  return "tri6";
     }
     return "";
 }
@@ -67,6 +69,7 @@
     case TET4:  tmp.reset(new tet4); break;
     case QUAD4: tmp.reset(new quad4); break;
     case TRI3:  tmp.reset(new tri3); break;
+    case TRI6:  tmp.reset(new tri6); break;
     }
     return tmp;
 }



More information about the CIG-COMMITS mailing list