mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-15 11:26:09 +08:00
Minor changes and comments.
This commit is contained in:
@@ -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]])
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user