From a3f3ec81f81dc7d1b682c623f0344721648a9c8d Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Thu, 5 Sep 2019 14:25:15 +0100
Subject: [PATCH] BUG: randomDecomp: added non-mesh decomposition. Fixes #1428.

---
 .../randomDecomp/randomDecomp.C               | 19 +++++++++++++++++++
 .../randomDecomp/randomDecomp.H               | 12 ++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.C b/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.C
index e1b583cdd82..858baebd7ab 100644
--- a/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.C
+++ b/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.C
@@ -86,6 +86,25 @@ Foam::randomDecomp::randomDecomp
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+Foam::labelList Foam::randomDecomp::decompose
+(
+    const pointField& points,
+    const scalarField& pointWeights
+) const
+{
+    return randomMap(points.size());
+}
+
+
+Foam::labelList Foam::randomDecomp::decompose
+(
+    const pointField& points
+) const
+{
+    return randomMap(points.size());
+}
+
+
 Foam::labelList Foam::randomDecomp::decompose
 (
     const polyMesh& mesh,
diff --git a/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.H b/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.H
index 5eea76c9f0b..062cb2363a5 100644
--- a/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.H
+++ b/src/parallel/decompose/decompositionMethods/randomDecomp/randomDecomp.H
@@ -91,6 +91,18 @@ public:
             return true;
         }
 
+    // No topology (implemented by geometric decomposers)
+
+        //- Return for every coordinate the wanted processor number.
+        virtual labelList decompose
+        (
+            const pointField& points,
+            const scalarField& pointWeights
+        ) const;
+
+        //- Decompose with uniform weights on the points
+        virtual labelList decompose(const pointField& points) const;
+
         //- Return for every coordinate the wanted processor number.
         virtual labelList decompose
         (
-- 
GitLab