mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-28 09:29:30 +08:00
sketching out code
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user