From 93eae1be109bda1c949411e3daf42b01c1981e51 Mon Sep 17 00:00:00 2001
From: Nicolas Marsic <nicolas.marsic@gmail.com>
Date: Tue, 12 Mar 2013 09:07:33 +0000
Subject: [PATCH] Bug Fix with projection: sorting of a sorted vector --
 element with same orientation were permuted

---
 FunctionSpace/FunctionSpace.cpp | 3 +++
 FunctionSpace/FunctionSpace.h   | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/FunctionSpace/FunctionSpace.cpp b/FunctionSpace/FunctionSpace.cpp
index fa53d85036..90e8e07cb5 100644
--- a/FunctionSpace/FunctionSpace.cpp
+++ b/FunctionSpace/FunctionSpace.cpp
@@ -49,6 +49,9 @@ void FunctionSpace::build(GroupOfElement& goe,
   this->goe  = &goe;
   this->mesh = &(goe.getMesh());
 
+  // Orient All Elements //
+  goe.orientAllElements(basis); // NOT SEXY: TO BE REMOVED
+
   // Get Geo Data (WARNING HOMOGENE MESH REQUIRED)//
   const MElement& element = goe.get(0);
   MElement& myElement =
diff --git a/FunctionSpace/FunctionSpace.h b/FunctionSpace/FunctionSpace.h
index af74509173..6f50b3f0f2 100644
--- a/FunctionSpace/FunctionSpace.h
+++ b/FunctionSpace/FunctionSpace.h
@@ -34,7 +34,8 @@
     the Dof%s and GroupOfDof%s related to its geometrical @em Support.
 
     @todo
-    Allow Hybrid Mesh
+    Allow Hybrid Mesh@n
+    Remove call to GroupOfElement:::orientAllElements()
 */
 
 class Mesh;
-- 
GitLab