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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show annotations)
Wed Feb 7 02:12:08 2018 UTC (20 months, 1 week ago) by jfenwick
File MIME type: text/x-python
File size: 1979 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2018 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2003-2018 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Apache License, version 2.0
23 http://www.apache.org/licenses/LICENSE-2.0"""
24 __url__="https://launchpad.net/escript-finley"
25
26 from esys.escript import *
27 from esys.pycad import *
28 from esys.pycad.gmsh import Design
29 from esys.finley import MakeDomain
30
31
32 p0=Point(0.,0.,0.)
33 p1=Point(1.,0.,0.)
34 p2=Point(0.,1.,0.)
35 p3=Point(1.,1.,0.)
36 p4=Point(0.,0.,1.)
37 p5=Point(1.,0.,1.)
38 p6=Point(0.,1.,1.)
39 p7=Point(1.,1.,1.)
40
41 l01=Line(p0,p1)
42 l13=Line(p1,p3)
43 l32=Line(p3,p2)
44 l20=Line(p2,p0)
45
46 l45=Line(p4,p5)
47 l57=Line(p5,p7)
48 l76=Line(p7,p6)
49 l64=Line(p6,p4)
50
51 l15=Line(p1,p5)
52 l40=Line(p4,p0)
53 l37=Line(p3,p7)
54 l62=Line(p6,p2)
55
56 bottom=PlaneSurface(-CurveLoop(l01,l13,l32,l20))
57 top=PlaneSurface(CurveLoop(l45,l57,l76,l64))
58 front=PlaneSurface(CurveLoop(l01,l15,-l45,l40))
59 back=PlaneSurface(CurveLoop(l32,-l62,-l76,-l37))
60 left=PlaneSurface(CurveLoop(-l40,-l64,l62,l20))
61 right=PlaneSurface(CurveLoop(-l15,l13,l37,-l57))
62 v=Volume(SurfaceLoop(top,bottom,front,back,left,right))
63 des=Design(dim=3, order=2, element_size = 1, keep_files=True)
64 des.addItems(PropertySet("V",v), PropertySet("bottom",bottom))
65 des.setScriptFileName("dom.geo")
66 des.setMeshFileName("dom.msh")
67
68 dom=MakeDomain(des)
69 dom.write("brick.fly")
70
71
72

  ViewVC Help
Powered by ViewVC 1.1.26