Beispiel #1
0
 def test_ACont(self):
     lf = LocalFields(np.ones(3), 2. * np.ones(3), 3. * np.ones(3))
     lf.ACont = -5.
     self.assertEqual(lf.ACont, -5.)
     np.testing.assert_array_equal(lf.Total, 0. * np.ones(3))
     np.testing.assert_array_equal(lf.C, -5. * np.ones(3))
Beispiel #2
0
 def test_T(self):
     lf = LocalFields(np.ones(3), 2. * np.ones(3), 3. * np.ones(3))
     np.testing.assert_array_equal(lf.T, 5. * np.ones(3))
     lf.ACont = 2
     np.testing.assert_array_equal(lf.T, 7. * np.ones(3))
Beispiel #3
0
 def test_Total(self):
     lf = LocalFields(np.ones(3), 2. * np.ones(3), 3. * np.ones(3))
     lf.ACont = 3
     np.testing.assert_array_equal(lf.Total, 8. * np.ones(3))
Beispiel #4
0
 def test_Contact(self):
     lf = LocalFields(np.ones(3), 2. * np.ones(3), 3. * np.ones(3))
     np.testing.assert_array_equal(lf.Contact, 0. * np.ones(3))
     lf.ACont = 1.
     np.testing.assert_array_equal(lf.Contact, 1. * np.ones(3))
Beispiel #5
0
 def test_ACont(self):
     lf = LocalFields(np.ones(3),2.*np.ones(3),3.*np.ones(3))
     lf.ACont = -5.
     self.assertEqual(lf.ACont,-5.)
     np.testing.assert_array_equal(lf.Total,0.*np.ones(3))
     np.testing.assert_array_equal(lf.C,-5.*np.ones(3))
Beispiel #6
0
 def test_Total(self):
     lf = LocalFields(np.ones(3),2.*np.ones(3),3.*np.ones(3))
     lf.ACont = 3
     np.testing.assert_array_equal(lf.Total,8.*np.ones(3))
Beispiel #7
0
 def test_T(self):
     lf = LocalFields(np.ones(3),2.*np.ones(3),3.*np.ones(3))
     np.testing.assert_array_equal(lf.T,5.*np.ones(3))
     lf.ACont = 2
     np.testing.assert_array_equal(lf.T,7.*np.ones(3))
Beispiel #8
0
 def test_Contact(self):
     lf = LocalFields(np.ones(3),2.*np.ones(3),3.*np.ones(3))
     np.testing.assert_array_equal(lf.Contact,0.*np.ones(3))
     lf.ACont=1.
     np.testing.assert_array_equal(lf.Contact,1.*np.ones(3))