Skip to content
Snippets Groups Projects
Commit 53006c2c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

removed all examples -> redistributed in benchmarks

parent 8fb1d9ed
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 2667 deletions
// this tests that we can still load as many views as we want.
// (even if only 200 are allowed in the GUI)
For i In {0:250}
Include "../tutorial/view1.pos" ;
Include "../tutorial/view2.pos" ;
EndFor
Point(1) = {0.0,0.0,0.0,.1};
Point(2) = {1,0.0,0.0,.1};
Point(3) = {1,1,0.0,.1};
Point(4) = {.5,.5,1,.1};
Point(5) = {1.2,.3,-.2,.1};
Point(6) = {.5,0,.2,.1};
Spline(1) = {1,4,3};
Spline(2) = {3,5,2};
Spline(3) = {2,6,1};
Line Loop(4) = {2,3,1};
Ruled Surface(5) = {4};
General.Trackball = 0;
General.Rotation0 = 0 ;
General.Color.Background = White ;
General.Color.ForeGround = Red ;
Post.View[0].IntervalsType = 2 ;
Post.View[0].Raise2 = 0.1 ;
For(1:300)
General.Rotation0 += 10 ;
General.Rotation1 = General.Rotation0 / 3 ;
Post.View[0].TimeStep +=
(Post.View[0].TimeStep < Post.View[0].NbTimeStep-1) ? 1 : 0 ;
Post.View[0].Raise2 -= .01 ;
Sleep 0.1;
Draw;
EndFor
la = .05;
la2 = .03;
Point(newp) = {0,0,0,la}; /* Point 1 */
Point(newp) = {-1,0,0,la}; /* Point 2 */
Point(newp) = {1,0,0,la}; /* Point 3 */
Point(newp) = {1.1,0,0,la}; /* Point 4 */
Point(newp) = {-1.1,0,0,la}; /* Point 5 */
Circle(2) = {4,1,5};
Circle(3) = {3,1,2};
Point(newp) = {-.2,.4,0,la}; /* Point 6 */
Point(newp) = {-.2,.4,0,la}; /* Point 7 */
Point(newp) = {.2,.4,0,la}; /* Point 8 */
Point(newp) = {.6,.4,0,la}; /* Point 9 */
Point(newp) = {-.6,.4,0,la2}; /* Point 10 */
Point(newp) = {-.65,.4,0,la2}; /* Point 11 */
Point(newp) = {-.55,.4,0,la2}; /* Point 12 */
Point(newp) = {-.25,.4,0,la2}; /* Point 13 */
Point(newp) = {-.15,.4,0,la2}; /* Point 14 */
Point(newp) = {.15,.4,0,la2}; /* Point 15 */
Point(newp) = {.25,.4,0,la2}; /* Point 16 */
Point(newp) = {.55,.4,0,la2}; /* Point 17 */
Point(newp) = {.65,.4,0,la2}; /* Point 18 */
Circle(4) = {18,9,17};
Circle(5) = {17,9,18};
Circle(6) = {16,8,15};
Circle(7) = {15,8,16};
Circle(8) = {14,7,13};
Circle(9) = {13,7,14};
Circle(10) = {12,10,11};
Circle(11) = {11,10,12};
Line(12) = {5,2};
Line(13) = {2,3};
Line(14) = {3,4};
Loop(15) = {-12,-2,-14,3};
Plane Surface(16) = {15};
Loop(17) = {3,13};
Loop(18) = {10,11};
Loop(19) = {8,9};
Loop(20) = {6,7};
Loop(21) = {4,5};
Plane Surface(22) = {17,18,19,20,21};
Transfinite Line{12,14} = 7 Using Progression 0.9;
Transfinite Line{2,3} = 40;
Transfinite Surface{16} = {5,2,3,4};
Recombine Surface{16};
Point(1) = {0,0,0,1.0};
Point(2) = {1,0,0,1.0};
Point(3) = {.5,1,0,1.0};
Point(4) = {.75,.5,0,1.0};
Line(1) = {2,1};
Line(2) = {1,3};
Line(3) = {3,4};
Line(4) = {4,2};
Line Loop(5) = {1,2,3,4};
Ruled Surface(6) = {5};
Point(5) = {1,1,0.0,1.0};
Point(6) = {1,.5,0.0,1.0};
Line(7) = {3,5};
Line(8) = {5,6};
Line(9) = {6,4};
Line Loop(10) = {-3,7,8,9};
Ruled Surface(11) = {10};
Transfinite Line {2,4} = 5;
Transfinite Line {3,1,8} = 10;
Transfinite Line {7,9} = 10;
Transfinite Surface {6} = {1,2,4,3};
Transfinite Surface {11} = {4,6,5,3};
Recombine Surface {6,11};
Point(newp) = {0,0,0,0.1}; /* Point 1 */
Point(newp) = {1,0,0,0.1}; /* Point 2 */
Point(newp) = {-1,0,0,0.1}; /* Point 3 */
Point(newp) = {0,.8,0,0.1}; /* Point 4 */
Point(newp) = {0,0,.8,0.1}; /* Point 5 */
Point(newp) = {0,0,-.8,0.1}; /* Point 6 */
Point(newp) = {.1,0,-.79,.1}; /* Point 7 */
Point(newp) = {.3,0,-.73,.1}; /* Point 8 */
Point(newp) = {.65,0,-.55,.1}; /* Point 9 */
Point(newp) = {.9,0,-.38,.1}; /* Point 10 */
Point(newp) = {.1,0,.79,.1}; /* Point 11 */
Point(newp) = {.3,0,.73,.1}; /* Point 12 */
Point(newp) = {.65,0,.55,.1}; /* Point 13 */
Point(newp) = {.9,0,.38,.1}; /* Point 14 */
Spline(1) = {6,7,8,9,10,2};
Circle(2) = {6,1,4};
Circle(3) = {2,1,1,4};
Line Loop(4) = {3,-2,1};
Ruled Surface(5) = {4};
Spline(6) = {5,11,12,13,14,2};
Circle(7) = {5,1,4};
Line Loop(8) = {3,-7,6};
Ruled Surface(9) = {8};
Line(10) = {6,5};
Line Loop(11) = {7,-2,10};
Plane Surface(12) = {11};
Line Loop(13) = {-1,10,6};
Plane Surface(14) = {13};
Surface Loop(15) = {12,9,-5,-14};
Complex Volume(16) = {15};
Point(1) = {0.0,0.0,0.0,.08};
Point(2) = {-.5,0.0,0.0,.08};
Point(3) = {.5,0.0,0.0,.08};
Point(4) = {.5,-.5,0.0,.08};
Point(5) = {-.5,-.5,0.0,.08};
Circle(1) = {3,1,2};
Line(2) = {3,4};
Line(3) = {4,5};
Line(4) = {5,2};
Line Loop(5) = {3,4,-1,2};
Plane Surface(6) = {5};
Extrude(6, {0,0,.5});
Coherence;
Point(newp) = { 0, 0,0,.1};
Point(newp) = {-1, 0,0,.1};
Point(newp) = { 1, 0,0,.1};
Point(newp) = { 0, .5,0,.1};
Point(newp) = { 0,-.5,0,.1};
Point(newp) = { 0, 0,.8,.1};
Point(newp) = { 0, 0,-1,.1};
Ellipsis(1) = {3,1,3,4};
Ellipsis(2) = {4,1,2,2};
Ellipsis(3) = {2,1,2,5};
Ellipsis(4) = {5,1,3,3};
Ellipsis(5) = {7,1,7,4};
Ellipsis(6) = {4,1,6,6};
Ellipsis(7) = {6,1,6,5};
Ellipsis(8) = {5,1,7,7};
Ellipsis(9) = {6,1,3,3};
Ellipsis(10) = {2,1,2,6};
Ellipsis(11) = {7,1,2,2};
Ellipsis(12) = {3,1,3,7};
Line Loop(13) = {1,6,9};
Ruled Surface(14) = {13};
Line Loop(15) = {4,-9,7};
Ruled Surface(16) = {15};
Line Loop(17) = {-7,-10,3};
Ruled Surface(18) = {17};
Line Loop(19) = {3,8,11};
Ruled Surface(20) = {19};
Line Loop(21) = {2,-11,5};
Ruled Surface(22) = {21};
Line Loop(23) = {-5,-12,1};
Ruled Surface(24) = {23};
Line Loop(25) = {-12,-4,8};
Ruled Surface(26) = {25};
Line Loop(27) = {-6,2,10};
Ruled Surface(28) = {27};
// solved by setting the tolerance lower in sys3x3_with_tol (-> again,
// this arised from a wrong mean plane computation)
//lc = 0.00001;
lc = 0.001;
Point(61) = {0.058, -0.005, 0, lc};
Point(62) = {0.058, -0.005, 0.000625, lc};
Point(64) = {0.058625, -0.005, 0, lc};
Point(85) = {0.058, -0.006, 0, lc};
Point(86) = {0.058, -0.006, 0.000625, lc};
Point(88) = {0.058625, -0.006, 0, lc};
Line(1) = {86,62};
Line(2) = {88,64};
Circle(3) = {62,61,64};
Circle(4) = {86,85,88};
Line Loop(5) = {2,-3,-1,4};
Ruled Surface(6) = {5};
la = .1;
lc = .2;
Point(1) = {-1,0,0,lc};
Point(2) = {1,0,0,lc};
Point(3) = {1,0.5,0,lc};
Point(4) = {-1,0.5,0,lc};
Point(5) = {-1.1,0.6,0,lc};
Point(6) = {1.1,0.6,0,lc};
Point(7) = {1.1,0,0,lc};
Point(8) = {-1.1,0,0,lc};
Point(9) = {-.3,0,0,lc};
Point(10) = {.3,0,0,lc};
Point(11) = {.4,0,0,la};
Point(12) = {.2,0,0,la};
Point(13) = {-.2,0,0,la};
Point(14) = {-.4,0,0,la};
Point(15) = {-.3,.1,0,la};
Point(16) = {-.3,-.1,0,la};
Point(17) = {.3,-.1,0,la};
Point(18) = {.3,.1,0,la};
Point(19) = {0,-.5,0,lc};
Point(20) = {2,-.5,0,lc};
Point(21) = {-2,-.5,0,lc};
Point(22) = {0,1.5,0,lc};
Point(23) = {0,1.7,0,lc};
Point(24) = {2.2,-.5,0,lc};
Point(25) = {-2.2,-.5,0,lc};
Line(1) = {8,1};
Line(2) = {1,4};
Line(3) = {4,3};
Line(4) = {3,2};
Line(5) = {2,7};
Line(6) = {7,6};
Line(7) = {6,5};
Line(8) = {5,8};
Circle(9) = {11,10,18};
Circle(10) = {18,10,12};
Circle(11) = {12,10,17};
Circle(12) = {17,10,11};
Circle(13) = {13,9,15};
Circle(14) = {15,9,14};
Circle(15) = {14,9,16};
Circle(16) = {16,9,13};
Circle(17) = {20,19,22};
Circle(18) = {22,19,21};
Line(19) = {21,19};
Line(20) = {20,19};
Line(21) = {20,24};
Line(22) = {21,25};
Circle(23) = {24,19,23};
Circle(24) = {23,19,25};
Line Loop(27) = {19,-20,17,18};
Plane Surface(28) = {27};
l = 2;
Point(1) = {1.0,0.0,0.0,l};
Point(2) = {1.0,1.0,0.0,l};
Point(3) = {0.0,0.0,0.0,l};
Point(4) = {0.0,1.0,0.0,l};
Line(1) = {2,1};
Line(2) = {1,3};
Line(3) = {3,4};
Line(4) = {4,2};
lc = 0.05 ;
lc = 0.1 ;
/* Point 1 */
Point(newp) = {0,0,0,lc};
/* Point 2 */
Point(newp) = {1,0,0,lc};
/* Point 3 */
Point(newp) = {0.5,0,0,lc};
/* Point 4 */
Point(newp) = {0.5,0.5,0,lc};
/* Point 5 */
Point(newp) = {1,0.5,0,lc};
/* Point 6 */
Point(newp) = {1,1,0,lc};
/* Point 7 */
Point(newp) = {0,1,0,lc};
Delete {
Point(2);
}
Line(1) = Liste[3,4];
Line(2) = Liste[4,5];
Line(3) = Liste[5,6];
Line(4) = Liste[6,7];
Line(5) = Liste[7,1];
Line(6) = Liste[1,3];
Loop(7) = {5,6,1,2,3,4};
Plane Surface(8) = {7};
Air = 1111 ;
CL0 = 2222 ;
CL1 = 3333 ;
Physical Volume (Air) = Liste[8] ;
Physical Surface (CL0) = Liste[1,2] ;
Physical Surface (CL1) = Liste[4,5] ;
lcar1 = .2;
Point(newp) = {0.5,0.5,0.5,lcar1}; /* Point 1 */
Point(newp) = {0.5,0.5,0,lcar1}; /* Point 2 */
Point(newp) = {0,0.5,0.5,lcar1}; /* Point 3 */
Point(newp) = {0,0,0.5,lcar1}; /* Point 4 */
Point(newp) = {0.5,0,0.5,lcar1}; /* Point 5 */
Point(newp) = {0.5,0,0,lcar1}; /* Point 6 */
Point(newp) = {0,0.5,0,lcar1}; /* Point 7 */
Point(newp) = {0,1,0,lcar1}; /* Point 8 */
Point(newp) = {1,1,0,lcar1}; /* Point 9 */
Point(newp) = {0,0,1,lcar1}; /* Point 10 */
Point(newp) = {0,1,1,lcar1}; /* Point 11 */
Point(newp) = {1,1,1,lcar1}; /* Point 12 */
Point(newp) = {1,0,1,lcar1}; /* Point 13 */
Point(newp) = {1,0,0,lcar1};
Line(1) = {8,9};
Line(2) = {9,12};
Line(3) = {12,11};
Line(4) = {11,8};
Line(5) = {9,14};
Line(6) = {14,13};
Line(7) = {13,12};
Line(8) = {11,10};
Line(9) = {10,13};
Line(10) = {10,4};
Line(11) = {4,5};
Line(12) = {5,6};
Line(13) = {6,2};
Line(14) = {2,1};
Line(15) = {1,3};
Line(16) = {3,7};
Line(17) = {7,2};
Line(18) = {3,4};
Line(19) = {5,1};
Line(20) = {7,8};
Line(21) = {6,14};
Line Loop(22) = {11,19,15,18};
Plane Surface(23) = {22};
Line Loop(24) = {16,17,14,15};
Plane Surface(25) = {24};
Line Loop(26) = {-17,20,1,5,-21,13};
Plane Surface(27) = {26};
Line Loop(28) = {4,1,2,3};
Plane Surface(29) = {28};
Line Loop(30) = {7,-2,5,6};
Plane Surface(31) = {30};
Line Loop(32) = {6,-9,10,11,12,21};
Plane Surface(33) = {32};
Line Loop(34) = {7,3,8,9};
Plane Surface(35) = {34};
Line Loop(36) = {10,-18,16,20,-4,8};
Plane Surface(37) = {36};
Line Loop(38) = {-14,-13,-12,19};
Plane Surface(39) = {38};
Surface Loop(40) = {35,31,29,37,33,23,39,25,27};
Complex Volume(41) = {40};
This diff is collapsed.
This diff is collapsed.
eps = 1.e-3 ;
Point(1) = {-1,-1,0,.1} ;
Point(2) = {-1,1,0,.1} ;
Point(3) = {1,-1,0,.1} ;
Point(4) = {1,1,0,.1} ;
Point(5) = {-1,0,0,.06} ;
Point(6) = {0,0,0,.03} ;
Point(7) = {-1,0+eps,0,.06} ;
Line(1) = {5,1};
Line(2) = {1,3};
Line(3) = {3,4};
Line(4) = {4,2};
Line(5) = {2,7};
Line(6) = {7,6};
Line(7) = {6,5};
Line Loop(8) = {5,6,7,1,2,3,4};
Plane Surface(9) = {8};
x = 0;
y = 0;
r = 1;
theloop = 0;
Function myCircle
p1 = newp;
Point (p1) = {x,y,0,0.2};
p2 = newp;
Point (p2) = {r+x,y,0,0.2};
p3 = newp;
Point (p3) = {x,r+y,0,0.2};
p4 = newp;
Point (p4) = {-r+x,y,0,0.2};
p5 = newp;
Point (p5) = {x,-r+y,0,0.2};
c1 = newreg;
Circle (c1) = {p2,p1,p3};
c2 = newreg;
Circle (c2) = {p3,p1,p4};
c3 = newreg;
Circle (c3) = {p4,p1,p5};
c4 = newreg;
Circle (c4) = {p5,p1,p2};
theloop = newreg;
Line Loop (theloop) = {c1,c2,c3,c4};
Return
x = 2;
y = 2;
Call myCircle;
/*loop,x,y and r should be parameters*/
loop1 = theloop;
x = -2;
y = 2;
Call myCircle;
loop2 = theloop;
x = 2;
y = -2;
Call myCircle;
loop3 = theloop;
x = -2;
y = -2;
Call myCircle;
loop4 = theloop;
r = 5;
x = 0;
y = 0;
Call myCircle;
loop5 = theloop;
Plane Surface(newreg) = {loop5,loop4,loop3,loop2,loop1};
Line(10000) = {6,11};
Attractor Line {10000} = {1,.03,1};
Mesh.Algorithm = 2 ; // This is the new 2D anisotropic algorithm
h = 0.1;
h2 = 0.031;
Point(1) = { 0.00000E+00, 0.00000E+00, 0.0 , h2};
Point(2) = { 1.00000E-01, 0.00000E+00, 0.0 , h2};
Point(3) = { 0.00000E+00, 4.00000E-01, 0.00000E+00,h2};
Point(4) = { 0.00000E+00, 0.00000E+00, 0.00000E+00,h2};
Point(5) = { 1.00000E-01, 4.00000E-01, 0.00000E+00,h2};
Line(1) = Liste[1,3];
Line(2) = Liste[3,5];
Line(3) = Liste[5,2];
Line(4) = Liste[2,1];
Boucle(5) = Liste[2,3,4,1];
Zone(6) = Liste[5];
AIR = 1 ;
CLD = 2 ;
Physical Volume(AIR) = Liste [-6];
Physical Volume(CLD) = Liste [4];
a = 1;
Printf("a = %g", a);
b[] = {1,2,3};
Printf("b = %g %g %g", b[{0:1}]);
Printf("b[a] = %g", b[a]);
Printf("b[b[0]] = %g", b[b[0]]);
c[{1,2,3}] = {5,6,7} ;
c[0] = 4 ;
Printf("c = %g %g %g %g", c[]);
c[{0:3}] = {-1,-2,-3,-4} ;
Printf("c = %g %g %g %g", c[]);
c[{b[]}] = {8,9,10} ;
Printf("c = %g %g %g %g", c[]);
/*
This is a very simple control sequense
with 2 imbricated loops
*/
For t In {0:1:0.1}
For x In {0:0.5:0.1}
Point(newp) = {t,x,0,.1};
EndFor
EndFor
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment