Beispiel #1
0
    def test_rjb(self):
        mesh = Mesh(numpy.array([-118.]), numpy.array([33]))   # 1 point
        surf18 = MultiSurface.from_csv(cd / 'msurface18.csv')  # 2 planes
        surf19 = MultiSurface.from_csv(cd / 'msurface19.csv')  # 2 planes
        surf20 = MultiSurface.from_csv(cd / 'msurface20.csv')  # 1 plane
        rjb18 = surf18.get_joyner_boore_distance(mesh)[0]
        rjb19 = surf19.get_joyner_boore_distance(mesh)[0]
        rjb20 = surf20.get_joyner_boore_distance(mesh)[0]
        aac([rjb18, rjb19, rjb20], [85.676294, 89.225542, 92.937021])

        surfa = MultiSurface(surf18.surfaces + surf19.surfaces)
        surfb = MultiSurface(surf19.surfaces + surf20.surfaces)
        rjba = surfa.get_joyner_boore_distance(mesh)[0]
        rjbb = surfb.get_joyner_boore_distance(mesh)[0]
        aac([rjba, rjbb], [85.676294, 89.225542])
Beispiel #2
0
 def test_joyner_boore_distance_mesh1D(self):
     surf = MultiSurface(self.surfaces_mesh1D)
     numpy.testing.assert_equal(surf.get_joyner_boore_distance(self.mesh1D),
                                numpy.array([-1., 2., 2.]))
Beispiel #3
0
 def test_joyner_boore_distance_mesh2D(self):
     surf = MultiSurface(self.surfaces_mesh2D)
     numpy.testing.assert_equal(
         surf.get_joyner_boore_distance(self.mesh2D), numpy.array([[-1.0, 2.0, 2.0], [4.0, 4.0, 5.0]])
     )
Beispiel #4
0
 def test_joyner_boore_distance_mesh1D(self):
     surf = MultiSurface(self.surfaces_mesh1D)
     numpy.testing.assert_equal(surf.get_joyner_boore_distance(self.mesh1D),
                                numpy.array([-1., 2., 2.]))