~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to nfem/ptst/torus_s_gmsh.mshcad

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
R = 1;   // large radius
 
2
r = 0.6; // small radius
 
3
n = 5;  // density of discretisation
 
4
h = 1.0/n;
 
5
n1 = Ceil(2*Pi*r/h);
 
6
n2 = Ceil(2*Pi*R/(3*h));
 
7
Printf("n  = %g", n);
 
8
Printf("n1 = %g", n1);
 
9
Printf("n2 = %g", n2);
 
10
Point(1) = {  R, 0, 0, h};
 
11
Point(2) = {R+r, 0, 0, h};
 
12
Point(3) = {  R, 0, r, h};
 
13
Point(4) = {  R, 0,-r, h};
 
14
Point(5) = {R-r, 0, 0, h};
 
15
Circle(1) = {2,1,3};
 
16
Circle(2) = {3,1,5};
 
17
Circle(3) = {5,1,4};
 
18
Circle(4) = {4,1,2};
 
19
Line Loop(5) = {1,2,3,4};
 
20
Plane Surface(6) = {5};
 
21
third1[]=Extrude {{0,0,1}, {0,0,0}, 2*Pi/3}{Surface{6};         Layers{n2};};
 
22
third2[]=Extrude {{0,0,1}, {0,0,0}, 2*Pi/3}{Surface{third1[0]}; Layers{n2};};
 
23
third3[]=Extrude {{0,0,1}, {0,0,0},-2*Pi/3}{Surface{6};         Layers{n2};};
 
24
Physical Surface("boundary") = {
 
25
 -third1[2],-third1[3],-third1[4],-third1[5],
 
26
 -third2[2],-third2[3],-third2[4],-third2[5],
 
27
  third3[3], third3[4], third3[5], third3[6]
 
28
};