From 4f0e33d1ec276dc0003a495fcd77b5584a4ce396 Mon Sep 17 00:00:00 2001
From: Axel Modave <axel.modave@ensta-paristech.fr>
Date: Mon, 29 Oct 2018 21:16:32 +0100
Subject: [PATCH] AcademicWaves: update + more onelab (EM not checked)

---
 AcademicWaves/main.dat | 52 ++++++++++++++++++++++++++++++++++++++++++
 AcademicWaves/main.geo | 10 ++++++++
 AcademicWaves/main.pro | 41 +++++++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+)
 create mode 100644 AcademicWaves/main.dat
 create mode 100644 AcademicWaves/main.geo
 create mode 100644 AcademicWaves/main.pro

diff --git a/AcademicWaves/main.dat b/AcademicWaves/main.dat
new file mode 100644
index 0000000..24adda9
--- /dev/null
+++ b/AcademicWaves/main.dat
@@ -0,0 +1,52 @@
+DIR = "out/";
+
+PBM_GAUSS_CUBOID = 1;
+PBM_GAUSS_SQUARE = 2;
+PBM_LOUDSPEAKER  = 3;
+PBM_SCATT_KITE   = 4;
+PBM_SCATT_PLATES = 5;
+PBM_SCATT_SPHERE = 6;
+
+RES_FREQ = 1;
+RES_TIME = 2;
+
+DefineConstant[
+  FLAG_PBM = {PBM_GAUSS_SQUARE,
+    Name "Input/0Type of problem", Highlight "Blue",
+    GmshOption "Reset", Autocheck 0,
+    Choices {PBM_GAUSS_SQUARE = "Gaussian pulse in square (2D, time)",
+             PBM_GAUSS_CUBOID = "Gaussian pulse in cuboid (3D, time)",
+             PBM_LOUDSPEAKER  = "Loudspeaker (2D, freq)",
+             PBM_SCATT_KITE   = "Scattering by Kite (2D, freq)",
+             PBM_SCATT_PLATES = "Scattering by Plates (2D, freq)",
+             PBM_SCATT_SPHERE = "Scattering by Sphere (3D, freq)"}}
+];
+
+If (FLAG_PBM==PBM_GAUSS_CUBOID)
+  LinkGeo = "gaussInCuboid.geo";
+  LinkPro = "gaussInCuboid.pro";
+EndIf
+If (FLAG_PBM==PBM_GAUSS_SQUARE)
+  LinkGeo = "gaussInSquare.geo";
+  LinkPro = "gaussInSquare.pro";
+EndIf
+If (FLAG_PBM==PBM_LOUDSPEAKER)
+  LinkGeo = "loudspeaker.geo";
+  LinkPro = "loudspeaker.pro";
+EndIf
+If (FLAG_PBM==PBM_SCATT_KITE)
+  LinkGeo = "scattKite.geo";
+  LinkPro = "scattKite.pro";
+EndIf
+If (FLAG_PBM==PBM_SCATT_PLATES)
+  LinkGeo = "scattPlates.geo";
+  LinkPro = "scattPlates.pro";
+EndIf
+If (FLAG_PBM==PBM_SCATT_SPHERE)
+  LinkGeo = "scattSphere.geo";
+  LinkPro = "scattSphere.pro";
+EndIf
+
+DefineConstant[
+  C_ = {"-solve -pos -bin -v2", Name "GetDP/9ComputeCommand", Visible 0 }
+];
diff --git a/AcademicWaves/main.geo b/AcademicWaves/main.geo
new file mode 100644
index 0000000..ef8e94d
--- /dev/null
+++ b/AcademicWaves/main.geo
@@ -0,0 +1,10 @@
+Include "main.dat" ;
+
+ORDER = 1;
+SetOrder ORDER;
+Mesh.ElementOrder = ORDER;
+Mesh.SecondOrderLinear = 0;
+
+If (FLAG_PBM!=0)
+  Include Str[LinkGeo] ;
+EndIf
diff --git a/AcademicWaves/main.pro b/AcademicWaves/main.pro
new file mode 100644
index 0000000..af36abe
--- /dev/null
+++ b/AcademicWaves/main.pro
@@ -0,0 +1,41 @@
+Include "main.dat" ;
+
+//===========================================
+// JACOBIAN & INTEGRATION
+//===========================================
+
+Jacobian {
+  { Name JVol; Case {{ Region All; Jacobian Vol; }}}
+  { Name JSur; Case {{ Region All; Jacobian Sur; }}}
+  { Name JLin; Case {{ Region All; Jacobian Lin; }}}
+}
+
+Integration {
+  { Name I1;
+    Case {
+      { Type Gauss;
+        Case {
+          { GeoElement Point;        NumberOfPoints 1; }
+          { GeoElement Line;         NumberOfPoints 4; }
+          { GeoElement Line2;        NumberOfPoints 6; }
+          { GeoElement Triangle;     NumberOfPoints 6; }
+          { GeoElement Triangle2;    NumberOfPoints 12; }
+          { GeoElement Tetrahedron;  NumberOfPoints 15; }
+          { GeoElement Tetrahedron2; NumberOfPoints 15; }
+        }
+      }
+    }
+  }
+}
+
+//===========================================
+// LOAD SPECIFIC .PRO
+//===========================================
+
+If (FLAG_PBM!=0)
+  Include Str[LinkPro] ;
+EndIf
+
+DefineConstant[
+  C_ = {"-solve -pos -bin -v2", Name "GetDP/9ComputeCommand", Visible 0 }
+];
-- 
GitLab