From ed61178b452dbfd3809dadd5ba8d529ffe61a142 Mon Sep 17 00:00:00 2001 From: Lindsey Date: Mon, 2 Mar 2015 15:07:50 -0800 Subject: [PATCH] removed comment blocks of old code from get RHS in each formulation --- simpegEM/FDEM/FDEM.py | 133 +----------------------------------------- 1 file changed, 1 insertion(+), 132 deletions(-) diff --git a/simpegEM/FDEM/FDEM.py b/simpegEM/FDEM/FDEM.py index e816be19..81b0d3ab 100644 --- a/simpegEM/FDEM/FDEM.py +++ b/simpegEM/FDEM/FDEM.py @@ -258,27 +258,6 @@ class ProblemFDEM_e(BaseFDEMProblem): :rtype: numpy.ndarray (nE, nTx) :return: RHS """ - # Txs = self.survey.getTransmitters(freq) - # rhs = range(len(Txs)) - # for i, tx in enumerate(Txs): - # if tx.txType == 'VMD': - # src = Sources.MagneticDipoleVectorPotential - # SRCx = src(tx.loc, self.mesh.gridEx, 'x') - # SRCy = src(tx.loc, self.mesh.gridEy, 'y') - # SRCz = src(tx.loc, self.mesh.gridEz, 'z') - - # elif tx.txType == 'CircularLoop': - # src = Sources.MagneticLoopVectorPotential - # SRCx = src(tx.loc, self.mesh.gridEx, 'x', tx.radius) - # SRCy = src(tx.loc, self.mesh.gridEy, 'y', tx.radius) - # SRCz = src(tx.loc, self.mesh.gridEz, 'z', tx.radius) - # else: - # raise NotImplemented('%s txType is not implemented' % tx.txType) - # rhs[i] = np.concatenate((SRCx, SRCy, SRCz)) - - # a = np.concatenate(rhs).reshape((self.mesh.nE, len(Txs)), order='F') - # mui = self.MfMui - # C = self.mesh.edgeCurl j_s = getSource(self,freq) #C.T*mui*C*a return -1j*omega(freq)*j_s @@ -350,57 +329,8 @@ class ProblemFDEM_b(BaseFDEMProblem): :rtype: numpy.ndarray (nE, nTx) :return: RHS """ - # Txs = self.survey.getTransmitters(freq) - # rhs = range(len(Txs)) - # for i, tx in enumerate(Txs): - - # if self.mesh._meshType is 'CYL': - # if self.mesh.isSymmetric: - # if tx.txType == 'VMD': - # SRC = Sources.MagneticDipoleVectorPotential(tx.loc, self.mesh.gridEy, 'y') - # elif tx.txType =='CircularLoop': - # SRC = Sources.MagneticLoopVectorPotential(tx.loc, self.mesh.gridEy, 'y', tx.radius) - # else: - # raise NotImplementedError('Only VMD and CircularLoop') - # else: - # raise NotImplementedError('Non-symmetric cyl mesh not implemented yet!') - # elif self.mesh._meshType is 'TENSOR': - - # if tx.txType == 'VMD': - # src = Sources.MagneticDipoleVectorPotential - # SRCx = src(tx.loc, self.mesh.gridEx, 'x') - # SRCy = src(tx.loc, self.mesh.gridEy, 'y') - # SRCz = src(tx.loc, self.mesh.gridEz, 'z') - - # elif tx.txType == 'VMD_B': - # src = Sources.MagneticDipoleFields - # SRCx = src(tx.loc, self.mesh.gridFx, 'x') - # SRCy = src(tx.loc, self.mesh.gridFy, 'y') - # SRCz = src(tx.loc, self.mesh.gridFz, 'z') - - # elif tx.txType == 'CircularLoop': - # src = Sources.MagneticLoopVectorPotential - # SRCx = src(tx.loc, self.mesh.gridEx, 'x', tx.radius) - # SRCy = src(tx.loc, self.mesh.gridEy, 'y', tx.radius) - # SRCz = src(tx.loc, self.mesh.gridEz, 'z', tx.radius) - # else: - - # raise NotImplemented('%s txType is not implemented' % tx.txType) - # SRC = np.concatenate((SRCx, SRCy, SRCz)) - - # else: - # raise Exception('Unknown mesh for VMD') - - # rhs[i] = SRC - - # mui = self.MfMui - # if tx.txType == 'VMD_B': - # b_0 = np.concatenate(rhs).reshape((self.mesh.nF, len(Txs)), order='F') - # else: - # a = np.concatenate(rhs).reshape((self.mesh.nE, len(Txs)), order='F') - # C = self.mesh.edgeCurl - b_0 = getSource(self,freq) #C*a + b_0 = getSource(self,freq) return -1j*omega(freq)*b_0 @@ -515,36 +445,6 @@ class ProblemFDEM_j(BaseFDEMProblem): return C * ( MeMuI * ( C.T * ( dMf_dsigi * ( dsigi_dsig * ( dsig_dm * v ) ) ) ) ) - # def getjs(self,freq): - # """ - # :param float freq: Frequency - # :rtype: numpy.ndarray (nE, nTx) - # :return: j_s - # """ - # Txs = self.survey.getTransmitters(freq) - # rhs = range(len(Txs)) - # for i, tx in enumerate(Txs): - # if tx.txType == 'VMD': - # src = Sources.MagneticDipoleVectorPotential - # SRCx = src(tx.loc, self.mesh.gridFx, 'x') - # SRCy = src(tx.loc, self.mesh.gridFy, 'y') - # SRCz = src(tx.loc, self.mesh.gridFz, 'z') - - # elif tx.txType == 'CircularLoop': - # src = Sources.MagneticLoopVectorPotential - # SRCx = src(tx.loc, self.mesh.gridFx, 'x', tx.radius) - # SRCy = src(tx.loc, self.mesh.gridFy, 'y', tx.radius) - # SRCz = src(tx.loc, self.mesh.gridFz, 'z', tx.radius) - # else: - # raise NotImplemented('%s txType is not implemented' % tx.txType) - # rhs[i] = np.concatenate((SRCx, SRCy, SRCz)) - - # a = np.concatenate(rhs).reshape((self.mesh.nF, len(Txs)), order='F') - # a = Utils.mkvc(a) - # MeMuI = self.MeMuI - # C = self.mesh.edgeCurl - - # return C*MeMuI*C.T*a def getRHS(self, freq): """ @@ -653,37 +553,6 @@ class ProblemFDEM_h(BaseFDEMProblem): return (C.T * (dMf_dsigi * (dsigi_dsig * (dsig_dm * v)))) - # def getjs(self,freq): - # """ - # :param float freq: Frequency - # :rtype: numpy.ndarray (nE, nTx) - # :return: j_s - # """ - # Txs = self.survey.getTransmitters(freq) - # rhs = range(len(Txs)) - # for i, tx in enumerate(Txs): - # if tx.txType == 'VMD': - # src = Sources.MagneticDipoleVectorPotential - # SRCx = src(tx.loc, self.mesh.gridFx, 'x') - # SRCy = src(tx.loc, self.mesh.gridFy, 'y') - # SRCz = src(tx.loc, self.mesh.gridFz, 'z') - - # elif tx.txType == 'CircularLoop': - # src = Sources.MagneticLoopVectorPotential - # SRCx = src(tx.loc, self.mesh.gridFx, 'x', tx.radius) - # SRCy = src(tx.loc, self.mesh.gridFy, 'y', tx.radius) - # SRCz = src(tx.loc, self.mesh.gridFz, 'z', tx.radius) - # else: - # raise NotImplemented('%s txType is not implemented' % tx.txType) - # rhs[i] = np.concatenate((SRCx, SRCy, SRCz)) - - # a = np.concatenate(rhs).reshape((self.mesh.nF, len(Txs)), order='F') - # a = Utils.mkvc(a) - - # MeMuI = self.MeMuI - # C = self.mesh.edgeCurl - - # return MeMuI*C.T*a #C*MeMuI*C.T*a def getRHS(self, freq): """