mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-09 11:34:26 +08:00
sketching out code
This commit is contained in:
@@ -539,10 +539,9 @@ class CircularLoop(BaseSrc):
|
|||||||
if not prob.mesh.isSymmetric:
|
if not prob.mesh.isSymmetric:
|
||||||
# TODO ?
|
# TODO ?
|
||||||
raise NotImplementedError('Non-symmetric cyl mesh not implemented yet!')
|
raise NotImplementedError('Non-symmetric cyl mesh not implemented yet!')
|
||||||
a = MagneticDipoleVectorPotential(self.loc, gridY, 'y', moment=self.radius, mu=self.mu)
|
a = MagneticLoopVectorPotential(self.loc, gridY, 'y', self.radius, mu=self.mu)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
srcfct = MagneticDipoleVectorPotential
|
srcfct = MagneticLoopVectorPotential
|
||||||
ax = srcfct(self.loc, gridX, 'x', self.radius, mu=self.mu)
|
ax = srcfct(self.loc, gridX, 'x', self.radius, mu=self.mu)
|
||||||
ay = srcfct(self.loc, gridY, 'y', self.radius, mu=self.mu)
|
ay = srcfct(self.loc, gridY, 'y', self.radius, mu=self.mu)
|
||||||
az = srcfct(self.loc, gridZ, 'z', self.radius, mu=self.mu)
|
az = srcfct(self.loc, gridZ, 'z', self.radius, mu=self.mu)
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ class BaseWaveform(object):
|
|||||||
def eval(self, time):
|
def eval(self, time):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def evalDeriv(self, time):
|
||||||
|
raise NotImplementedError # needed for E-formulation
|
||||||
|
|
||||||
|
|
||||||
class StepOffWaveform(BaseWaveform):
|
class StepOffWaveform(BaseWaveform):
|
||||||
|
|
||||||
@@ -95,12 +98,30 @@ class StepOffWaveform(BaseWaveform):
|
|||||||
return 0.
|
return 0.
|
||||||
|
|
||||||
|
|
||||||
|
class RawWaveform(BaseWaveform):
|
||||||
|
|
||||||
|
def __init__(self, offTime=0.):
|
||||||
|
BaseWaveform.__init__(self, offTime, hasInitialFields=True)
|
||||||
|
|
||||||
|
def eval(self, time):
|
||||||
|
raise NotImplementedError 'RawWaveform has not been implemented, you should write it!'
|
||||||
|
|
||||||
|
|
||||||
|
class TriangularWaveform(BaseWaveform):
|
||||||
|
|
||||||
|
def __init__(self, offTime=0.):
|
||||||
|
BaseWaveform.__init__(self, offTime, hasInitialFields=True)
|
||||||
|
|
||||||
|
def eval(self, time):
|
||||||
|
raise NotImplementedError 'TriangularWaveform has not been implemented, you should write it!'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BaseSrc(SimPEG.Survey.BaseSrc):
|
class BaseSrc(SimPEG.Survey.BaseSrc):
|
||||||
|
|
||||||
rxPair = Rx
|
rxPair = Rx
|
||||||
integrate = True
|
integrate = True
|
||||||
waveformPair = BaseWaveform
|
waveformPair = StepOffWaveform
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def waveform(self):
|
def waveform(self):
|
||||||
@@ -141,6 +162,12 @@ class BaseSrc(SimPEG.Survey.BaseSrc):
|
|||||||
def S_e(self, prob, time):
|
def S_e(self, prob, time):
|
||||||
return Zero()
|
return Zero()
|
||||||
|
|
||||||
|
def S_mDeriv(self, prob, time):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def S_eDeriv(self, prob, time):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class MagDipole(BaseSrc):
|
class MagDipole(BaseSrc):
|
||||||
def __init__(self, rxList, waveform=None, loc=None, orientation='Z', moment=1., mu=mu_0):
|
def __init__(self, rxList, waveform=None, loc=None, orientation='Z', moment=1., mu=mu_0):
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ class Problem_b(BaseTDEMProblem):
|
|||||||
return MfMui.T * rhs
|
return MfMui.T * rhs
|
||||||
return rhs
|
return rhs
|
||||||
|
|
||||||
def getRHSDeriv(self, tInd, src, v, adjoint=False):
|
def getRHSDeriv(self, tInd, src, v, dbn_dm_v, adjoint=False):
|
||||||
|
|
||||||
dt = self.timeSteps[tInd]
|
dt = self.timeSteps[tInd]
|
||||||
C = self.mesh.edgeCurl
|
C = self.mesh.edgeCurl
|
||||||
|
|||||||
Reference in New Issue
Block a user