From a61f5b28b3c7db85575a30d1c724842db680ca39 Mon Sep 17 00:00:00 2001
From: Christoph Lehmann <christoph.lehmann@ufz.de>
Date: Sat, 16 Apr 2016 11:41:56 +0200
Subject: [PATCH] [GWFlow] moved to subdirectory, put into separate namespace

---
 Applications/ApplicationsLib/ProjectData.cpp             | 5 +++--
 ProcessLib/CMakeLists.txt                                | 5 ++++-
 ProcessLib/GroundwaterFlow/CMakeLists.txt                | 0
 ProcessLib/{ => GroundwaterFlow}/GroundwaterFlowFEM.h    | 6 ++----
 .../{ => GroundwaterFlow}/GroundwaterFlowProcess-fwd.h   | 4 ++--
 .../{ => GroundwaterFlow}/GroundwaterFlowProcess.cpp     | 7 ++++---
 .../{ => GroundwaterFlow}/GroundwaterFlowProcess.h       | 9 ++++++---
 7 files changed, 21 insertions(+), 15 deletions(-)
 create mode 100644 ProcessLib/GroundwaterFlow/CMakeLists.txt
 rename ProcessLib/{ => GroundwaterFlow}/GroundwaterFlowFEM.h (98%)
 rename ProcessLib/{ => GroundwaterFlow}/GroundwaterFlowProcess-fwd.h (77%)
 rename ProcessLib/{ => GroundwaterFlow}/GroundwaterFlowProcess.cpp (88%)
 rename ProcessLib/{ => GroundwaterFlow}/GroundwaterFlowProcess.h (98%)

diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp
index fc71924b38c..9df0b36d7b4 100644
--- a/Applications/ApplicationsLib/ProjectData.cpp
+++ b/Applications/ApplicationsLib/ProjectData.cpp
@@ -33,7 +33,7 @@
 
 #include "UncoupledProcessesTimeLoop.h"
 
-#include "ProcessLib/GroundwaterFlowProcess-fwd.h"
+#include "ProcessLib/GroundwaterFlow/GroundwaterFlowProcess-fwd.h"
 
 
 namespace detail
@@ -170,7 +170,8 @@ void ProjectData::buildProcesses()
 			// several meshes. Then we have to assign the referenced mesh
 			// here.
 			_processes.emplace_back(
-				ProcessLib::createGroundwaterFlowProcess<GlobalSetupType>(
+				ProcessLib::GroundwaterFlow::
+				createGroundwaterFlowProcess<GlobalSetupType>(
 				    *_mesh_vec[0], *nl_slv, std::move(time_disc),
 				    _process_variables, _parameters, pc));
 		}
diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt
index d9c60892dc0..64e8b6308c2 100644
--- a/ProcessLib/CMakeLists.txt
+++ b/ProcessLib/CMakeLists.txt
@@ -1,7 +1,10 @@
 include(${PROJECT_SOURCE_DIR}/scripts/cmake/OGSEnabledElements.cmake)
 
 # Source files
-GET_SOURCE_FILES(SOURCES)
+APPEND_SOURCE_FILES(SOURCES)
+
+add_subdirectory(GroundwaterFlow)
+APPEND_SOURCE_FILES(SOURCES GroundwaterFlow)
 
 add_library(ProcessLib STATIC ${SOURCES})
 
diff --git a/ProcessLib/GroundwaterFlow/CMakeLists.txt b/ProcessLib/GroundwaterFlow/CMakeLists.txt
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/ProcessLib/GroundwaterFlowFEM.h b/ProcessLib/GroundwaterFlow/GroundwaterFlowFEM.h
similarity index 98%
rename from ProcessLib/GroundwaterFlowFEM.h
rename to ProcessLib/GroundwaterFlow/GroundwaterFlowFEM.h
index a601559c42d..c0bf5c107b9 100644
--- a/ProcessLib/GroundwaterFlowFEM.h
+++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowFEM.h
@@ -14,10 +14,8 @@
 
 #include "NumLib/Fem/FiniteElement/TemplateIsoparametric.h"
 #include "NumLib/Fem/ShapeMatrixPolicy.h"
-
-#include "Parameter.h"
-#include "ProcessUtil.h"
-
+#include "ProcessLib/Parameter.h"
+#include "ProcessLib/ProcessUtil.h"
 
 namespace ProcessLib
 {
diff --git a/ProcessLib/GroundwaterFlowProcess-fwd.h b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess-fwd.h
similarity index 77%
rename from ProcessLib/GroundwaterFlowProcess-fwd.h
rename to ProcessLib/GroundwaterFlow/GroundwaterFlowProcess-fwd.h
index 7f147f49542..57c6516da9f 100644
--- a/ProcessLib/GroundwaterFlowProcess-fwd.h
+++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess-fwd.h
@@ -11,8 +11,8 @@
 #define PROCESS_LIB_GROUNDWATERFLOWPROCESS_FWD_H_
 
 #include "GroundwaterFlowProcess.h"
-#include "NumericsConfig.h"
+#include "ProcessLib/NumericsConfig.h"
 
-extern template class ProcessLib::GroundwaterFlowProcess<GlobalSetupType>;
+extern template class ProcessLib::GroundwaterFlow::GroundwaterFlowProcess<GlobalSetupType>;
 
 #endif  // PROCESS_LIB_GROUNDWATERFLOWPROCESS_FWD_H_
diff --git a/ProcessLib/GroundwaterFlowProcess.cpp b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp
similarity index 88%
rename from ProcessLib/GroundwaterFlowProcess.cpp
rename to ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp
index 46df0f284b7..2646e636596 100644
--- a/ProcessLib/GroundwaterFlowProcess.cpp
+++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.cpp
@@ -10,9 +10,10 @@
 #include "GroundwaterFlowProcess-fwd.h"
 #include "GroundwaterFlowProcess.h"
 
-namespace ProcessLib
-{
+namespace ProcessLib {
+namespace GroundwaterFlow {
 
 template class GroundwaterFlowProcess<GlobalSetupType>;
 
-}   // namespace ProcessLib
+}
+}
diff --git a/ProcessLib/GroundwaterFlowProcess.h b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h
similarity index 98%
rename from ProcessLib/GroundwaterFlowProcess.h
rename to ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h
index 7ed8b266369..d38420d6ec2 100644
--- a/ProcessLib/GroundwaterFlowProcess.h
+++ b/ProcessLib/GroundwaterFlow/GroundwaterFlowProcess.h
@@ -12,13 +12,11 @@
 
 #include <cassert>
 
-#include <boost/optional.hpp>
-
 #include "AssemblerLib/LocalAssemblerBuilder.h"
 #include "AssemblerLib/LocalDataInitializer.h"
+#include "ProcessLib/Process.h"
 
 #include "GroundwaterFlowFEM.h"
-#include "Process.h"
 
 namespace MeshLib
 {
@@ -30,6 +28,9 @@ namespace MeshLib
 namespace ProcessLib
 {
 
+namespace GroundwaterFlow
+{
+
 template<typename GlobalSetup>
 class GroundwaterFlowProcess final
         : public Process<GlobalSetup>
@@ -192,6 +193,8 @@ createGroundwaterFlowProcess(
             hydraulic_conductivity
     }};
 }
+
+}   // namespace GroundwaterFlow
 }   // namespace ProcessLib
 
 #endif  // PROCESS_LIB_GROUNDWATERFLOWPROCESS_H_
-- 
GitLab