Ejemplo n.º 1
0
 def setUp(self):
     desired_file = Paths.get_module_path_file(self.test_data_file, __file__)
     env = self.environment = FillamentEnvironment(desired_file)
     self.DUT = FillamentCurrentSource()
     self.DUT.set_function_space(env.discretisation_space)
     self.DUT.set_no_integration_points(env.no_integration_points)
     self.DUT.set_source_endpoints(env.source_endpoints)
     self.DUT.set_value(env.I)
Ejemplo n.º 2
0
 def test_get_RHS(self):
     self.DUT.set_frequency(self.frequency)
     self.DUT.init_problem()
     actual_RHS = self.DUT.get_RHS()
     # test data generated using a suspected-working version on 31 May 2011
     desired_file = Paths.get_module_path_file('RHS_vector.pickle', __file__)
     desired_RHS    = pickle.load(desired_file)
     self.assertTrue(N.allclose(
         actual_RHS, desired_RHS, rtol=1e-12, atol=1e-16))
Ejemplo n.º 3
0
 def test_get_RHS(self):
     self.DUT.set_frequency(self.frequency)
     self.DUT.init_problem()
     actual_RHS = self.DUT.get_RHS()
     # test data generated using a suspected-working version on 31 May 2011
     desired_file = Paths.get_module_path_file('RHS_vector.pickle',
                                               __file__)
     desired_RHS = pickle.load(desired_file)
     self.assertTrue(
         N.allclose(actual_RHS, desired_RHS, rtol=1e-12, atol=1e-16))
Ejemplo n.º 4
0
 def setUp(self):
     desired_file = Paths.get_module_path_file(self.test_data_file, __file__)
     self.environment = NTFFEnvironment(desired_file)
     self.DUT = surface_ntff.NTFF(self.environment.discretisation_space)
Ejemplo n.º 5
0
 def setUp(self):
     desired_file = Paths.get_module_path_file(self.test_data_file, __file__)
     self.desired_data = pickle.load(desired_file)