Index: ThirdParty/vmg/src/cycles/cycle.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,162 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:45:29 2012
+ *
+ * @brief  Base class for multigrid cycles.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "cycles/cycle.hpp"
+
+using namespace VMG;
+
+void Cycle::AddCycle(CommandList& list, int numLevels, int gamma)
+{
+  for (int i=0; i<numLevels-1; i++) {
+    list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+    list.AddCommand("Restrict");
+  }
+
+  list.AddCommand("Solve");
+
+  for (int i=1; i<gamma; i++) {
+
+    for (int j=0; j<numLevels-2; j++) {
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Prolongate");
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+      }
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+        list.AddCommand("Restrict");
+      }
+
+      list.AddCommand("Solve");
+
+    }
+
+    for (int j=numLevels-4; j>=0; j--) {
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Prolongate");
+        list.AddCommand("Smooth", "POSTSMOOTHSTEPS");
+      }
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+        list.AddCommand("Restrict");
+      }
+
+      list.AddCommand("Solve");
+    }
+
+  }
+
+  for (int i=0; i<numLevels-1; i++) {
+    list.AddCommand("Prolongate");
+    list.AddCommand("Smooth", "POSTSMOOTHSTEPS");
+  }
+}
+
+void Cycle::AddCycleDebug(CommandList& list, int numLevels, int gamma)
+{
+  for (int i=0; i<numLevels-1; i++) {
+    list.AddCommand("PrintGrid", "RHS");
+    list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+    list.AddCommand("PrintGrid", "SOL");
+    list.AddCommand("PrintDefect");
+    list.AddCommand("Restrict");
+  }
+
+  list.AddCommand("PrintGrid", "RHS");
+  list.AddCommand("Solve");
+  list.AddCommand("PrintGrid", "SOL");
+  list.AddCommand("PrintDefect");
+
+  for (int i=1; i<gamma; i++) {
+
+    for (int j=0; j<numLevels-2; j++) {
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Prolongate");
+        list.AddCommand("PrintGrid", "RHS");
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+        list.AddCommand("PrintGrid", "SOL");
+        list.AddCommand("PrintDefect");
+      }
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("PrintGrid", "RHS");
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+        list.AddCommand("PrintGrid", "SOL");
+        list.AddCommand("PrintDefect");
+        list.AddCommand("Restrict");
+      }
+
+      list.AddCommand("PrintGrid", "RHS");
+      list.AddCommand("Solve");
+      list.AddCommand("PrintGrid", "SOL");
+      list.AddCommand("PrintDefect");
+
+    }
+
+    for (int j=numLevels-4; j>=0; j--) {
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("Prolongate");
+        list.AddCommand("PrintGrid", "RHS");
+        list.AddCommand("Smooth", "POSTSMOOTHSTEPS");
+        list.AddCommand("PrintGrid", "SOL");
+        list.AddCommand("PrintDefect");
+      }
+
+      for (int k=0; k<=j; k++) {
+        list.AddCommand("PrintGrid", "RHS");
+        list.AddCommand("Smooth", "PRESMOOTHSTEPS");
+        list.AddCommand("PrintGrid", "SOL");
+        list.AddCommand("PrintDefect");
+        list.AddCommand("Restrict");
+      }
+
+      list.AddCommand("PrintGrid", "RHS");
+      list.AddCommand("Solve");
+      list.AddCommand("PrintGrid", "SOL");
+      list.AddCommand("PrintDefect");
+    }
+
+  }
+
+  for (int i=0; i<numLevels-1; i++) {
+    list.AddCommand("Prolongate");
+    list.AddCommand("PrintGrid", "RHS");
+    list.AddCommand("Smooth", "POSTSMOOTHSTEPS");
+    list.AddCommand("PrintGrid", "SOL");
+    list.AddCommand("PrintDefect");
+  }
+}
Index: ThirdParty/vmg/src/cycles/cycle.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,59 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:45:29 2012
+ *
+ * @brief  Base class for multigrid cycles.
+ *
+ */
+
+#ifndef CYCLE_HPP_
+#define CYCLE_HPP_
+
+#include "base/object.hpp"
+
+namespace VMG
+{
+
+class CommandList;
+
+class Cycle : public Object
+{
+public:
+  Cycle(const int& gamma, bool register_ = true) :
+    Object("CYCLE", register_),
+    gamma(gamma)
+  {}
+
+  virtual ~Cycle() {}
+
+  virtual void Generate() = 0;
+
+protected:
+  void AddCycle(CommandList& list, int numLevels, int gamma);
+  void AddCycleDebug(CommandList& list, int numLevels, int gamma);
+
+  int gamma;
+};
+
+}
+
+#endif /* CYCLE_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,73 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_dirichlet.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         Dirichlet boundary conditions.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_cs_dirichlet.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleCSDirichlet::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("CopyBoundary", "RHS:SOL");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+
+  loop->AddCommand("ClearCoarseLevels", "RHS");
+  loop->AddCommand("ClearCoarseLevels", "SOL");
+
+  AddCycle(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_dirichlet.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_dirichlet.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         Dirichlet boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_CS_DIRICHLET_HPP_
+#define CYCLE_CS_DIRICHLET_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleCSDirichlet : public Cycle
+{
+public:
+  CycleCSDirichlet(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleCSDirichlet() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_CS_DIRICHLET_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,75 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_dirichlet_debug.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         Dirichlet boundary conditions with debug
+ *         output.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_cs_dirichlet_debug.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleCSDirichletDebug::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("CopyBoundary", "RHS:SOL");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+  init->AddCommand("PrintAllSettings");
+
+  loop->AddCommand("ClearCoarseLevels", "RHS");
+  loop->AddCommand("ClearCoarseLevels", "SOL");
+
+  AddCycleDebug(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_dirichlet_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,52 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_dirichlet_debug.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         Dirichlet boundary conditions with debug
+ *         output.
+ *
+ */
+
+#ifndef CYCLE_CS_DIRICHLET_DEBUG_HPP_
+#define CYCLE_CS_DIRICHLET_DEBUG_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleCSDirichletDebug : public Cycle
+{
+public:
+  CycleCSDirichletDebug(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleCSDirichletDebug() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_CS_DIRICHLET_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_cs_periodic.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_periodic.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_periodic.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,74 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_periodic.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_cs_periodic.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleCSPeriodic::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+
+  loop->AddCommand("ClearCoarseLevels", "SOL");
+  loop->AddCommand("ClearCoarseLevels", "RHS");
+
+  AddCycle(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("SetAverageToZero", "SOL");
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+
+}
Index: ThirdParty/vmg/src/cycles/cycle_cs_periodic.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_periodic.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_periodic.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_periodic.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_CS_PERIODIC_HPP_
+#define CYCLE_CS_PERIODIC_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleCSPeriodic : public Cycle
+{
+public:
+  CycleCSPeriodic(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleCSPeriodic() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_CS_PERIODIC_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,75 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_periodic_debug.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         periodic boundary conditions with debug
+ *         output.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_cs_periodic_debug.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleCSPeriodicDebug::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+  init->AddCommand("PrintAllSettings");
+
+  loop->AddCommand("ClearCoarseLevels", "SOL");
+  loop->AddCommand("ClearCoarseLevels", "RHS");
+
+  AddCycleDebug(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("SetAverageToZero", "SOL");
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_cs_periodic_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_cs_periodic_debug.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a Correction Scheme cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_CS_PERIODIC_DEBUG_HPP_
+#define CYCLE_CS_PERIODIC_DEBUG_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleCSPeriodicDebug : public Cycle
+{
+public:
+  CycleCSPeriodicDebug(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleCSPeriodicDebug() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_CS_PERIODIC_DEBUG_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,70 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_dirichlet.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         Dirichlet boundary conditions.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_fas_dirichlet.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleFASDirichlet::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("CopyBoundary", "RHS:SOL");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+
+  AddCycle(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_dirichlet.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_dirichlet.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         Dirichlet boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_FAS_DIRICHLET_HPP_
+#define CYCLE_FAS_DIRICHLET_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleFASDirichlet : public Cycle
+{
+public:
+  CycleFASDirichlet(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleFASDirichlet() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_FAS_DIRICHLET_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,71 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_dirichlet.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         Dirichlet boundary conditions.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_fas_dirichlet_debug.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleFASDirichletDebug::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("CopyBoundary", "RHS:SOL");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+  init->AddCommand("PrintAllSettings");
+
+  AddCycleDebug(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_dirichlet_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,52 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_dirichlet_debug.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         Dirichlet boundary conditions
+ *         with debug output.
+ *
+ */
+
+#ifndef CYCLE_FAS_DIRICHLET_DEBUG_HPP_
+#define CYCLE_FAS_DIRICHLET_DEBUG_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleFASDirichletDebug : public Cycle
+{
+public:
+  CycleFASDirichletDebug(const int& gamma) :
+    Cycle(gamma)
+  {}
+
+  virtual ~CycleFASDirichletDebug() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_FAS_DIRICHLET_DEBUG_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_fas_periodic.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_periodic.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_periodic.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,69 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_periodic.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_fas_periodic.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleFASPeriodic::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+
+  AddCycle(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_fas_periodic.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_periodic.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_periodic.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_periodic.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_FAS_PERIODIC_HPP_
+#define CYCLE_FAS_PERIODIC_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleFASPeriodic : public Cycle
+{
+public:
+  CycleFASPeriodic(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleFASPeriodic() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_FAS_PERIODIC_HPP_ */
Index: ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.cpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.cpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,71 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_periodic_debug.cpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         periodic boundary conditions with debug
+ *         output.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <libvmg_config.h>
+#endif
+
+#include "base/command_list.hpp"
+#include "base/interface.hpp"
+#include "cycles/cycle_fas_periodic_debug.hpp"
+#include "mg.hpp"
+
+using namespace VMG;
+
+void CycleFASPeriodicDebug::Generate()
+{
+  CommandList* init = new CommandList();
+  CommandList* loop = new CommandList();
+  CommandList* finalize = new CommandList();
+
+  const int min_level = MG::GetInterface()->MinLevel();
+  const int max_level = MG::GetInterface()->MaxLevel();
+
+  init->AddCommand("ClearGrid", "RHS");
+  init->AddCommand("ClearGrid", "SOL");
+  init->AddCommand("ImportRightHandSide");
+  init->AddCommand("ForceDiscreteCompatibility");
+  init->AddCommand("CheckConsistency", "RHS");
+  init->AddCommand("InitializeIterationCounter");
+  init->AddCommand("InitializeResidualNorm", "INITIAL_RESIDUAL");
+  init->AddCommand("PrintAllSettings");
+
+  AddCycleDebug(*loop, max_level-min_level+1, gamma);
+
+  loop->AddCommand("ComputeResidualNorm", "RESIDUAL");
+  loop->AddCommand("CheckResidual", "RESIDUAL");
+  loop->AddCommand("CheckRelativeResidual", "RESIDUAL:INITIAL_RESIDUAL");
+  loop->AddCommand("CheckIterationCounter");
+
+  finalize->AddCommand("ExportSolution");
+
+  init->Register("COMMANDLIST_INIT");
+  loop->Register("COMMANDLIST_LOOP");
+  finalize->Register("COMMANDLIST_FINALIZE");
+}
Index: ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.hpp
===================================================================
--- ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
+++ ThirdParty/vmg/src/cycles/cycle_fas_periodic_debug.hpp	(revision 7faa5c793164ff799487bb1193ab2a18a3a7e2fb)
@@ -0,0 +1,51 @@
+/*
+ *    vmg - a versatile multigrid solver
+ *    Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
+ *
+ *  vmg is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  vmg is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file   cycle_fas_periodic_debug.hpp
+ * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
+ * @date   Wed Jun 27 14:48:42 2012
+ *
+ * @brief  Generates a FAS cycle for
+ *         periodic boundary conditions.
+ *
+ */
+
+#ifndef CYCLE_FAS_PERIODIC_DEBUG_HPP_
+#define CYCLE_FAS_PERIODIC_DEBUG_HPP_
+
+#include "cycles/cycle.hpp"
+
+namespace VMG
+{
+
+class CycleFASPeriodicDebug : public Cycle
+{
+public:
+  CycleFASPeriodicDebug(const int& gamma, bool register_ = true) :
+    Cycle(gamma, register_)
+  {}
+
+  virtual ~CycleFASPeriodicDebug() {}
+
+  void Generate();
+};
+
+}
+
+#endif /* CYCLE_FAS_PERIODIC_DEBUG_HPP_ */
