mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-11 12:44:29 +08:00
Migrated % string formating
This commit is contained in:
@@ -21,7 +21,7 @@ SrcList = ['RawVec', 'MagDipole'] #or 'MAgDipole_Bfield', 'CircularLoop', 'RawVe
|
||||
|
||||
def adjointTest(fdemType, comp):
|
||||
prb = getFDEMProblem(fdemType, comp, SrcList, freq)
|
||||
print 'Adjoint %s formulation - %s' % (fdemType, comp)
|
||||
print 'Adjoint {0!s} formulation - {1!s}'.format(fdemType, comp)
|
||||
|
||||
m = np.log(np.ones(prb.mapping.nP)*CONDUCTIVITY)
|
||||
mu = np.ones(prb.mesh.nC)*MU
|
||||
|
||||
@@ -21,7 +21,7 @@ SrcList = ['RawVec', 'MagDipole'] #or 'MAgDipole_Bfield', 'CircularLoop', 'RawVe
|
||||
|
||||
def adjointTest(fdemType, comp):
|
||||
prb = getFDEMProblem(fdemType, comp, SrcList, freq)
|
||||
print 'Adjoint %s formulation - %s' % (fdemType, comp)
|
||||
print 'Adjoint {0!s} formulation - {1!s}'.format(fdemType, comp)
|
||||
|
||||
m = np.log(np.ones(prb.mapping.nP)*CONDUCTIVITY)
|
||||
mu = np.ones(prb.mesh.nC)*MU
|
||||
|
||||
@@ -26,7 +26,7 @@ SrcType = ['MagDipole', 'RawVec'] #or 'MAgDipole_Bfield', 'CircularLoop', 'RawVe
|
||||
def derivTest(fdemType, comp):
|
||||
|
||||
prb = getFDEMProblem(fdemType, comp, SrcType, freq)
|
||||
print '%s formulation - %s' % (fdemType, comp)
|
||||
print '{0!s} formulation - {1!s}'.format(fdemType, comp)
|
||||
x0 = np.log(np.ones(prb.mapping.nP)*CONDUCTIVITY)
|
||||
mu = np.log(np.ones(prb.mesh.nC)*MU)
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ def halfSpaceProblemAnaDiff(meshType, sig_half=1e-2, rxOffset=50., bounds=None,
|
||||
if showIt == True:
|
||||
plt.loglog(rx.times[bz_calc>0], bz_calc[bz_calc>0], 'r', rx.times[bz_calc<0], -bz_calc[bz_calc<0], 'r--')
|
||||
plt.loglog(rx.times, abs(bz_ana), 'b*')
|
||||
plt.title('sig_half = %e'%sig_half)
|
||||
plt.title('sig_half = {0:e}'.format(sig_half))
|
||||
plt.show()
|
||||
|
||||
return log10diff
|
||||
|
||||
Reference in New Issue
Block a user