From c110dc69d42616c592158ef1727b9ba74d689e8a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 13 Aug 2001 10:42:20 +0000
Subject: [PATCH] extrusion benchmarks

---
 benchmarks/3d/stator-newxtr-rec.geo | 249 ++++++++++++++++++++++++++++
 benchmarks/3d/stator-newxtr.geo     | 249 ++++++++++++++++++++++++++++
 benchmarks/3d/stator-oldxtr.geo     | 238 ++++++++++++++++++++++++++
 benchmarks/3d/stator-oldxtr.par     |  10 ++
 4 files changed, 746 insertions(+)
 create mode 100644 benchmarks/3d/stator-newxtr-rec.geo
 create mode 100644 benchmarks/3d/stator-newxtr.geo
 create mode 100644 benchmarks/3d/stator-oldxtr.geo
 create mode 100644 benchmarks/3d/stator-oldxtr.par

diff --git a/benchmarks/3d/stator-newxtr-rec.geo b/benchmarks/3d/stator-newxtr-rec.geo
new file mode 100644
index 0000000000..a53ac811ba
--- /dev/null
+++ b/benchmarks/3d/stator-newxtr-rec.geo
@@ -0,0 +1,249 @@
+lc =0.001;
+s=1;
+
+h0 = 2.0e-3; //3.e-3;
+t1 = 1.0e-3; //3.9e-3;
+t2 = 1.0e-3;
+Wd = 6.e-3;
+R = 27.5e-3;
+r = 14.0e-3;
+
+nArc = 15;
+nSeg1 =2 ; // Side of Stator and Tooth (Vertical)
+nSeg2 =2 ; // Piezo
+nSeg3 =6;//5 ; // Long radius 
+nSeg4 =4;//3 ; // Wd
+
+Point(1) = {0.,       0.,       0.,  lc} ;
+Point(2) = {r,        0.,       0.,  lc} ;
+Point(3) = {(R-Wd/2), 0.,       0.,  lc} ; 
+Point(4) = {(R+Wd/2), 0.,       0.,  lc} ;
+
+Point(5) = {0.,       0.,       t1,  lc} ;
+Point(6) = {r,        0.,       t1,  lc} ;
+Point(7) = {(R-Wd/2), 0.,       t1,  lc} ;
+Point(8) = {(R+Wd/2), 0.,       t1,  lc} ;
+
+Point(9) = {0.,       0.,  (t1+h0),  lc};
+Point(10)={(R-Wd/2),  0.,  (t1+h0),  lc};
+Point(11)={(R+Wd/2),  0.,  (t1+h0),  lc};
+
+Point(12) = {0.,       0.,     -t2,  lc} ;
+Point(13) = {r,        0.,     -t2,  lc} ;
+Point(14) = {(R-Wd/2), 0.,     -t2,  lc} ;
+Point(15) = {(R+Wd/2), 0.,     -t2,  lc} ;
+
+Line(1) = {2,3} ;
+Line(2) = {3,4} ;
+Line(3) = {6,7} ;
+Line(4) = {7,8} ; 
+Line(5) = {10,11} ;
+
+Line(6) = {13,14} ;
+Line(7) = {14,15} ;
+Line(8) = {2,6} ;
+Line(9) = {3,7} ;
+Line(10) = {4,8} ;
+Line(11) = {7,10} ;
+Line(12) = {8,11} ;
+Line(13) = {13,2} ;
+Line(14) = {14,3} ;
+Line(15) = {15,4} ;
+
+Line Loop(1) = {3,-9,-1,8}; //surface centrale
+Plane Surface(2) = {1};
+Line Loop(3) = {4,-10,-2,9};
+Plane Surface(4) = {3};
+Line Loop(5) = {5,-12,-4,11};
+Plane Surface(6) = {5};
+Line Loop(7) = {1,-14,-6,13};
+Plane Surface(8) = {7};
+Line Loop(9) = {2,-15,-7,14};
+Plane Surface(10) = {9};
+
+// 1st gap
+
+Extrude Surface {2, {0,0,1}, {0,0,0}, Pi/180}{  
+Recombine ; Layers { {1}, {9000+100}, {1} } ;
+};
+Extrude Surface {4, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9004+100}, {1} } ;
+};
+Extrude Surface {6, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9008+100}, {1} } ;
+};
+Extrude Surface {8, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9012+100}, {1} } ;
+};
+Extrude Surface {10, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9016+100}, {1} } ;
+};
+
+// 1st piezo
+
+Extrude Surface {37, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{                     
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9000,9000,9000,9000,9000,9000,9000 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {59, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9004,9004,9004,9004,9004,9004,9004 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {81, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9008,9008,9008,9008,9008,9008,9008},{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {103, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9012,9012,9012,9012,9012,9012,9012 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {125, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9016,9016,9016,9016,9016,9016,9016 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+
+// 2nd gap
+
+Extrude Surface {147, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9001+200}, {1} } ;
+};
+Extrude Surface {169, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9005+200}, {1} } ;
+};
+Extrude Surface {191, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9009+200}, {1} } ;
+};
+Extrude Surface {213, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9013+200}, {1} } ;
+};
+Extrude Surface {235, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9017+200}, {1} } ;
+};
+
+// 2nd pizeo
+
+Extrude Surface {257, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9001,9001,9001,9001,9001,9001,9001,9001}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9005, 9005,9005,9005, 9005,9005,9005}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9009, 9009,9009,9009, 9009,9009,9009}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {323, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9013, 9013,9013,9013, 9013,9013,9013}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9017, 9017,9017,9017, 9017,9017,9017}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+// 3rd gap
+
+Extrude Surface {257+110, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9002+300}, {1} } ;
+};
+Extrude Surface {279+110, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9006+300}, {1} } ;
+};
+Extrude Surface {301+110, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9010+300}, {1} } ;
+};
+Extrude Surface {323+110, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9014+300}, {1} } ;
+};
+Extrude Surface {345+110, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9018+300}, {1} } ;
+};
+
+// 3rd piezo
+
+Extrude Surface {257+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9002, 9002,9002,9002, 9002,9002,9002 }, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9006, 9006,9006,9006, 9006,9006,9006}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9010, 9010,9010,9010, 9010,9010,9010}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {323+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9014, 9014,9014,9014, 9014,9014,9014}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9018, 9018,9018,9018, 9018,9018,9018}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+// 4th gap
+
+Extrude Surface {257+330, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9003+400}, {1} } ;
+};
+Extrude Surface {279+330, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9007+400}, {1} } ;
+};
+Extrude Surface {301+330, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9011+400}, {1} } ;
+};
+Extrude Surface {323+330, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9015+400}, {1} } ;
+};
+Extrude Surface {345+330, {0,0,1}, {0,0,0}, Pi/180}{
+Recombine ; Layers { {1}, {9019+400}, {1} } ;
+};
+
+// 4th pizeo
+
+Extrude Surface {257+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1 }, {9003,9003,9003,9003,9003,9003,9003},{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9007,9007,9007,9007,9007,9007,9007}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9011,9011,9011,9011,9011,9011,9011}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1}} ;
+};
+Extrude Surface {323+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9015,9015,9015,9015,9015,9015,9015}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+Recombine ; Layers { {1,1,1,nArc,1,1,1}, {9019,9019,9019,9019,9019,9019,9019}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+
+PZTA = 1000;
+PZTB = 1500;
+
+Stator = 2000; 
+
+Electrode1 = 1001;
+Electrode2 = 1002;
+Electrode3 = 1003;
+Electrode4 = 1004;
+Electrode_Upper1 = 1005;
+Electrode_Upper2 = 1006;
+Electrode_Upper3 = 1007;
+Electrode_Upper4 = 1008;
+
+Inner_Cylinder = 1009;
+
+Point99 =  1010;
+Point101 = 1011;
+Cover = 1012;
+
+
+Physical Volume (PZTA) = {9012,9013,9016,9017  , 9012+100,9013+200,9016+100,9017+200 } ;
+Physical Volume (PZTB) = {9014,9015,9018,9019  , 9014+300,9015+400,9018+300,9019+400 } ;
+
+Physical Volume (Stator) = {9000,9001,9002,9003, 9004,9005,9006,9007, 9008,9009,9010,9011,
+                             9000+100,9001+200,9002+300,9003+400,
+                             9004+100,9005+200,9006+300,9007+400,     
+			     9008+100,9009+200,9010+300,9011+400  } ; 
+
+Physical Surface (Electrode1)       = {208,230} ;
+Physical Surface (Electrode2)       = {428,450} ;
+Physical Surface (Electrode3)       = {648,670} ;
+Physical Surface (Electrode4)       = {861,882} ;
+Physical Surface (Electrode_Upper1) = {142,164} ;
+Physical Surface (Electrode_Upper2) = {362,384} ; 
+Physical Surface (Electrode_Upper3) = {582,604} ;
+Physical Surface (Electrode_Upper4) = {802,823} ;
+Physical Surface (Inner_Cylinder)   = {36,146,256,366, 476,586,696,806, 102,212,322,432,542,652,762,865} ;
+
+Physical Point (Point99) = {201};
+Physical Point (Point101) = {203};
diff --git a/benchmarks/3d/stator-newxtr.geo b/benchmarks/3d/stator-newxtr.geo
new file mode 100644
index 0000000000..fd7f5c85e6
--- /dev/null
+++ b/benchmarks/3d/stator-newxtr.geo
@@ -0,0 +1,249 @@
+lc =0.001;
+s=1;
+
+h0 = 2.0e-3; //3.e-3;
+t1 = 1.0e-3; //3.9e-3;
+t2 = 1.0e-3;
+Wd = 6.e-3;
+R = 27.5e-3;
+r = 14.0e-3;
+
+nArc = 15;
+nSeg1 =2 ; // Side of Stator and Tooth (Vertical)
+nSeg2 =2 ; // Piezo
+nSeg3 =6;//5 ; // Long radius 
+nSeg4 =4;//3 ; // Wd
+
+Point(1) = {0.,       0.,       0.,  lc} ;
+Point(2) = {r,        0.,       0.,  lc} ;
+Point(3) = {(R-Wd/2), 0.,       0.,  lc} ; 
+Point(4) = {(R+Wd/2), 0.,       0.,  lc} ;
+
+Point(5) = {0.,       0.,       t1,  lc} ;
+Point(6) = {r,        0.,       t1,  lc} ;
+Point(7) = {(R-Wd/2), 0.,       t1,  lc} ;
+Point(8) = {(R+Wd/2), 0.,       t1,  lc} ;
+
+Point(9) = {0.,       0.,  (t1+h0),  lc};
+Point(10)={(R-Wd/2),  0.,  (t1+h0),  lc};
+Point(11)={(R+Wd/2),  0.,  (t1+h0),  lc};
+
+Point(12) = {0.,       0.,     -t2,  lc} ;
+Point(13) = {r,        0.,     -t2,  lc} ;
+Point(14) = {(R-Wd/2), 0.,     -t2,  lc} ;
+Point(15) = {(R+Wd/2), 0.,     -t2,  lc} ;
+
+Line(1) = {2,3} ;
+Line(2) = {3,4} ;
+Line(3) = {6,7} ;
+Line(4) = {7,8} ; 
+Line(5) = {10,11} ;
+
+Line(6) = {13,14} ;
+Line(7) = {14,15} ;
+Line(8) = {2,6} ;
+Line(9) = {3,7} ;
+Line(10) = {4,8} ;
+Line(11) = {7,10} ;
+Line(12) = {8,11} ;
+Line(13) = {13,2} ;
+Line(14) = {14,3} ;
+Line(15) = {15,4} ;
+
+Line Loop(1) = {3,-9,-1,8}; //surface centrale
+Plane Surface(2) = {1};
+Line Loop(3) = {4,-10,-2,9};
+Plane Surface(4) = {3};
+Line Loop(5) = {5,-12,-4,11};
+Plane Surface(6) = {5};
+Line Loop(7) = {1,-14,-6,13};
+Plane Surface(8) = {7};
+Line Loop(9) = {2,-15,-7,14};
+Plane Surface(10) = {9};
+
+// 1st gap
+
+Extrude Surface {2, {0,0,1}, {0,0,0}, Pi/180}{  
+ Layers { {1}, {9000+100}, {1} } ;
+};
+Extrude Surface {4, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9004+100}, {1} } ;
+};
+Extrude Surface {6, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9008+100}, {1} } ;
+};
+Extrude Surface {8, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9012+100}, {1} } ;
+};
+Extrude Surface {10, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9016+100}, {1} } ;
+};
+
+// 1st piezo
+
+Extrude Surface {37, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{                     
+ Layers { {1,1,1,nArc,1,1,1}, {9000,9000,9000,9000,9000,9000,9000 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {59, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9004,9004,9004,9004,9004,9004,9004 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {81, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9008,9008,9008,9008,9008,9008,9008},{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {103, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9012,9012,9012,9012,9012,9012,9012 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+Extrude Surface {125, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9016,9016,9016,9016,9016,9016,9016 },{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1 } } ;
+};
+
+// 2nd gap
+
+Extrude Surface {147, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9001+200}, {1} } ;
+};
+Extrude Surface {169, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9005+200}, {1} } ;
+};
+Extrude Surface {191, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9009+200}, {1} } ;
+};
+Extrude Surface {213, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9013+200}, {1} } ;
+};
+Extrude Surface {235, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9017+200}, {1} } ;
+};
+
+// 2nd pizeo
+
+Extrude Surface {257, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9001,9001,9001,9001,9001,9001,9001,9001}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9005, 9005,9005,9005, 9005,9005,9005}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9009, 9009,9009,9009, 9009,9009,9009}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {323, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9013, 9013,9013,9013, 9013,9013,9013}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9017, 9017,9017,9017, 9017,9017,9017}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+// 3rd gap
+
+Extrude Surface {257+110, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9002+300}, {1} } ;
+};
+Extrude Surface {279+110, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9006+300}, {1} } ;
+};
+Extrude Surface {301+110, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9010+300}, {1} } ;
+};
+Extrude Surface {323+110, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9014+300}, {1} } ;
+};
+Extrude Surface {345+110, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9018+300}, {1} } ;
+};
+
+// 3rd piezo
+
+Extrude Surface {257+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9002, 9002,9002,9002, 9002,9002,9002 }, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9006, 9006,9006,9006, 9006,9006,9006}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9010, 9010,9010,9010, 9010,9010,9010}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {323+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9014, 9014,9014,9014, 9014,9014,9014}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345+220, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9018, 9018,9018,9018, 9018,9018,9018}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+// 4th gap
+
+Extrude Surface {257+330, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9003+400}, {1} } ;
+};
+Extrude Surface {279+330, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9007+400}, {1} } ;
+};
+Extrude Surface {301+330, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9011+400}, {1} } ;
+};
+Extrude Surface {323+330, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9015+400}, {1} } ;
+};
+Extrude Surface {345+330, {0,0,1}, {0,0,0}, Pi/180}{
+ Layers { {1}, {9019+400}, {1} } ;
+};
+
+// 4th pizeo
+
+Extrude Surface {257+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1 }, {9003,9003,9003,9003,9003,9003,9003},{0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {279+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9007,9007,9007,9007,9007,9007,9007}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {301+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9011,9011,9011,9011,9011,9011,9011}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1}} ;
+};
+Extrude Surface {323+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9015,9015,9015,9015,9015,9015,9015}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+Extrude Surface {345+440, {0,0,1}, {0,0,0}, Pi/2-Pi/180}{
+ Layers { {1,1,1,nArc,1,1,1}, {9019,9019,9019,9019,9019,9019,9019}, {0.02, 0.05, 0.09, 0.91, 0.95, 0.98, 1} } ;
+};
+
+
+PZTA = 1000;
+PZTB = 1500;
+
+Stator = 2000; 
+
+Electrode1 = 1001;
+Electrode2 = 1002;
+Electrode3 = 1003;
+Electrode4 = 1004;
+Electrode_Upper1 = 1005;
+Electrode_Upper2 = 1006;
+Electrode_Upper3 = 1007;
+Electrode_Upper4 = 1008;
+
+Inner_Cylinder = 1009;
+
+Point99 =  1010;
+Point101 = 1011;
+Cover = 1012;
+
+
+Physical Volume (PZTA) = {9012,9013,9016,9017  , 9012+100,9013+200,9016+100,9017+200 } ;
+Physical Volume (PZTB) = {9014,9015,9018,9019  , 9014+300,9015+400,9018+300,9019+400 } ;
+
+Physical Volume (Stator) = {9000,9001,9002,9003, 9004,9005,9006,9007, 9008,9009,9010,9011,
+                             9000+100,9001+200,9002+300,9003+400,
+                             9004+100,9005+200,9006+300,9007+400,     
+			     9008+100,9009+200,9010+300,9011+400  } ; 
+
+Physical Surface (Electrode1)       = {208,230} ;
+Physical Surface (Electrode2)       = {428,450} ;
+Physical Surface (Electrode3)       = {648,670} ;
+Physical Surface (Electrode4)       = {861,882} ;
+Physical Surface (Electrode_Upper1) = {142,164} ;
+Physical Surface (Electrode_Upper2) = {362,384} ; 
+Physical Surface (Electrode_Upper3) = {582,604} ;
+Physical Surface (Electrode_Upper4) = {802,823} ;
+Physical Surface (Inner_Cylinder)   = {36,146,256,366, 476,586,696,806, 102,212,322,432,542,652,762,865} ;
+
+Physical Point (Point99) = {201};
+Physical Point (Point101) = {203};
diff --git a/benchmarks/3d/stator-oldxtr.geo b/benchmarks/3d/stator-oldxtr.geo
new file mode 100644
index 0000000000..cd09d1bdf3
--- /dev/null
+++ b/benchmarks/3d/stator-oldxtr.geo
@@ -0,0 +1,238 @@
+
+r = 7.0e-3;
+Wd = 2.e-3;
+r0 = 3.0e-3;
+
+nbr_tooth = 64;
+teta_tooth = 0.0520881;
+
+nbr_gap = 4;
+teta_gap = Pi/180/2;
+
+lcext =r*teta_tooth;
+lcint =0.0008;
+
+Point(1) = {0, 0, 0, lcext };
+
+p=0; lt=0;
+For i In {0:nbr_tooth-1}
+  t = i*2*Pi/nbr_tooth + 2*Pi/nbr_tooth/2 ;
+  p1 = newp; 
+  Point(p1) = {r*Cos(t-teta_tooth/2) , r*Sin(t-teta_tooth/2) , 0 , lcext };
+  p2 = newp; points[p] = p2; p++;
+  Point(p2) = {(r+Wd)*Cos(t-teta_tooth/2) , (r+Wd)*Sin(t-teta_tooth/2) , 0 , lcext };
+  p3 = newp;
+  Point(p3) = {r*Cos(t+teta_tooth/2) , r*Sin(t+teta_tooth/2) , 0 , lcext };
+  p4 = newp; points[p] = p4; p++;
+  Point(p4) = {(r+Wd)*Cos(t+teta_tooth/2) , (r+Wd)*Sin(t+teta_tooth/2) , 0 , lcext };
+  l1 = newreg; Line(l1) = {p2,p1};
+  l2 = newreg; Line(l2) = {p3,p4};
+  l3 = newreg; Circle(l3) = {p1,1,p3};
+  l4 = newreg; Circle(l4) = {p2,1,p4};
+  s1 = newreg; Line Loop(s1) = {-l1,-l2,-l3,l4};
+  Plane Surface(s1+1) = {s1};
+  surftooth[i] = s1+1;
+  looptooth[lt] = l1; lt++;
+  looptooth[lt] = l2; lt++;
+  looptooth[lt] = l3; lt++;
+EndFor
+points[p] = points[0];
+
+g=0; g0=0;
+For i In {0:nbr_gap-1}
+  t = i*2*Pi/nbr_gap;
+  p1 = newp; gap[g] = p1; g++;
+  Point(p1) = {(r+Wd)*Cos(t-teta_gap/2) , (r+Wd)*Sin(t-teta_gap/2) , 0 , lcext };
+  p2 = newp; gap[g] = p2; g++;
+  Point(p2) = {(r+Wd)*Cos(t+teta_gap/2) , (r+Wd)*Sin(t+teta_gap/2) , 0 , lcext };
+
+  p3 = newp; gap0[g0] = p3; g0++;
+  Point(p3) = {r0*Cos(t-teta_gap/2) , r0*Sin(t-teta_gap/2) , 0 , lcint };
+  p4 = newp; gap0[g0] = p4; g0++;
+  Point(p4) = {r0*Cos(t+teta_gap/2) , r0*Sin(t+teta_gap/2) , 0 , lcint };
+EndFor
+gap0[g0]=gap0[0];
+gap[g]=gap[0];
+
+j=1; g=0; le=0; lge=0;
+For i In {1:p-2:2}
+  If( Modulo(j,nbr_tooth/nbr_gap) )
+    loopext[le] = newreg;
+    Circle(loopext[le]) = {points[i],1,points[i+1]};
+    le++;
+  EndIf
+  If( !Modulo(j,nbr_tooth/nbr_gap) )
+    loopgapext[lge] = newreg;    
+    Circle(loopgapext[lge]) = {gap[g],1,gap[g+1]};
+    lge++;
+
+    Printf("ii=%g", i);
+    loopext[le] = newreg;
+    Circle(loopext[le]) = {gap[g+1], 1, points[i-(2*nbr_tooth/nbr_gap-1)]};
+    le++;
+
+    loopext[le] = newreg;
+    Circle(loopext[le]) = {points[i], 1, gap[g+2]};
+    le++;
+
+    g+=2;
+  EndIf
+
+  j++;
+EndFor
+loopext[le] = loopext[0];
+
+
+li=0; lgi=0; lg=0;
+For i In {0:g0-2:2}
+
+  loopgapint[lgi] = newreg;
+  Circle(loopgapint[lgi]) = {gap0[i],1,gap0[i+1]};
+  lgi++;
+
+  loopgap[lg] = newreg;
+  Line(loopgap[lg]) = {gap[i], gap0[i]};
+  lg++;
+  loopgap[lg] = newreg;
+  Line(loopgap[lg]) = {gap0[i+1] , gap[i+1]};
+  lg++;
+
+
+  loopint[li] = newreg;
+  Circle(loopint[li]) = {gap0[i+1],1,gap0[i+2]};
+  li++;
+
+EndFor
+loopgap[lg] = loopgap[0];
+
+i_looptooth = 0;
+i_loopext = 0;
+
+
+
+For i In {1:nbr_gap}
+
+  l1 = loopgap[2*i-1];
+  l2 = loopgap[2*i];
+
+  For j In {i_looptooth : i_looptooth+nbr_tooth*3/nbr_gap-1}
+    Printf("tooth=%g", looptooth[j]);
+  EndFor
+  For j In {i_loopext : i_loopext+nbr_tooth/nbr_gap+1-1}
+    Printf("ext=%g", loopext[j]);
+  EndFor
+  Printf("int=%g", loopint[i-1]);
+  Printf("gap=%g,%g", l1, l2);
+
+  ll = newreg;
+  Line Loop(ll) = {
+    looptooth[{i_looptooth : i_looptooth+nbr_tooth*3/nbr_gap-1}] ,
+    loopext[{i_loopext : i_loopext+nbr_tooth/nbr_gap+1-1}] ,
+    -loopint[i-1],
+    l1, l2
+  };
+  Plane Surface(ll+1) = ll;
+  surfair[i-1] = ll+1;
+
+  ll = newreg;
+  Line Loop(ll) = { 
+    -loopgap[2*i-2],
+    -loopgap[2*i-1],
+    -loopgapint[i-1],
+    loopgapext[i-1]
+  };
+  Plane Surface(ll+1) = ll;
+  surfgap[i-1] = ll+1;
+ 
+  i_looptooth += nbr_tooth*3/nbr_gap;
+  i_loopext += nbr_tooth/nbr_gap+1;
+
+EndFor
+
+// Old extrusion mesh generator: gmsh -extrude < newstator.par
+//
+//
+// All geometrical entities are automatically numbered:
+//
+//         volumes: V_ + layer * N_ + surf->num
+// New XY surfaces: S_ + layer * N_ + surf->num
+//  perp. surfaces: L_ + layer * N_ + curve->num
+//     perp. lines: P_ + layer * N_ + point->Num
+
+L_ = 100e6 ;
+S_ = 200e6 ;
+V_ = 300e6 ;
+P_ = 400e6 ;
+N_ = 1e6 ;
+
+// Volumes: 
+
+For i In {0:nbr_tooth-1}
+  toothvol1[i] = V_ + 1*N_ + surftooth[i] ;
+  toothvol2[i] = V_ + 2*N_ + surftooth[i] ;
+  toothvol3[i] = V_ + 3*N_ + surftooth[i] ;
+EndFor
+For i In {0:nbr_gap-1}
+  corpsvol1[i] = V_ + 1*N_ + surfair[i];
+  corpsvol2[i] = V_ + 2*N_ + surfair[i];
+  corpsvol3[i] = V_ + 3*N_ + surfair[i];
+  gapvol1[i] = V_ + 1*N_ + surfgap[i];
+  gapvol2[i] = V_ + 2*N_ + surfgap[i];
+  gapvol3[i] = V_ + 3*N_ + surfgap[i];
+EndFor
+
+// 1, 2, 3, ... -> volmumes piezo
+ii = 0;
+For i In {1:nbr_gap}
+  Physical Volume(i) = { toothvol1[{ii:(ii+nbr_tooth/nbr_gap-1)}], corpsvol1[i-1], gapvol1[i-1] };
+  ii += nbr_tooth/nbr_gap;
+EndFor
+
+// 100 -> volume metal
+Physical Volume(100) = { 
+  toothvol2[{0:nbr_tooth-1}],
+  toothvol3[{0:nbr_tooth-1}],
+  corpsvol2[{0:nbr_gap-1}],
+  gapvol2[{0:nbr_gap-1}]
+};
+
+// Surfaces
+
+For i In {0:nbr_tooth-1}
+  toothsur0[i] = surftooth[i] ;
+  toothsur1[i] = S_ + 1*N_ + surftooth[i] ;
+EndFor
+For i In {0:nbr_gap-1}
+  corpssur0[i] = surfair[i];
+  corpssur1[i] = S_ + 1*N_ + surfair[i];
+  gapsur1[i] = S_ + 1*N_ + surfgap[i];
+EndFor
+
+// 1000 -> surface plan de masse
+Physical Surface(1000) = { toothsur1[] , corpssur1[] , gapsur1[] };
+
+// 1001, 1002, ... -> surfaces electrodes
+ii = 0;
+For i In {1:nbr_gap}
+  Physical Surface(1000+i) = { 
+     toothsur0[{ii:(ii+nbr_tooth/nbr_gap-1)}], 
+     corpssur0[i-1] 
+  };
+  ii += nbr_tooth/nbr_gap;
+EndFor
+
+j=0;
+For i In {0:nbr_gap-1}
+  cylint1[j] = L_ + 1*N_ + loopint[i]; 
+  cylint1[j+1] = L_ + 1*N_ + loopgapint[i];
+  cylint2[j] = L_ + 2*N_ + loopint[i];
+  cylint2[j+1] = L_ + 2*N_ + loopgapint[i];
+  j+=2;
+EndFor  
+
+// 1100 -> surface cylindre interieur
+Physical Surface(1100) = {
+  cylint1[],
+  cylint2[]
+};
+
diff --git a/benchmarks/3d/stator-oldxtr.par b/benchmarks/3d/stator-oldxtr.par
new file mode 100644
index 0000000000..8211aee2dc
--- /dev/null
+++ b/benchmarks/3d/stator-oldxtr.par
@@ -0,0 +1,10 @@
+3
+1
+0.001
+1
+1
+0.001
+1
+1
+0.001
+1
-- 
GitLab