mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-02 13:00:17 +08:00
Merge branch 'master' of https://bitbucket.org/rcockett/simpeg into BoundConstraint
Conflicts: .gitignore SimPEG/utils/__init__.py
This commit is contained in:
@@ -1,355 +0,0 @@
|
||||
.. _api_TestResults:
|
||||
|
||||
.. raw:: html
|
||||
<style type="text/css" media="screen">
|
||||
body { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
|
||||
table { font-size: 100%; }
|
||||
pre { }
|
||||
|
||||
/* -- heading ---------------------------------------------------------------------- */
|
||||
h1 {
|
||||
font-size: 16pt;
|
||||
color: gray;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 0ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
|
||||
.heading .attribute {
|
||||
margin-top: 1ex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.heading .description {
|
||||
margin-top: 4ex;
|
||||
margin-bottom: 6ex;
|
||||
}
|
||||
|
||||
/* -- css div popup ------------------------------------------------------------------------ */
|
||||
a.popup_link {
|
||||
}
|
||||
|
||||
a.popup_link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.popup_window {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
/*border: solid #627173 1px; */
|
||||
padding: 10px;
|
||||
background-color: #E6E6D6;
|
||||
font-family: "Lucida Console", "Courier New", Courier, monospace;
|
||||
text-align: left;
|
||||
font-size: 8pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
}
|
||||
/* -- report ------------------------------------------------------------------------ */
|
||||
#show_detail_line {
|
||||
margin-top: 3ex;
|
||||
margin-bottom: 1ex;
|
||||
}
|
||||
#result_table {
|
||||
width: 80%;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
#header_row {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #777;
|
||||
}
|
||||
#result_table td {
|
||||
border: 1px solid #777;
|
||||
padding: 2px;
|
||||
}
|
||||
#total_row { font-weight: bold; }
|
||||
.passClass { background-color: #6c6; }
|
||||
.failClass { background-color: #c60; }
|
||||
.errorClass { background-color: #c00; }
|
||||
.passCase { color: #6c6; }
|
||||
.failCase { color: #c60; font-weight: bold; }
|
||||
.errorCase { color: #c00; font-weight: bold; }
|
||||
.hiddenRow { display: none; }
|
||||
.testcase { margin-left: 2em; }
|
||||
|
||||
|
||||
/* -- ending ---------------------------------------------------------------------- */
|
||||
#ending {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
output_list = Array();
|
||||
|
||||
/* level - 0:Summary; 1:Failed; 2:All */
|
||||
function showCase(level) {
|
||||
trs = document.getElementsByTagName("tr");
|
||||
for (var i = 0; i < trs.length; i++) {
|
||||
tr = trs[i];
|
||||
id = tr.id;
|
||||
if (id.substr(0,2) == 'ft') {
|
||||
if (level < 1) {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
tr.className = '';
|
||||
}
|
||||
}
|
||||
if (id.substr(0,2) == 'pt') {
|
||||
if (level > 1) {
|
||||
tr.className = '';
|
||||
}
|
||||
else {
|
||||
tr.className = 'hiddenRow';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showClassDetail(cid, count) {
|
||||
var id_list = Array(count);
|
||||
var toHide = 1;
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid0 = 't' + cid.substr(1) + '.' + (i+1);
|
||||
tid = 'f' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
if (!tr) {
|
||||
tid = 'p' + tid0;
|
||||
tr = document.getElementById(tid);
|
||||
}
|
||||
id_list[i] = tid;
|
||||
if (tr.className) {
|
||||
toHide = 0;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
tid = id_list[i];
|
||||
if (toHide) {
|
||||
document.getElementById('div_'+tid).style.display = 'none'
|
||||
document.getElementById(tid).className = 'hiddenRow';
|
||||
}
|
||||
else {
|
||||
document.getElementById(tid).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showTestDetail(div_id){
|
||||
var details_div = document.getElementById(div_id)
|
||||
var displayState = details_div.style.display
|
||||
// alert(displayState)
|
||||
if (displayState != 'block' ) {
|
||||
displayState = 'block'
|
||||
details_div.style.display = 'block'
|
||||
}
|
||||
else {
|
||||
details_div.style.display = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function html_escape(s) {
|
||||
s = s.replace(/&/g,'&');
|
||||
s = s.replace(/</g,'<');
|
||||
s = s.replace(/>/g,'>');
|
||||
return s;
|
||||
}
|
||||
|
||||
/* obsoleted by detail in <div>
|
||||
function showOutput(id, name) {
|
||||
var w = window.open("", //url
|
||||
name,
|
||||
"resizable,scrollbars,status,width=800,height=450");
|
||||
d = w.document;
|
||||
d.write("<pre>");
|
||||
d.write(html_escape(output_list[id]));
|
||||
d.write("\n");
|
||||
d.write("<a href='javascript:window.close()'>close</a>\n");
|
||||
d.write("</pre>\n");
|
||||
d.close();
|
||||
}
|
||||
*/
|
||||
--></script>
|
||||
|
||||
<div class='heading'>
|
||||
<h1>Test Report</h1>
|
||||
<p class='attribute'><strong>Start Time:</strong> 2013-11-05 15:24:44</p>
|
||||
<p class='attribute'><strong>Duration:</strong> 0:00:00.007500</p>
|
||||
<p class='attribute'><strong>Status:</strong> Pass 22</p>
|
||||
|
||||
<p class='description'>This demonstrates the report output by Prasanna.Yelsangikar.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p id='show_detail_line'>Show
|
||||
<a href='javascript:showCase(0)'>Summary</a>
|
||||
<a href='javascript:showCase(1)'>Failed</a>
|
||||
<a href='javascript:showCase(2)'>All</a>
|
||||
</p>
|
||||
<table id='result_table'>
|
||||
<colgroup>
|
||||
<col align='left' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
<col align='right' />
|
||||
</colgroup>
|
||||
<tr id='header_row'>
|
||||
<td>Test Group/Test case</td>
|
||||
<td>Count</td>
|
||||
<td>Pass</td>
|
||||
<td>Fail</td>
|
||||
<td>Error</td>
|
||||
<td>View</td>
|
||||
</tr>
|
||||
|
||||
<tr class='passClass'>
|
||||
<td>test_basemesh.TestBaseMesh</td>
|
||||
<td>11</td>
|
||||
<td>11</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td><a href="javascript:showClassDetail('c1',11)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.1' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_meshDimensions</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.2' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nc</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.3' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nc_xyz</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.4' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_ne</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.5' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nf</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.6' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_numbers</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.7' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_CC_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.8' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_E_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.9' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_E_V</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.10' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_F_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt1.11' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_F_V</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr class='passClass'>
|
||||
<td>test_basemesh.TestMeshNumbers2D</td>
|
||||
<td>11</td>
|
||||
<td>11</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td><a href="javascript:showClassDetail('c2',11)">Detail</a></td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.1' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_meshDimensions</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.2' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nc</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.3' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nc_xyz</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.4' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_ne</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.5' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_nf</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.6' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_numbers</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.7' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_CC_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.8' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_E_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.9' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_E_V</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.10' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_F_M</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='pt2.11' class='hiddenRow'>
|
||||
<td class='none'><div class='testcase'>test_mesh_r_F_V</div></td>
|
||||
<td colspan='5' align='center'>pass</td>
|
||||
</tr>
|
||||
|
||||
<tr id='total_row'>
|
||||
<td>Total</td>
|
||||
<td>22</td>
|
||||
<td>22</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -58,23 +58,39 @@ class TestSolver(unittest.TestCase):
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directLower_1(self):
|
||||
def test_directLower_1_python(self):
|
||||
AL = sparse.tril(self.A)
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={})
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={'backend':'python'})
|
||||
e = np.ones(self.M.nC)
|
||||
rhs = AL.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directLower_M(self):
|
||||
def test_directLower_M_python(self):
|
||||
AL = sparse.tril(self.A)
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={})
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={'backend':'python'})
|
||||
e = np.ones((self.M.nC,numRHS))
|
||||
rhs = AL.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
|
||||
def test_directLower_1_fortran(self):
|
||||
AL = sparse.tril(self.A)
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={'backend':'fortran'})
|
||||
e = np.ones(self.M.nC)
|
||||
rhs = AL.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directUpper_1(self):
|
||||
def test_directLower_M_fortran(self):
|
||||
AL = sparse.tril(self.A)
|
||||
solve = Solver(AL, doDirect=True, flag='L', options={'backend':'fortran'})
|
||||
e = np.ones((self.M.nC,numRHS))
|
||||
rhs = AL.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directUpper_1_python(self):
|
||||
AU = sparse.triu(self.A)
|
||||
solve = Solver(AU, doDirect=True, flag='U', options={})
|
||||
e = np.ones(self.M.nC)
|
||||
@@ -82,7 +98,7 @@ class TestSolver(unittest.TestCase):
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directUpper_M(self):
|
||||
def test_directUpper_M_python(self):
|
||||
AU = sparse.triu(self.A)
|
||||
solve = Solver(AU, doDirect=True, flag='U', options={})
|
||||
e = np.ones((self.M.nC,numRHS))
|
||||
@@ -90,6 +106,23 @@ class TestSolver(unittest.TestCase):
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
|
||||
def test_directUpper_1_fortran(self):
|
||||
AU = sparse.triu(self.A)
|
||||
solve = Solver(AU, doDirect=True, flag='U', options={'backend':'fortran'})
|
||||
e = np.ones(self.M.nC)
|
||||
rhs = AU.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directUpper_M_fortran(self):
|
||||
AU = sparse.triu(self.A)
|
||||
solve = Solver(AU, doDirect=True, flag='U', options={'backend':'fortran'})
|
||||
e = np.ones((self.M.nC,numRHS))
|
||||
rhs = AU.dot(e)
|
||||
x = solve.solve(rhs)
|
||||
self.assertTrue(np.linalg.norm(e-x,np.inf) < TOL, True)
|
||||
|
||||
def test_directDiagonal_1(self):
|
||||
AD = sdiag(self.A.diagonal())
|
||||
solve = Solver(AD, doDirect=True, flag='D', options={})
|
||||
|
||||
Reference in New Issue
Block a user