mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-07 11:28:42 +08:00
Analytic test
This commit is contained in:
@@ -3,6 +3,7 @@ from SimPEG import *
|
||||
from SimPEG.Utils import kron3, speye, sdiag
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def spheremodel(mesh, x0, y0, z0, r):
|
||||
"""
|
||||
Generate model indicies for sphere
|
||||
@@ -13,6 +14,7 @@ def spheremodel(mesh, x0, y0, z0, r):
|
||||
ind = np.sqrt( (mesh.gridCC[:,0]-x0)**2+(mesh.gridCC[:,1]-y0)**2+(mesh.gridCC[:,2]-z0)**2 ) < r
|
||||
return ind
|
||||
|
||||
|
||||
def MagSphereAnaFun(x, y, z, R, x0, y0, z0, mu1, mu2, H0, flag='total'):
|
||||
"""
|
||||
test
|
||||
@@ -29,7 +31,6 @@ def MagSphereAnaFun(x, y, z, R, x0, y0, z0, mu1, mu2, H0, flag='total'):
|
||||
|
||||
|
||||
"""
|
||||
print H0
|
||||
|
||||
if (~np.size(x)==np.size(y)==np.size(z)):
|
||||
print "Specify same size of x, y, z"
|
||||
@@ -180,6 +181,7 @@ def MagSphereAnaFunA(x, y, z, R, xc, yc, zc, chi, Bo, flag):
|
||||
|
||||
return Bx, By, Bz
|
||||
|
||||
|
||||
def IDTtoxyz(Inc, Dec, Btot):
|
||||
"""
|
||||
Convert from Inclination, Declination, Total intensity of earth field to x, y, z
|
||||
@@ -190,6 +192,7 @@ def IDTtoxyz(Inc, Dec, Btot):
|
||||
|
||||
return np.r_[Bx, By, Bz]
|
||||
|
||||
|
||||
def MagSphereFreeSpace(x, y, z, R, xc, yc, zc, chi, Bo):
|
||||
"""
|
||||
Computing boundary condition using Congrous sphere method.
|
||||
|
||||
Reference in New Issue
Block a user