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

luis at geodynamics.org luis at geodynamics.org
Wed Oct 15 02:07:58 PDT 2008


Author: luis
Date: 2008-10-15 02:07:58 -0700 (Wed, 15 Oct 2008)
New Revision: 13056

Modified:
   cs/cigma/trunk/src/eb_array.cpp
   cs/cigma/trunk/src/eb_array.h
Log:
Added array implementation of abstract class ElementBlock

Modified: cs/cigma/trunk/src/eb_array.cpp
===================================================================
--- cs/cigma/trunk/src/eb_array.cpp	2008-10-15 09:07:57 UTC (rev 13055)
+++ cs/cigma/trunk/src/eb_array.cpp	2008-10-15 09:07:58 UTC (rev 13056)
@@ -0,0 +1,31 @@
+#include "eb_array.h"
+
+using namespace cigma;
+
+eb_array::eb_array()
+{
+    nel = 0;
+    ndofs = 0;
+
+    cell = 0;
+    locator = 0;
+}
+
+eb_array::~eb_array()
+{
+    if (cell != 0)
+    {
+        delete cell;
+        cell = 0;
+    }
+    if (locator != 0)
+    {
+        delete locator;
+        locator = 0;
+    }
+}
+
+int eb_array::getCellNodeId(int e, int i)
+{
+    return 0; // XXX
+}

Modified: cs/cigma/trunk/src/eb_array.h
===================================================================
--- cs/cigma/trunk/src/eb_array.h	2008-10-15 09:07:57 UTC (rev 13055)
+++ cs/cigma/trunk/src/eb_array.h	2008-10-15 09:07:58 UTC (rev 13056)
@@ -1,11 +1,32 @@
 #ifndef __EB_ARRAY_H__
 #define __EB_ARRAY_H__
 
-class eb_array : private boost::noncopyable
+#include "ElementBlock.h"
+#include "Common.h"
+
+class eb_array : public cigma::ElementBlock
 {
 public:
+
     eb_array();
     ~eb_array();
+
+    int n_cells() const;
+    int n_dofs() const;
+
+    int getCellNodeId(int e, int i);
+
+public:
+
+    int nel;
+    int ndofs;
+    int *connect;   // XXX: replace int by IdType
+
+    cigma::Cell *cell;
+    cigma::Locator *locator;
 };
 
+inline int eb_array::n_cells() const { return nel; }
+inline int eb_array::n_dofs() const { return ndofs; }
+
 #endif



More information about the cig-commits mailing list