30 |
from numarray import zeros,Float,array,size |
from numarray import zeros,Float,array,size |
31 |
|
|
32 |
#... generate domain ... |
#... generate domain ... |
33 |
ne = 10 |
ne = 18 |
34 |
width = 200000. |
width = 100000. |
35 |
height = 30000. |
height = 30000. |
36 |
|
fstart=numarray.array([width/2.,7.*width/16.,3.*height/8.]) |
37 |
|
fend=numarray.array([width/2.,9.*width/16.,5.*height/8.]) |
38 |
|
|
39 |
def faultL(l0,l1, l2,ne0, ne1, ne2,contact=False,xstart=zeros(3),xend=zeros(3)): |
def faultL(l0,l1, l2,ne0, ne1, ne2,contact=False,xstart=zeros(3),xend=zeros(3)): |
40 |
# if contact = true then there is a fault surface |
# if contact = true then there is a fault surface |
111 |
n0double=int(i0end)-int(i0start) |
n0double=int(i0end)-int(i0start) |
112 |
n1double=int(i1end)-int(i1start) |
n1double=int(i1end)-int(i1start) |
113 |
n2double=int(i2end)-int(i2start) |
n2double=int(i2end)-int(i2start) |
114 |
|
print "fstart = ",[i0start*l0/ne0, i1start*l1/ne1, i2start*l2/ne2] |
115 |
|
print "fend = ", [i0start*l0/ne0, i1start*l1/ne1 + n1double*l1/ne1,i2start*l2/ne2 + n2double*l2/ne2 -height] |
116 |
if (i0start == 0) or (i1start==0) or (i2start==0): |
if (i0start == 0) or (i1start==0) or (i2start==0): |
117 |
raise FaultError1 |
raise FaultError1 |
118 |
|
|
591 |
|
|
592 |
meshfaultL.close() |
meshfaultL.close() |
593 |
|
|
594 |
|
mydomainfile = faultL(width,width, height,ne, ne, ne,contact=True,xstart=fstart,xend=fend) |
595 |
|
|
|
ne_w=int((ne/height)*width+0.5) |
|
|
mydomainfile = faultL(width,width, height,ne_w, ne_w, ne,contact=True,xstart=numarray.array([width/2.,7.*width/16.,3.*height/8.]),xend=numarray.array([width/2.,9.*width/16.,5.*height/8.])) |
|