From d12b64a273c0a733a12bbf9db406e66c5fb3b403 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Thu, 26 Aug 2010 16:14:10 +0100
Subject: [PATCH] COMP: moved distributedTriSurfaceMesh to break cyclic
 dependency

structuredDecomp uses finiteVolume which uses meshTools which
used to use decompositionMethods
---
 src/Allwmake                                           |  6 ++----
 src/meshTools/Make/files                               |  1 -
 src/meshTools/Make/options                             |  2 --
 src/parallel/Allwmake                                  | 10 ++++++++++
 src/parallel/distributed/Make/files                    |  3 +++
 src/parallel/distributed/Make/options                  |  9 +++++++++
 .../distributedTriSurfaceMesh.C                        |  0
 .../distributedTriSurfaceMesh.H                        |  0
 .../distributedTriSurfaceMeshTemplates.C               |  0
 9 files changed, 24 insertions(+), 7 deletions(-)
 create mode 100755 src/parallel/Allwmake
 create mode 100644 src/parallel/distributed/Make/files
 create mode 100644 src/parallel/distributed/Make/options
 rename src/{meshTools/searchableSurface => parallel/distributed/distributedTriSurfaceMesh}/distributedTriSurfaceMesh.C (100%)
 rename src/{meshTools/searchableSurface => parallel/distributed/distributedTriSurfaceMesh}/distributedTriSurfaceMesh.H (100%)
 rename src/{meshTools/searchableSurface => parallel/distributed/distributedTriSurfaceMesh}/distributedTriSurfaceMeshTemplates.C (100%)

diff --git a/src/Allwmake b/src/Allwmake
index e1589a40467..33966ddb97b 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -32,14 +32,12 @@ parallel/decompose/AllwmakeLnInclude
 # dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
 dummyThirdParty/Allwmake
 
-# Build the proper scotchDecomp, metisDecomp etc.
-parallel/decompose/Allwmake
-
 wmake libso meshTools
 wmake libso finiteVolume
 wmake libso genericPatchFields
 
-parallel/reconstruct/Allwmake
+# Build the proper scotchDecomp, metisDecomp etc.
+parallel/Allwmake
 
 wmake libso sampling
 
diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files
index 30e68c56a71..14e561fcbab 100644
--- a/src/meshTools/Make/files
+++ b/src/meshTools/Make/files
@@ -55,7 +55,6 @@ indexedOctree/treeDataPrimitivePatchName.C
 indexedOctree/treeDataTriSurface.C
 
 searchableSurface = searchableSurface
-$(searchableSurface)/distributedTriSurfaceMesh.C
 $(searchableSurface)/searchableBox.C
 $(searchableSurface)/searchableCylinder.C
 $(searchableSurface)/searchablePlane.C
diff --git a/src/meshTools/Make/options b/src/meshTools/Make/options
index c082d2f3591..ef1033b0e8e 100644
--- a/src/meshTools/Make/options
+++ b/src/meshTools/Make/options
@@ -1,9 +1,7 @@
 EXE_INC = \
     -I$(LIB_SRC)/triSurface/lnInclude \
-    -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
     -I$(LIB_SRC)/lagrangian/basic/lnInclude
 
 LIB_LIBS = \
     -ltriSurface \
-    -ldecompositionMethods \
     -llagrangian
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
new file mode 100755
index 00000000000..08ca4923f2d
--- /dev/null
+++ b/src/parallel/Allwmake
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+set -x
+
+decompose/Allwmake
+reconstruct/Allwmake
+wmake libso distributed
+
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/src/parallel/distributed/Make/files b/src/parallel/distributed/Make/files
new file mode 100644
index 00000000000..31a58d43f5e
--- /dev/null
+++ b/src/parallel/distributed/Make/files
@@ -0,0 +1,3 @@
+distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
+
+LIB = $(FOAM_LIBBIN)/libdistributed
diff --git a/src/parallel/distributed/Make/options b/src/parallel/distributed/Make/options
new file mode 100644
index 00000000000..f003a7fed94
--- /dev/null
+++ b/src/parallel/distributed/Make/options
@@ -0,0 +1,9 @@
+EXE_INC = \
+    -I$(LIB_SRC)/triSurface/lnInclude \
+    -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude
+
+LIB_LIBS = \
+    -ltriSurface \
+    -ldecompositionMethods \
+    -lmeshTools
diff --git a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
similarity index 100%
rename from src/meshTools/searchableSurface/distributedTriSurfaceMesh.C
rename to src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
diff --git a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.H b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
similarity index 100%
rename from src/meshTools/searchableSurface/distributedTriSurfaceMesh.H
rename to src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
diff --git a/src/meshTools/searchableSurface/distributedTriSurfaceMeshTemplates.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMeshTemplates.C
similarity index 100%
rename from src/meshTools/searchableSurface/distributedTriSurfaceMeshTemplates.C
rename to src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMeshTemplates.C
-- 
GitLab