From ff63a1ec23b3c2261998d8e50920b9f4b8ff7d0b Mon Sep 17 00:00:00 2001
From: Nicolas Marsic <nicolas.marsic@gmail.com>
Date: Thu, 21 Feb 2013 14:44:23 +0000
Subject: [PATCH] Removing concept of ElementData: not general enough -- Adding
 GroupOfJacobian: sexier -- Revert to by group assembly -- *BUT* weak() takes
 elementID: up to now use one sort at the beginning -- Need to fix that

---
 FunctionSpace/FunctionSpace.cpp | 15 +++++++--------
 FunctionSpace/FunctionSpace.h   |  3 +++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/FunctionSpace/FunctionSpace.cpp b/FunctionSpace/FunctionSpace.cpp
index 9bc12ab6b7..6709d6f2ef 100644
--- a/FunctionSpace/FunctionSpace.cpp
+++ b/FunctionSpace/FunctionSpace.cpp
@@ -82,13 +82,15 @@ void FunctionSpace::build(GroupOfElement& goe,
 
   // Build Dof //
   buildDof();
+
+  // Link with GroupOfElement for ordering //
+  //goe.link(*this);
 }
 
 void FunctionSpace::buildDof(void){
   // Get Elements //
   const unsigned int nElement = goe->getNumber();
-  const vector<pair<const MElement*, ElementData> >&
-    element = goe->getAll();
+  const vector<const MElement*>& element = goe->getAll();
 
   // Init Struct //
   dof      = new set<const Dof*, DofComparator>;
@@ -100,11 +102,11 @@ void FunctionSpace::buildDof(void){
   // Create Dofs //
   for(unsigned int i = 0; i < nElement; i++){
     // Get Dof for this Element
-    vector<Dof> myDof = getKeys(*(element[i].first));
+    vector<Dof> myDof = getKeys(*(element[i]));
     unsigned int nDof = myDof.size();
 
     // Create new GroupOfDof
-    GroupOfDof* god = new GroupOfDof(nDof, *(element[i].first));
+    GroupOfDof* god = new GroupOfDof(nDof, *(element[i]));
     (*group)[i]     = god;
 
     // Add Dof
@@ -113,10 +115,7 @@ void FunctionSpace::buildDof(void){
 
     // Map GOD
     eToGod->insert(pair<const MElement*, const GroupOfDof*>
-		   (element[i].first, god));
-
-    // Set in ElementData
-    goe->getElementData(i).setGroupOfDof(*god);
+		   (element[i], god));
   }
 }
 
diff --git a/FunctionSpace/FunctionSpace.h b/FunctionSpace/FunctionSpace.h
index 2b513a4842..af74509173 100644
--- a/FunctionSpace/FunctionSpace.h
+++ b/FunctionSpace/FunctionSpace.h
@@ -37,6 +37,9 @@
     Allow Hybrid Mesh
 */
 
+class Mesh;
+class GroupOfElement;
+
 class FunctionSpace{
  protected:
   // Geometry //
-- 
GitLab