1 |
|
2 |
######################################################## |
3 |
# |
4 |
# Copyright (c) 2003-2008 by University of Queensland |
5 |
# Earth Systems Science Computational Center (ESSCC) |
6 |
# http://www.uq.edu.au/esscc |
7 |
# |
8 |
# Primary Business: Queensland, Australia |
9 |
# Licensed under the Open Software License version 3.0 |
10 |
# http://www.opensource.org/licenses/osl-3.0.php |
11 |
# |
12 |
######################################################## |
13 |
|
14 |
__copyright__="""Copyright (c) 2003-2008 by University of Queensland |
15 |
Earth Systems Science Computational Center (ESSCC) |
16 |
http://www.uq.edu.au/esscc |
17 |
Primary Business: Queensland, Australia""" |
18 |
__license__="""Licensed under the Open Software License version 3.0 |
19 |
http://www.opensource.org/licenses/osl-3.0.php""" |
20 |
__url__="http://www.uq.edu.au/esscc/escript-finley" |
21 |
|
22 |
""" |
23 |
block with some fualts |
24 |
|
25 |
@var __author__: name of author |
26 |
@var __licence__: licence agreement |
27 |
@var __url__: url entry point on documentation |
28 |
@var __version__: version |
29 |
@var __date__: date of the version |
30 |
""" |
31 |
|
32 |
__author__="Lutz Gross, l.gross@uq.edu.au" |
33 |
|
34 |
from esys.pycad import * |
35 |
from esys.pycad.gmsh import Design |
36 |
from esys.finley import MakeDomain |
37 |
|
38 |
l=100000. # width and length m (without obsorber) |
39 |
h=30000. # width and length m (without obsorber) |
40 |
d_absorber=l*0.10 # thickness of absorbing layer |
41 |
|
42 |
b=Brick(Point(0.,0.,-h),Point(l,l,0.)) |
43 |
p1=Point(l/5,l/5,-2*h/3) |
44 |
p2=p1+[l/5,l/5,0.] |
45 |
p3=p2+[0,0.,h/5] |
46 |
p4=p3+[-l/5,-l/5,0.] |
47 |
l1=Line(p1,p2) |
48 |
l2=Line(p2,p3) |
49 |
l3=Line(p3,p4) |
50 |
l4=Line(p4,p1) |
51 |
c1=CurveLoop(l1,l2,l3,l4) |
52 |
c1.setLocalScale(0.1) |
53 |
q1=Point(2*l/3,2*l/3,-2*h/3,local_scale=0.3) |
54 |
q2=q1+[-l/4,l/4,0.] |
55 |
q3=q2+[0,0.,h/3] |
56 |
q4=q3+[l/4,-l/4,0.] |
57 |
m1=Line(q1,q2) |
58 |
m2=Line(q2,q3) |
59 |
m3=Line(q3,q4) |
60 |
m4=Line(q4,q1) |
61 |
c2=CurveLoop(m1,m2,m3,m4) |
62 |
c2.setLocalScale(0.1) |
63 |
dsgn=Design(element_size=h/5) |
64 |
dsgn.addItems(Volume(SurfaceLoop(*tuple(b.getSurfaces()+[PlaneSurface(c1),PlaneSurface(c2)])))) |
65 |
dsgn.setScriptFileName("faults.geo") |
66 |
dsgn.setMeshFileName("faults.msh") |
67 |
dom=MakeDomain(dsgn,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True) |
68 |
dom.write("faults.fly") |