Minor changes and comments.

This commit is contained in:
Rowan Cockett
2013-07-26 14:30:04 -07:00
parent c8633881fb
commit 5c83095781
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ def getEdgeInnerProduct(mesh, sigma):
P111 = Pxxx([[0, 1, 1], [1, 0, 1], [1, 1, 0]])
if sigma.size == mesh.nC: # Isotropic!
sigma = mkvc(sigma)
sigma = mkvc(sigma) # ensure it is a vector.
Sigma = sdiag(np.r_[sigma, sigma, sigma])
elif sigma.shape[1] == 3: # Diagonal tensor
Sigma = sdiag(np.r_[sigma[:, 0], sigma[:, 1], sigma[:, 2]])
+2 -4
View File
@@ -1,18 +1,16 @@
import numpy as np
import unittest
from OrderTest import OrderTest
import sys
sys.path.append('../')
from OrderTest import OrderTest
from getEdgeInnerProducts import *
class TestEdgeInnerProduct(OrderTest):
"""Integrate a function over a unit cube domain."""
"""Integrate an edge function over a unit cube domain using edgeInnerProducts."""
name = "Edge Inner Product"
meshSizes = [4, 8, 16, 32]
def getError(self):
call = lambda fun, xyz: fun(xyz[:, 0], xyz[:, 1], xyz[:, 2])