diff --git a/SimPEG/EM/FDEM/SrcFDEM.py b/SimPEG/EM/FDEM/SrcFDEM.py index 6193b2f4..f524a5f2 100644 --- a/SimPEG/EM/FDEM/SrcFDEM.py +++ b/SimPEG/EM/FDEM/SrcFDEM.py @@ -539,10 +539,9 @@ class CircularLoop(BaseSrc): if not prob.mesh.isSymmetric: # TODO ? 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: - srcfct = MagneticDipoleVectorPotential + srcfct = MagneticLoopVectorPotential ax = srcfct(self.loc, gridX, 'x', 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) diff --git a/SimPEG/EM/TDEM/SurveyTDEM.py b/SimPEG/EM/TDEM/SurveyTDEM.py index 3d2c20db..ba085bf9 100644 --- a/SimPEG/EM/TDEM/SurveyTDEM.py +++ b/SimPEG/EM/TDEM/SurveyTDEM.py @@ -85,6 +85,9 @@ class BaseWaveform(object): def eval(self, time): raise NotImplementedError + def evalDeriv(self, time): + raise NotImplementedError # needed for E-formulation + class StepOffWaveform(BaseWaveform): @@ -95,12 +98,30 @@ class StepOffWaveform(BaseWaveform): 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): rxPair = Rx integrate = True - waveformPair = BaseWaveform + waveformPair = StepOffWaveform @property def waveform(self): @@ -141,6 +162,12 @@ class BaseSrc(SimPEG.Survey.BaseSrc): def S_e(self, prob, time): return Zero() + def S_mDeriv(self, prob, time): + raise NotImplementedError + + def S_eDeriv(self, prob, time): + raise NotImplementedError + class MagDipole(BaseSrc): def __init__(self, rxList, waveform=None, loc=None, orientation='Z', moment=1., mu=mu_0): diff --git a/SimPEG/EM/TDEM/TDEM.py b/SimPEG/EM/TDEM/TDEM.py index c9b627ae..192fa692 100644 --- a/SimPEG/EM/TDEM/TDEM.py +++ b/SimPEG/EM/TDEM/TDEM.py @@ -267,7 +267,7 @@ class Problem_b(BaseTDEMProblem): return MfMui.T * 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] C = self.mesh.edgeCurl