/[escript]/trunk/finley/test/python/brick.py
ViewVC logotype

Annotation of /trunk/finley/test/python/brick.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 934 - (hide annotations)
Tue Jan 23 09:52:45 2007 UTC (13 years, 2 months ago) by gross
File MIME type: text/x-python
File size: 1244 byte(s)
gmsh file reader for finley
1 gross 934 # $Id$
2    
3     __copyright__=""" Copyright (c) 2006, 2007 by ACcESS MNRF
4     http://www.access.edu.au
5     Primary Business: Queensland, Australia"""
6     __license__="""Licensed under the Open Software License version 3.0
7     http://www.opensource.org/licenses/osl-3.0.php"""
8    
9     from esys.escript import *
10     from esys.pycad import *
11     from esys.pycad.gmsh import Design
12     from esys.finley import MakeDomain
13    
14    
15     p0=Point(0.,0.,0.)
16     p1=Point(1.,0.,0.)
17     p2=Point(0.,1.,0.)
18     p3=Point(1.,1.,0.)
19     p4=Point(0.,0.,1.)
20     p5=Point(1.,0.,1.)
21     p6=Point(0.,1.,1.)
22     p7=Point(1.,1.,1.)
23    
24     l01=Line(p0,p1)
25     l13=Line(p1,p3)
26     l32=Line(p3,p2)
27     l20=Line(p2,p0)
28    
29     l45=Line(p4,p5)
30     l57=Line(p5,p7)
31     l76=Line(p7,p6)
32     l64=Line(p6,p4)
33    
34     l15=Line(p1,p5)
35     l40=Line(p4,p0)
36     l37=Line(p3,p7)
37     l62=Line(p6,p2)
38    
39     bottom=PlaneSurface(-CurveLoop(l01,l13,l32,l20))
40     top=PlaneSurface(CurveLoop(l45,l57,l76,l64))
41     front=PlaneSurface(CurveLoop(l01,l15,-l45,l40))
42     back=PlaneSurface(CurveLoop(l32,-l62,-l76,-l37))
43     left=PlaneSurface(CurveLoop(-l40,-l64,l62,l20))
44     right=PlaneSurface(CurveLoop(-l15,l13,l37,-l57))
45     v=Volume(SurfaceLoop(top,bottom,front,back,left,right))
46     des=Design(dim=3, order=2, element_size = 1, keep_files=True)
47     des.addItems(v)
48    
49     dom=MakeDomain(des)
50     dom.write("brick.fly")
51    
52    
53    

  ViewVC Help
Powered by ViewVC 1.1.26