Index: src/LinearAlgebra/Eigenspace.cpp
===================================================================
--- src/LinearAlgebra/Eigenspace.cpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/LinearAlgebra/Eigenspace.cpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -38,4 +38,7 @@
   EigenvectorMatrix(_Indices.size(),_Indices.size())
 {
+  EigenvectorMatrix.setIdentity();
+  for (size_t i = 0 ; i< _Indices.size(); ++i)
+    Eigenvalues.push_back(0.);
   createEigenvectorViews();
 }
@@ -58,4 +61,7 @@
       +" and column dimension of matrix "+toString(_matrix.getColumns())+" don't match!");
 
+  EigenvectorMatrix.setIdentity();
+  for (size_t i = 0 ; i< _Indices.size(); ++i)
+    Eigenvalues.push_back(0.);
   createEigenvectorViews();
 }
@@ -75,7 +81,7 @@
 void Eigenspace::createEigenvectorViews()
 {
-  const size_t ColumnCount = EigenspaceMatrix.getColumns();
+  const size_t ColumnCount = EigenvectorMatrix.getColumns();
   for (size_t iter = 0; iter < ColumnCount; ++iter) {
-    boost::shared_ptr<VectorContent> ev(EigenspaceMatrix.getColumnVector(iter));
+    boost::shared_ptr<VectorContent> ev(EigenvectorMatrix.getColumnVector(iter));
     Eigenvectors.push_back( ev );
     Log() << Verbose(1) << iter << " th Eigenvector is " << *ev << std::endl;
@@ -90,8 +96,5 @@
 void Eigenspace::calculateEigenSubspace()
 {
-  EigenvectorMatrix = EigenspaceMatrix;
-  VectorContent *Eigenvalues = new VectorContent(EigenvectorMatrix.transformToEigenbasis());
-  Log() << Verbose(2) << "Eigenvector matrix is " << EigenvectorMatrix << std::endl;
-  Log() << Verbose(2) << "Eigenvalues are " << *Eigenvalues << std::endl;
+  ASSERT(0, "Eigenspace::calculateEigenSubspace() - we never want to call this function!");
 }
 
@@ -118,5 +121,5 @@
 
 
-const VectorContent & Eigenspace::getEigenvector(size_t i) const
+const VectorContent & Eigenspace::getEigenvector(const size_t i) const
 {
   return *(Eigenvectors[i]);
@@ -146,4 +149,19 @@
 {
   return Indices;
+}
+
+const MatrixContent & Eigenspace::getEigenvectorMatrix() const
+{
+  return EigenvectorMatrix;
+}
+
+const double Eigenspace::getEigenvalue(const size_t i) const
+{
+  return Eigenvalues[i];
+}
+
+const Eigenspace::eigenvalueset & Eigenspace::getEigenvalues() const
+{
+  return Eigenvalues;
 }
 
@@ -172,4 +190,5 @@
   }
   // eigenvalues can be just copied (integral type)
+  Eigenvalues.clear();
   Eigenvalues = CurrentEigenvalues;
 }
Index: src/LinearAlgebra/Eigenspace.hpp
===================================================================
--- src/LinearAlgebra/Eigenspace.hpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/LinearAlgebra/Eigenspace.hpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -43,5 +43,8 @@
   // accessors
   const MatrixContent & getEigenspaceMatrix() const;
-  const VectorContent & getEigenvector(size_t i) const;
+  const VectorContent & getEigenvector(const size_t i) const;
+  const MatrixContent & getEigenvectorMatrix() const;
+  const double getEigenvalue(const size_t i) const;
+  const eigenvalueset & getEigenvalues() const;
   const indexset & getIndices() const;
   void setEigenspaceMatrix(const MatrixContent &_content);
Index: src/LinearAlgebra/Subspace.cpp
===================================================================
--- src/LinearAlgebra/Subspace.cpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/LinearAlgebra/Subspace.cpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -25,8 +25,10 @@
 #include "Helpers/Assert.hpp"
 #include "Helpers/Log.hpp"
+#include "Helpers/toString.hpp"
 #include "Helpers/Verbose.hpp"
 
 #include "Eigenspace.hpp"
 #include "Subspace.hpp"
+
 
 /** Constructor for class Subspace.
@@ -39,6 +41,8 @@
   ProjectToSubspace(_FullSpace.getIndices().size(), _s.size()),
   ProjectFromSubspace(_s.size(), _FullSpace.getIndices().size()),
-  FullSpace(_FullSpace)
-{
+  FullSpace(_FullSpace),
+  ZeroVector(_FullSpace.getIndices().size())
+{
+  // TODO: away with both of this when calculateEigenSubspace() works
   // create projection matrices
   createProjectionMatrices();
@@ -62,5 +66,21 @@
 void Subspace::calculateEigenSubspace()
 {
-  getSubspacematrixFromBigmatrix(FullSpace.getEigenspaceMatrix());
+  // project down
+  createProjectionMatrices();
+  // remove subsubspace directions
+  correctEigenvectorsFromSubIndices();
+  // solve
+  projectFullSpaceMatrixToSubspace();
+  EigenvectorMatrix = EigenspaceMatrix;
+  VectorContent *EigenvalueVector = new VectorContent(EigenvectorMatrix.transformToEigenbasis());
+  Eigenvalues.clear();
+  for(size_t i = 0; i< EigenvalueVector->getDimension(); ++i) {
+    Eigenvalues.push_back( EigenvalueVector->at(i) );
+  }
+  delete EigenvalueVector;
+  Log() << Verbose(2) << "Eigenvector matrix is " << EigenvectorMatrix << std::endl;
+  Log() << Verbose(2) << "Eigenvalues are " << Eigenvalues << std::endl;
+  // create mapping
+  createLocalMapping();
 }
 
@@ -126,5 +146,5 @@
  * @return set of projected eigenvectors.
  */
-Eigenspace::eigenvectorset Subspace::getEigenvectorsInFullSpace()
+const Eigenspace::eigenvectorset & Subspace::getEigenvectorsInFullSpace()
 {
   // check whether bigmatrix is at least as big as EigenspaceMatrix
@@ -213,7 +233,51 @@
  * @return set of eigenvectors in subspace
  */
-Eigenspace::eigenvectorset Subspace::getEigenvectorsInSubspace()
-{
-  return Eigenvectors;
+const MatrixContent & Subspace::getEigenvectorMatrixInFullSpace()
+{
+  // check whether bigmatrix is at least as big as EigenspaceMatrix
+  ASSERT(EigenspaceMatrix.getRows() <= Eigenvectors[0]->getDimension(),
+      "embedEigenspaceMatrix() - EigenspaceMatrix has more rows "
+      +toString(EigenspaceMatrix.getRows())+" than eigenvectors "
+      +toString(Eigenvectors[0]->getDimension())+"!");
+  ASSERT(EigenspaceMatrix.getColumns() <= Eigenvectors.size(),
+      "embedEigenspaceMatrix() - EigenspaceMatrix has more columns "
+      +toString(EigenspaceMatrix.getColumns())+" than eigenvectors "
+      +toString(Eigenvectors.size())+"!");
+  // check whether EigenspaceMatrix is big enough for both index sets
+  ASSERT(EigenspaceMatrix.getColumns() == EigenspaceMatrix.getRows(),
+      "embedEigenspaceMatrix() - EigenspaceMatrix is not square "
+      +toString(EigenspaceMatrix.getRows())+" than needed by index set "
+      +toString(EigenspaceMatrix.getColumns())+"!");
+  ASSERT(Indices.size() == EigenspaceMatrix.getColumns(),
+      "embedEigenspaceMatrix() - EigenspaceMatrix has not the same number of columns "
+      +toString(EigenspaceMatrix.getColumns())+" compared to the index set "
+      +toString(Indices.size())+"!");
+
+  // construct intermediate matrix
+  MatrixContent *intermediatematrix = new MatrixContent(Eigenvectors[0]->getDimension(), Indices.size());
+  size_t localcolumn = 0;
+  BOOST_FOREACH(size_t columnindex, Indices) {
+    // create two vectors from each row and copy assign them
+    boost::shared_ptr<VectorContent> srceigenvector(Eigenvectors[columnindex]);
+    boost::shared_ptr<VectorContent> desteigenvector(intermediatematrix->getColumnVector(localcolumn));
+    *desteigenvector = *srceigenvector;
+    localcolumn++;
+  }
+  // matrix product with eigenbasis EigenspaceMatrix matrix
+  *intermediatematrix *= EigenspaceMatrix;
+
+  // and place at right columns into bigmatrix
+  MatrixContent *bigmatrix = new MatrixContent(Eigenvectors[0]->getDimension(), Eigenvectors.size());
+  bigmatrix->setZero();
+  localcolumn = 0;
+  BOOST_FOREACH(size_t columnindex, Indices) {
+    // create two vectors from each row and copy assign them
+    boost::shared_ptr<VectorContent> srceigenvector(intermediatematrix->getColumnVector(localcolumn));
+    boost::shared_ptr<VectorContent> desteigenvector(bigmatrix->getColumnVector(columnindex));
+    *desteigenvector = *srceigenvector;
+    localcolumn++;
+  }
+
+  return *bigmatrix;
 }
 
@@ -258,2 +322,87 @@
   Log() << Verbose(2) << "EigenspaceMatrix matrix is " << EigenspaceMatrix << std::endl;
 }
+
+
+/** We associate local Eigenvectors with ones from FullSpace by a paralellity
+ * criterion.
+ */
+void Subspace::createLocalMapping()
+{
+  // first LocalToGlobal
+  LocalToGlobal.clear();
+  IndexSet CorrespondenceList(Indices); // is to ensure one-to-one mapping
+
+  for (size_t localindex = 0; localindex< Indices.size(); ++localindex) {
+    boost::shared_ptr<VectorContent> &CurrentEigenvector = Eigenvectors[localindex];
+    Log() << Verbose(1) << "Current Eigenvector is " << *CurrentEigenvector << std::endl;
+
+    // (for now settle with the one we are most parallel to)
+    size_t mostparallel_index = FullSpace.getIndices().size();
+    double mostparallel_scalarproduct = 0.;
+    BOOST_FOREACH( size_t indexiter, CorrespondenceList) {
+      Log() << Verbose(2) << "Comparing to old " << indexiter << "th eigenvector " << FullSpace.getEigenvector(indexiter) << std::endl;
+      const double scalarproduct = (FullSpace.getEigenvector(indexiter)) * ( ProjectToSubspace * (*CurrentEigenvector));
+      Log() << Verbose(2) << "SKP is " << scalarproduct << std::endl;
+      if (fabs(scalarproduct) > fabs(mostparallel_scalarproduct)) {
+        mostparallel_scalarproduct = scalarproduct;
+        mostparallel_index = indexiter;
+      }
+    }
+    // and make the assignment if we found one
+    if (mostparallel_index != FullSpace.getIndices().size()) {
+      // put into std::list for later use
+      // invert if pointing in negative direction
+      if (mostparallel_scalarproduct < 0) {
+        *CurrentEigenvector *= -1.;
+        Log() << Verbose(1) << "Associating (inverted) " << *CurrentEigenvector << " with " << mostparallel_index << "th's fullspace eigenvector." << std::endl;
+      } else {
+        Log() << Verbose(1) << "Associating " << *CurrentEigenvector << " with " << mostparallel_index << "th's fullspace eigenvector." << std::endl;
+      }
+      ASSERT( LocalToGlobal.count(localindex) == 0,
+          "Subspace::createLocalMapping() - localindex "+toString(localindex)+" already assigned to "
+          +toString(LocalToGlobal[localindex])+" !=? "+toString(mostparallel_index)+".");
+      LocalToGlobal.insert( make_pair(localindex, mostparallel_index) );
+      CorrespondenceList.erase(mostparallel_index);
+    }
+  }
+
+  // then invert mapping
+  GlobalToLocal.clear();
+  BOOST_FOREACH(mapping::value_type iter, LocalToGlobal) {
+    ASSERT(GlobalToLocal.count(iter.second) == 0,
+        "Subspace::createLocalMapping() - LocalToGlobal is not bijective, key "
+        +toString(iter.second)+" present more than once!");
+    GlobalToLocal.insert( make_pair(iter.second, iter.first) );
+  }
+}
+
+
+/** Get the local eigenvector that is most parallel to the \a i'th full one.
+ * We just the internal mapping Subspace::GlobalToLocal.
+ * @param i index of global eigenvector
+ * @return local eigenvector, most parallel
+ */
+const VectorContent Subspace::getEigenvectorParallelToFullOne(size_t i)
+{
+  if (GlobalToLocal.count(i) == 0) {
+    return ZeroVector;
+  } else {
+    return ProjectToSubspace*(*Eigenvectors[GlobalToLocal[i]]);
+  }
+}
+
+
+/** Get the local eigenvalue of the eigenvector that is most parallel to the
+ * \a i'th full one.
+ * We just the internal mapping Subspace::GlobalToLocal.
+ * @param i index of global eigenvector
+ * @return eigenvalue of local eigenvector, most parallel
+ */
+const double Subspace::getEigenvalueOfEigenvectorParallelToFullOne(size_t i)
+{
+  if (GlobalToLocal.count(i) == 0) {
+    return 0.;
+  } else {
+    return Eigenvalues[GlobalToLocal[i]];
+  }
+}
Index: src/LinearAlgebra/Subspace.hpp
===================================================================
--- src/LinearAlgebra/Subspace.hpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/LinearAlgebra/Subspace.hpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -47,6 +47,9 @@
   void calculateEigenSubspace();
   void correctEigenvectorsFromSubIndices();
-  eigenvectorset getEigenvectorsInFullSpace();
-  eigenvectorset getEigenvectorsInSubspace();
+  const MatrixContent & getEigenvectorMatrixInFullSpace();
+  const eigenvectorset & getEigenvectorsInFullSpace();
+  const VectorContent getEigenvectorParallelToFullOne(size_t i);
+  const double getEigenvalueOfEigenvectorParallelToFullOne(size_t i);
+  void createLocalMapping();
 
 private:
@@ -63,4 +66,6 @@
   MatrixContent ProjectFromSubspace;
   Eigenspace &FullSpace;
+
+  const VectorContent ZeroVector;
 };
 
Index: src/unittests/SubspaceFactorizerUnittest.cpp
===================================================================
--- src/unittests/SubspaceFactorizerUnittest.cpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/unittests/SubspaceFactorizerUnittest.cpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -356,7 +356,7 @@
   size_t run=1; // counting iterations
   double threshold = 1.;  // containing threshold value
-  while ((threshold > 1e-10) && (run < 2)) {
+  while ((threshold > 1e-10) && (run < 10)) {
     // for every dimension
-    for (size_t dim = 0; dim<4;++dim) {
+    for (size_t dim = 0; dim<subspacelimit;++dim) {
       // for every index set of this dimension
       Log() << Verbose(0) << std::endl << std::endl;
@@ -491,5 +491,4 @@
     CurrentEigenvalues.push_back(0.);
   }
-  FullSpace.setEigenpairs(CurrentEigenvectors, CurrentEigenvalues);
 
   Log() << Verbose(1) << "Generating sub spaces ..." << std::endl;
@@ -526,4 +525,94 @@
   }
 
+  size_t run=1; // counting iterations
+  double threshold = 1.;  // containing threshold value
+  while ((threshold > 1e-10) && (run < 10)) {
+    // for every dimension
+    for (size_t dim = 0; dim< subspacelimit;++dim) {
+      // for every index set of this dimension
+      Log() << Verbose(0) << std::endl << std::endl;
+      Log() << Verbose(0) << "Current dimension is " << dim << std::endl;
+      std::pair<SubspaceMap::const_iterator,SubspaceMap::const_iterator> Bounds = Dimension_to_Indexset.equal_range(dim);
+      for (SubspaceMap::const_iterator IndexsetIter = Bounds.first;
+          IndexsetIter != Bounds.second;
+          ++IndexsetIter) {
+        Subspace& subspace = *(IndexsetIter->second);
+        // show the index set
+        Log() << Verbose(0) << std::endl;
+        Log() << Verbose(1) << "Current subspace is " << subspace << std::endl;
+
+        // solve
+        subspace.calculateEigenSubspace();
+
+        // note that assignment to global eigenvectors all remains within subspace
+      }
+    }
+
+    // print list of similar eigenvectors
+    BOOST_FOREACH( size_t index, AllIndices) {
+      Log() << Verbose(2) << "Similar to " << index << "th current eigenvector " << *(CurrentEigenvectors[index]) << " are:" << std::endl;
+      BOOST_FOREACH( SubspaceMap::value_type iter, Dimension_to_Indexset) {
+        const VectorContent & CurrentEV = (iter.second)->getEigenvectorParallelToFullOne(index);
+        if (!CurrentEV.IsZero())
+          Log() << Verbose(2) << CurrentEV << std::endl;
+      }
+      Log() << Verbose(2) << std::endl;
+    }
+
+    // create new CurrentEigenvectors from averaging parallel ones.
+    BOOST_FOREACH(size_t index, AllIndices) {
+      CurrentEigenvectors[index]->setZero();
+      CurrentEigenvalues[index] = 0.;
+      size_t count = 0;
+      BOOST_FOREACH( SubspaceMap::value_type iter, Dimension_to_Indexset) {
+        const VectorContent CurrentEV = (iter.second)->getEigenvectorParallelToFullOne(index);
+        *CurrentEigenvectors[index] += CurrentEV * (iter.second)->getEigenvalueOfEigenvectorParallelToFullOne(index);
+        CurrentEigenvalues[index] += (iter.second)->getEigenvalueOfEigenvectorParallelToFullOne(index);
+        if (!CurrentEV.IsZero())
+          count++;
+      }
+      *CurrentEigenvectors[index] *= 1./CurrentEigenvalues[index];
+      CurrentEigenvalues[index] /= (double)count;
+    }
+
+    // check orthonormality
+    threshold = calculateOrthogonalityThreshold(AllIndices, CurrentEigenvectors);
+    bool dontOrthonormalization = checkOrthogonality(AllIndices, CurrentEigenvectors);
+
+    // orthonormalize
+    if (!dontOrthonormalization) {
+      Log() << Verbose(0) << "Orthonormalizing ... " << std::endl;
+      for (IndexSet::const_iterator firstindex = AllIndices.begin();
+          firstindex != AllIndices.end();
+          ++firstindex) {
+        for (IndexSet::const_iterator secondindex = firstindex;
+            secondindex != AllIndices.end();
+            ++secondindex) {
+          if (*firstindex == *secondindex) {
+            (*CurrentEigenvectors[*secondindex]) *= 1./(*CurrentEigenvectors[*secondindex]).Norm();
+          } else {
+            (*CurrentEigenvectors[*secondindex]) -=
+                ((*CurrentEigenvectors[*firstindex])*(*CurrentEigenvectors[*secondindex]))
+                *(*CurrentEigenvectors[*firstindex]);
+          }
+        }
+      }
+    }
+
+//    // check orthonormality again
+//    checkOrthogonality(AllIndices, CurrentEigenvectors);
+
+    // put obtained eigenvectors into full space
+    FullSpace.setEigenpairs(CurrentEigenvectors, CurrentEigenvalues);
+
+    // show new ones
+    Log() << Verbose(0) << "Resulting new eigenvectors and -values, run " << run << " are:" << std::endl;
+    BOOST_FOREACH( size_t index, AllIndices) {
+      Log() << Verbose(0) << *CurrentEigenvectors[index] << " with " << CurrentEigenvalues[index] << std::endl;
+    }
+    run++;
+  }
+
+
   CPPUNIT_ASSERT_EQUAL(0,0);
 }
Index: src/unittests/SubspaceFactorizerUnittest.hpp
===================================================================
--- src/unittests/SubspaceFactorizerUnittest.hpp	(revision 7d059dd842ec69d4f92d90a9d682739b6028ab89)
+++ src/unittests/SubspaceFactorizerUnittest.hpp	(revision 286af5fb9ad803eaed15af491597fbf6b924d817)
@@ -40,4 +40,5 @@
 
   enum { matrixdimension = 3 };
+  enum { subspacelimit = 2 };
 private:
 
