added mass matrix

This commit is contained in:
ehaber99
2013-07-19 14:43:15 -07:00
parent f626cedfb8
commit ffb78fea10
+20
View File
@@ -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))