def setUp(self): self.domain = Rectangle(20, 20, l0=100., l1=100., diracTags=["source"], diracPoints=[(0, 0)]) self.wavelet = Ricker(100.)
def setUp(self): self.domain = Brick(10, 10, 10, l0=100., l1=100., l2=100., diracTags=["source"], diracPoints=[(0, 0, 0)]) self.wavelet = Ricker(100.)
def setUp(self): self.domains = [] for order in range(2, 11): self.domains.append( Brick(order, 4, 4, 4, diracTags=["source"], diracPoints=[(0, 0, 0)])) self.wavelet = Ricker(100.)
def setUp(self): self.domains = [] for order in range(2, 11): self.domains.append( Rectangle(order, 10, 10, l0=100, l1=100, diracTags=["source"], diracPoints=[(0, 0)])) self.wavelet = Ricker(100.)
ne_z, l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags) else: domain = Brick(order, ceil(ne_z * width_x / depth), ceil(ne_z * width_y / depth), ne_z, l0=width_x, l1=width_y, l2=depth, diracPoints=src_locations, diracTags=src_tags) wl = Ricker(frq) m = whereNegative(Function(domain).getX()[DIM - 1] - reflector_at) v_p = v_p_bottom * m + v_p_top * (1 - m) sw = SonicWave(domain, v_p, source_tag=src_tags[0], wavelet=wl, absorption_zone=absorption_zone, lumping=True) locEW = Locator(domain, rcvEW_locations) tracerEW = SimpleSEGYWriter(receiver_group=rgEW, source=src_loc_2D, sampling_interval=sampling_interval) if DIM == 3:
diracPoints=src_locations, diracTags=src_tags, ) else: domain = Brick( order, ceil(ne_z * width_x / depth), ceil(ne_z * width_y / depth), ne_z, l0=width_x, l1=width_y, l2=depth, diracPoints=src_locations, diracTags=src_tags, ) wl = Ricker(frq) # ====================================================================== # m=whereNegative(Function(domain).getX()[DIM-1]-reflector_at) # v_p=v_p_bottom*m+v_p_top*(1-m) v_p = 2 * U.km / U.sec v_s = 0.9 * U.km / U.sec vareps = 0.1 * 0 gamma = 0.15 * 0 delta = 0.05 * 0 rho = 2000 * U.kg / U.m ** 3 src_dir = [0, 0, 1] sw = VTIWave( domain, v_p,
vareps = 0 gamma = 0 rho = 0 for l in range(len(layers)): m = wherePositive(z - z_bottom) * whereNonPositive(z - (z_bottom + layers[l])) v_p = v_p * (1 - m) + v_Ps[l] * m v_s = v_s * (1 - m) + v_Ss[l] * m rho = rho * (1 - m) + rhos[l] * m vareps = vareps * (1 - m) + epss[l] * m gamma = gamma * (1 - m) + gammas[l] * m delta = delta * (1 - m) + deltas[l] * m z_bottom += layers[l] wl = Ricker(frq) dt = min((1. / 5.) * min(inf(domain.getSize() / v_p), inf(domain.getSize() / v_s)), wl.getTimeScale()) sw = HTIWave(domain, v_p, v_s, wl, src_tags[0], source_vector=src_dir, eps=vareps, gamma=gamma, delta=delta, rho=rho, absorption_zone=None,
print("source location = %s m"%(src_locations[0][0],)) print("source orientation = %s"%(src_dir,)) print("matrix lumping = %s"%(lumping,)) print("Layer\tV_p\tV_s\teps\tdelta\ttilt\trho") for i in range(len(layers)): print("%s\t%s\t%s\t%s\t%s\t%s\t%s"%( layers[i], v_P[i], v_S[i], eps[i], delta[i], tilt[i], rho[i])) # # create domain: # order = 5 domain=Rectangle(order, ne_x,ne_z, l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags, d0=getMPISizeWorld()) # # create the wavelet: # wl=Ricker(frq) # #====================================================================== # # set # z=ReducedFunction(domain).getX()[1] z_top=0 V_P=0 V_S=0 Delta=0 Eps=0 Tilt=0 Rho=0 z_top=depth
domain = Rectangle(ne_x, ne_z, l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags) else: domain = Brick(ne_x, ne_x, ne_z, l0=width_x, l1=width_y, l2=depth, diracPoints=src_locations, diracTags=src_tags) wl = Ricker(frq, tcenter) #====================================================================== z = Function(domain).getX()[DIM - 1] z_bottom = 0 v_p = 0 delta = 0 vareps = 0 azmth = 0 rho = 0 for l in range(len(layers)): m = wherePositive(z - z_bottom) * whereNonPositive(z - (z_bottom + layers[l])) v_p = v_p * (1 - m) + v_Ps[l] * m vareps = vareps * (1 - m) + epss[l] * m
ne_z, l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags) else: domain = Brick(order, ceil(ne_z * width_x / depth), ceil(ne_z * width_y / depth), ne_z, l0=width_x, l1=width_y, l2=depth, diracPoints=src_locations, diracTags=src_tags) wl = Ricker(frq) #====================================================================== # m=whereNegative(Function(domain).getX()[DIM-1]-reflector_at) # v_p=v_p_bottom*m+v_p_top*(1-m) v_p = 2 * U.km / U.sec v_s = 0.9 * U.km / U.sec vareps = 0.1 * 0 gamma = 0.15 * 0 delta = 0.05 * 0 rho = 2000 * U.kg / U.m**3 src_dir = [0, 0, 1] sw = VTIWave(domain, v_p, v_s,
# # create domain: # order = 5 domain = Rectangle(order, ne_x, ne_z, l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags, d0=getMPISizeWorld()) # # create the wavelet: # wl = Ricker(frq) # #====================================================================== # # set # z = ReducedFunction(domain).getX()[1] z_top = 0 V_P = 0 V_S = 0 Delta = 0 Eps = 0 Tilt = 0 Rho = 0 z_top = depth
rg.append( ( receiver_line[ix], mid_point) ) # North-south line of receiver if DIM == 3: for iy in range(len(receiver_line)): rcv_locations.append((mid_point, receiver_line[iy], depth)) rg.append( ( mid_point, receiver_line[iy]) ) # # create domain: # if DIM == 2: domain=Rectangle(ne_x, ne_z ,l0=width_x, l1=depth, diracPoints=src_locations, diracTags=src_tags) else: domain=Brick(ne_x,ne_x,ne_z,l0=width_x,l1=width_y,l2=depth, diracPoints=src_locations, diracTags=src_tags) wl=Ricker(frq, tcenter) #====================================================================== z=Function(domain).getX()[DIM-1] z_bottom=0 v_p=0 delta=0 vareps=0 azmth=0 rho=0 for l in range(len(layers)): m=wherePositive(z-z_bottom)*whereNonPositive(z-(z_bottom+layers[l])) v_p=v_p*(1-m)+v_Ps[l]*m vareps=vareps*(1-m)+epss[l]*m azmth=azmth*(1-m)+azmths[l]*m delta=delta*(1-m)+deltas[l]*m
rgNS=[] for iy in range(len(receiver_line)): rcvNS_locations.append((mid_point, receiver_line[iy], depth)) rgNS.append( ( mid_point, receiver_line[iy]) ) # # create domain: # order = 5 if DIM == 2: domain=Rectangle(order, ceil(ne_z*width_x/depth),ne_z,l0=width_x,l1=depth, diracPoints=src_locations, diracTags=src_tags) else: domain=Brick(order, ceil(ne_z*width_x/depth),ceil(ne_z*width_y/depth),ne_z,l0=width_x,l1=width_y,l2=depth, diracPoints=src_locations, diracTags=src_tags) wl=Ricker(frq) m=whereNegative(Function(domain).getX()[DIM-1]-reflector_at) v_p=v_p_bottom*m+v_p_top*(1-m) sw=SonicWave(domain, v_p, source_tag=src_tags[0], wavelet=wl, absorption_zone=absorption_zone, lumping=True) locEW=Locator(domain,rcvEW_locations) tracerEW=SimpleSEGYWriter(receiver_group=rgEW, source=src_loc_2D, sampling_interval=sampling_interval) if DIM==3: locNS=Locator(domain,rcvNS_locations) tracerNS=SimpleSEGYWriter(receiver_group=rgNS, source=src_loc_2D, sampling_interval=sampling_interval) if not tracerEW.obspy_available(): print("\nWARNING: obspy not available, SEGY files will not be written\n") elif getMPISizeWorld() > 1: print("\nWARNING: SEGY files cannot be written with multiple processes\n")