diff --git a/SimPEG/DiffOperators.py b/SimPEG/DiffOperators.py index a755662f..0fb36c2b 100644 --- a/SimPEG/DiffOperators.py +++ b/SimPEG/DiffOperators.py @@ -161,3 +161,23 @@ class DiffOperators(object): return locals() _edgeAve = None edgeAve = property(**edgeAve()) + + + +def getEdgeMassMatrix(h,sigma): + # mass matix for products of edge functions w'*M(sigma)*e + + Av = getEdgeToCellAverge(h) + v = getVol(h) + sigma = mkvc(sigma) + + return sdiag(Av.T*(v*sigma)) + +def getFaceMassMatrix(h,sigma): + # mass matix for products of edge functions w'*M(sigma)*e + + Av = getFaceToCellAverge(h) + v = getVol(h) + sigma = mkvc(sigma) + + return sdiag(Av.T*(v*sigma)) \ No newline at end of file