From 6d897700123f1959561d0f0587c8d9c802e35e46 Mon Sep 17 00:00:00 2001
From: Nicolas Marsic <marsic@temf.tu-darmstadt.de>
Date: Mon, 1 Feb 2021 11:31:06 +0100
Subject: [PATCH] partitioning for new photon trap .geo

---
 tests/haroche/cavity.dat    |  9 +++++----
 tests/haroche/partition.geo | 15 +++++++++++++++
 2 files changed, 20 insertions(+), 4 deletions(-)
 create mode 100644 tests/haroche/partition.geo

diff --git a/tests/haroche/cavity.dat b/tests/haroche/cavity.dat
index 15638e13..f226ce7c 100644
--- a/tests/haroche/cavity.dat
+++ b/tests/haroche/cavity.dat
@@ -45,10 +45,11 @@ pml_z = thick * Lambda0;
 
 // Mesh
 DefineConstant[
-  mAir = { 8, Name "Input/03Mesh/00Air density",    Units "elem./wavelength" },
-  mPML = { 8, Name "Input/03Mesh/01PML density",    Units "elem./wavelength" },
-  mMir = { 8, Name "Input/03Mesh/02Mirror density", Units "elem./wavelength" },
-  mO   = { 2, Name "Input/03Mesh/03Order",          Units "-"                }
+  mAir  = { 5, Name "Input/03Mesh/00Air density",    Units "elem./wavelength" },
+  mPML  = { 5, Name "Input/03Mesh/01PML density",    Units "elem./wavelength" },
+  mMir  = { 5, Name "Input/03Mesh/02Mirror density", Units "elem./wavelength" },
+  mO    = { 2, Name "Input/03Mesh/03Order",          Units "-"                },
+  nPart = { 2, Name "Input/03Mesh/04#partitions",    Units "-"                }
 ];
 
 clPML = Lambda0 / mPML;
diff --git a/tests/haroche/partition.geo b/tests/haroche/partition.geo
new file mode 100644
index 00000000..02004502
--- /dev/null
+++ b/tests/haroche/partition.geo
@@ -0,0 +1,15 @@
+// Data //
+//////////
+Include "cavity.dat";
+Merge   "cavity.msh";
+
+// Partitioning //
+//////////////////
+Mesh.PartitionCreateTopology   = 0;
+Mesh.PartitionCreatePhysicals  = 0;
+Mesh.PartitionCreateGhostCells = 0;
+
+If(nPart > 1)
+  PartitionMesh nPart;
+  Save Sprintf("cavity_part%g.msh", nPart);
+EndIf
-- 
GitLab