From 42619155fe7c48bf0c49354250a4df13a51878ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org>
Date: Wed, 9 Oct 2019 22:48:46 +0200
Subject: [PATCH] [cleanup] Includes with subdirs for np/ and ./

---
 CMakeLists.txt                       | 3 ---
 cmake/modules/DuneUggridMacros.cmake | 3 ---
 gm/rm-tetrahedron-rules-test.cc      | 3 ++-
 initug.cc                            | 2 +-
 np/algebra/sm.cc                     | 2 +-
 np/initnp.cc                         | 6 +++---
 np/np.h                              | 4 ++--
 np/udm/disctools.h                   | 2 +-
 np/udm/formats.cc                    | 4 ++--
 np/udm/udm.cc                        | 2 +-
 np/udm/udm.h                         | 2 +-
 ui/commands.cc                       | 9 +++++----
 12 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b3a244e5..edc8ec0c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,9 +67,6 @@ endif()
 
 #set the include headers
 include_directories(${PROJECT_SOURCE_DIR}
-  ${PROJECT_SOURCE_DIR}/np
-  ${PROJECT_SOURCE_DIR}/np/algebra
-  ${PROJECT_SOURCE_DIR}/np/udm
   ${PROJECT_SOURCE_DIR}/parallel ${PROJECT_SOURCE_DIR}/parallel/ddd
   ${PROJECT_SOURCE_DIR}/parallel/ppif
   ${PROJECT_SOURCE_DIR}/parallel/dddif
diff --git a/cmake/modules/DuneUggridMacros.cmake b/cmake/modules/DuneUggridMacros.cmake
index fea97cfef..42caad652 100644
--- a/cmake/modules/DuneUggridMacros.cmake
+++ b/cmake/modules/DuneUggridMacros.cmake
@@ -29,9 +29,6 @@ check_include_file ("rpc/rpc.h" HAVE_RPC_RPC_H)
 # to work around includes not relative to dune-uggrid's root directory
 if((NOT dune-uggrid_INSTALLED) AND (NOT PROJECT_NAME STREQUAL dune-uggrid))
   include_directories(${dune-uggrid_PREFIX}
-    ${dune-uggrid_PREFIX}/np
-    ${dune-uggrid_PREFIX}/np/algebra
-    ${dune-uggrid_PREFIX}/np/udm
     ${dune-uggrid_PREFIX}/parallel ${dune-uggrid_PREFIX}/parallel/ddd
     ${dune-uggrid_PREFIX}/parallel/ppif
     ${dune-uggrid_PREFIX}/parallel/dddif
diff --git a/gm/rm-tetrahedron-rules-test.cc b/gm/rm-tetrahedron-rules-test.cc
index 78c1da58d..fbd3c86f5 100644
--- a/gm/rm-tetrahedron-rules-test.cc
+++ b/gm/rm-tetrahedron-rules-test.cc
@@ -5,9 +5,10 @@
 #include <dune/common/parallel/mpihelper.hh>
 #include <dune/common/test/testsuite.hh>
 
+#include <initug.h>
+
 #include "evm.h"
 #include "gm.h"
-#include "initug.h"
 #include "rm.h"
 
 USING_UGDIM_NAMESPACE
diff --git a/initug.cc b/initug.cc
index 59386d7a7..61c513bd5 100644
--- a/initug.cc
+++ b/initug.cc
@@ -67,7 +67,7 @@ using namespace PPIF;
 #include "gm/initgm.h"
 
 /* numerics module */
-#include "np/initnumerics.h"
+#include <np/initnumerics.h>
 
 /* own header */
 #include "initug.h"
diff --git a/np/algebra/sm.cc b/np/algebra/sm.cc
index 54be8a118..46df6ac13 100644
--- a/np/algebra/sm.cc
+++ b/np/algebra/sm.cc
@@ -32,7 +32,7 @@
 
 REP_ERR_FILE
 
-#include "udm.h"  /* for MAX_MAT_COMP */
+#include <np/udm/udm.h>  /* for MAX_MAT_COMP */
 
 /****************************************************************************/
 /** \brief Computes the size of a sparse matrix array
diff --git a/np/initnp.cc b/np/initnp.cc
index acb547517..ce7c8d885 100644
--- a/np/initnp.cc
+++ b/np/initnp.cc
@@ -31,12 +31,12 @@
 #include <config.h>
 #include <cstdio>
 
-#include "np.h"
 #include <low/general.h>
-#include "udm.h"
-#include "formats.h"
 
+#include "np.h"
 #include "initnumerics.h"
+#include <np/udm/formats.h>
+#include <np/udm/udm.h>
 
 USING_UG_NAMESPACES
 
diff --git a/np/np.h b/np/np.h
index aa6e0184d..c3abc2785 100644
--- a/np/np.h
+++ b/np/np.h
@@ -37,8 +37,8 @@
 #include <low/namespace.h>
 #include <low/ugenv.h>
 #include <low/ugtypes.h>
-#include "formats.h"
-#include "udm.h"
+#include <np/udm/formats.h>
+#include <np/udm/udm.h>
 
 START_UGDIM_NAMESPACE
 
diff --git a/np/udm/disctools.h b/np/udm/disctools.h
index c87ad64bd..6e4306cb0 100644
--- a/np/udm/disctools.h
+++ b/np/udm/disctools.h
@@ -31,7 +31,7 @@
 #include <gm/gm.h>
 #include <low/namespace.h>
 #include <low/ugtypes.h>
-#include "np.h"
+#include <np/np.h>
 
 START_UGDIM_NAMESPACE
 
diff --git a/np/udm/formats.cc b/np/udm/formats.cc
index 6b10ef032..4d49acbcb 100644
--- a/np/udm/formats.cc
+++ b/np/udm/formats.cc
@@ -45,9 +45,9 @@
 #include <low/ugstruct.h>
 #include <low/ugtypes.h>
 
-#include "np.h"
+#include <np/np.h>
+#include <np/udm/formats.h>
 
-#include "formats.h"
 
 USING_UG_NAMESPACES
 
diff --git a/np/udm/udm.cc b/np/udm/udm.cc
index 9d8745a8e..c98eaeb92 100644
--- a/np/udm/udm.cc
+++ b/np/udm/udm.cc
@@ -39,7 +39,7 @@
 #include <low/debug.h>
 #include <low/general.h>
 #include <low/ugenv.h>
-#include "np.h"
+#include <np/np.h>
 
 #include "udm.h"
 
diff --git a/np/udm/udm.h b/np/udm/udm.h
index 28d8776e3..3c35dd02f 100644
--- a/np/udm/udm.h
+++ b/np/udm/udm.h
@@ -35,7 +35,7 @@
 #include <gm/gm.h>
 #include <low/namespace.h>
 #include <low/ugtypes.h>
-#include "sm.h"
+#include <np/algebra/sm.h>
 
 START_UGDIM_NAMESPACE
 
diff --git a/ui/commands.cc b/ui/commands.cc
index 9837a66eb..ffb06d5fb 100644
--- a/ui/commands.cc
+++ b/ui/commands.cc
@@ -46,13 +46,14 @@
 #include <ctime>
 #include <cassert>
 
+#include <initug.h>
+
 /* low module */
 #include <low/architecture.h>
 #include <low/debug.h>
 #include <low/defaults.h>
 #include <low/fileopen.h>
 #include <low/general.h>
-#include "initug.h"
 #include <low/heaps.h>              /* for MEM declaration */
 #include <low/misc.h>
 #include <low/ugenv.h>
@@ -76,9 +77,9 @@
 #include <gm/ugm.h>
 
 /* numerics module */
-#include "np.h"
-#include "disctools.h"
-#include "udm.h"
+#include <np/np.h>
+#include <np/udm/disctools.h>
+#include <np/udm/udm.h>
 
 #ifdef ModelP
 #include "parallel.h"
-- 
GitLab