~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to nfem/ptst/my_cube_TPH_gmsh.mshcad

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  gmsh -3 my_cube_TPH_gmsh.mshcad -o my_cube_TPH-10.msh
 
2
//  ../pbin/msh2geo < my_cube_TPH-10.msh | ../pbin/geo -upgrade -geo - > my_cube_TPH-10.geo
 
3
//  Omega = ]a,b[x]c,d[x]f,g[
 
4
    n = 5;
 
5
    a = 0; c = 0; f = 0;
 
6
    b = 1; d = 1; g = 1;
 
7
    hloc = 1.0/n;
 
8
    cd = (c+d)/2.0;
 
9
    fg = (f+g)/2.0;
 
10
    Point(1) = {a, c,  f,  hloc};
 
11
    Point(2) = {b, c,  f,  hloc};
 
12
    Point(3) = {b, cd, f,  hloc};
 
13
    Point(4) = {a, cd, f,  hloc};
 
14
    Point(5) = {a, c,  fg, hloc};
 
15
    Point(6) = {b, c,  fg, hloc};
 
16
    Point(7) = {b, cd, fg, hloc};
 
17
    Point(8) = {a, cd, fg, hloc};
 
18
    Line(1) = {1,2};
 
19
    Line(2) = {2,3};
 
20
    Line(3) = {3,4};
 
21
    Line(4) = {4,1};
 
22
    Line(5) = {5,6};
 
23
    Line(6) = {6,7};
 
24
    Line(7) = {7,8};
 
25
    Line(8) = {8,5};
 
26
    Line(9)  = {1,5};
 
27
    Line(10) = {2,6};
 
28
    Line(11) = {3,7};
 
29
    Line(12) = {4,8};
 
30
    Mesh.Algorithm = 1;
 
31
    Line Loop(21) = {-1,-4,-3,-2};
 
32
    Plane Surface(31) = {21} ;
 
33
    Line Loop(22) = {5,6,7,8};
 
34
    Plane Surface(32) = {22} ;
 
35
    Line Loop(23) = {1,10,-5,-9};
 
36
    Plane Surface(33) = {23} ;
 
37
    Line Loop(24) = {12,-7,-11,3};
 
38
    Plane Surface(34) = {24} ;
 
39
    Line Loop(25) = {2,11,-6,-10};
 
40
    Plane Surface(35) = {25} ;
 
41
    Line Loop(26) = {9,-8,-12,4};
 
42
    Plane Surface(36) = {26} ;
 
43
    Surface Loop(41) = {31,32,33,34,35,36};
 
44
    Volume(51) = {41}; // lower part: T
 
45
    extr_y[] = Extrude{0,(d-c)/2,0}{ Surface{34}; Layers{n/2}; Recombine;}; // left  part: P
 
46
    extr_z[] = Extrude{0,0,(g-f)/2}{ Surface{32,extr_y[3]}; Layers{n/2}; Recombine;}; // upper part: P+H
 
47
    Physical Surface("boundary") = {31, extr_y[5], extr_z[0], extr_z[6],
 
48
                                33,extr_z[2], 35, extr_y[4], extr_z[3], extr_z[9],
 
49
                                extr_y[0],extr_z[10], 36, extr_y[2], extr_z[5], extr_z[11]};
 
50
    Physical Surface("bottom") = {31, extr_y[5]};
 
51
    Physical Surface("top")   = {extr_z[0], extr_z[6]};
 
52
    Physical Surface("left")  = {33,extr_z[2]};
 
53
    Physical Surface("front") = {35, extr_y[4], extr_z[3], extr_z[9]};
 
54
    Physical Surface("right")  = {extr_y[0],extr_z[10]};
 
55
    Physical Surface("back")  = {36, extr_y[2], extr_z[5], extr_z[11]};
 
56
    Physical Volume("internal") = {51,extr_y[1],extr_z[1],extr_z[7]};