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

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


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

Modified:
   cs/cigma/trunk/src/ElementBlock.cpp
   cs/cigma/trunk/src/ElementBlock.h
Log:
Switch to virtual calls in ElementBlock

Modified: cs/cigma/trunk/src/ElementBlock.cpp
===================================================================
--- cs/cigma/trunk/src/ElementBlock.cpp	2008-10-15 09:07:50 UTC (rev 13051)
+++ cs/cigma/trunk/src/ElementBlock.cpp	2008-10-15 09:07:52 UTC (rev 13052)
@@ -7,16 +7,18 @@
 
 ElementBlock::ElementBlock()
 {
-    std::cout << "Calling ElementBlock()" << std::endl;
+    //std::cout << "Calling ElementBlock()" << std::endl;
 
+    /*
     // XXX: get rid of these -- use virtual functions
     nel = 0;
     ndofs = 0;
+    */
 }
 
 ElementBlock::~ElementBlock()
 {
-    std::cout << "Calling ~ElementBlock()" << std::endl;
+    //std::cout << "Calling ~ElementBlock()" << std::endl;
 }
 
 // ----------------------------------------------------------------------------

Modified: cs/cigma/trunk/src/ElementBlock.h
===================================================================
--- cs/cigma/trunk/src/ElementBlock.h	2008-10-15 09:07:50 UTC (rev 13051)
+++ cs/cigma/trunk/src/ElementBlock.h	2008-10-15 09:07:52 UTC (rev 13052)
@@ -16,24 +16,27 @@
     ElementBlock();
     virtual ~ElementBlock();
 
-    int n_cells() const;
-    int n_dofs() const;
+    virtual int n_cells() const = 0;
+    virtual int n_dofs() const = 0;
 
     virtual int getCellNodeId(int e, int i) = 0;
 
     /* XXX: add locator instance here? */
 
+/*
 public:
-    int nel;    /* XXX: get rid of these...use virtual functions instead */
+    int nel;    // XXX: get rid of these...use virtual functions instead
     int ndofs;
-
+*/
     /* XXX: keep a reference to the parent cell */
 };
 
 // ----------------------------------------------------------------------------
 
+/*
 inline int cigma::ElementBlock::n_cells() const { return nel; }
 inline int cigma::ElementBlock::n_dofs()  const { return ndofs; }
+*/
 
 // ----------------------------------------------------------------------------
 



More information about the cig-commits mailing list