Fields calculation in Richards. Calculation of the diagonals of the Jacobian.

This commit is contained in:
Rowan Cockett
2013-11-14 15:29:25 -08:00
parent a5032e07b1
commit 61e175cd12
4 changed files with 128 additions and 31 deletions
+6 -1
View File
@@ -69,9 +69,14 @@ class RichardsTests(unittest.TestCase):
passed = checkDerivative(wrapper, np.random.randn(n), plotIt=False)
self.assertTrue(passed,True)
def test_Richards_getResidual(self):
def test_Richards_getResidual_Newton(self):
self.prob.doNewton = True
checkDerivative(lambda hn1: self.prob.getResidual(self.h0,hn1), self.h0, plotIt=False)
def test_Richards_getResidual_Picard(self):
self.prob.doNewton = False
checkDerivative(lambda hn1: self.prob.getResidual(self.h0,hn1), self.h0, plotIt=False, expectedOrder=1)
if __name__ == '__main__':