Exemple #1
0
def test_induced():
    grid = TriaGrid(num_intervals=(10, 10))
    boundary_info = AllDirichletBoundaryInfo(grid)
    product = L2ProductP1(grid, boundary_info)
    zero = NumpyVectorArray(np.zeros(grid.size(2)))
    norm = induced_norm(product)
    value = norm(zero)
    np.testing.assert_almost_equal(value, 0.0)
Exemple #2
0
def test_induced():
    grid = TriaGrid(num_intervals=(10, 10))
    boundary_info = AllDirichletBoundaryInfo(grid)
    product = L2ProductP1(grid, boundary_info)
    zero = NumpyVectorArray(np.zeros(grid.size(2)))
    norm = induced_norm(product)
    value = norm(zero)
    np.testing.assert_almost_equal(value, 0.0)
Exemple #3
0
def test_induced():
    grid = TriaGrid(num_intervals=(10, 10))
    boundary_info = AllDirichletBoundaryInfo(grid)
    product = L2ProductP1(grid, boundary_info)
    zero = product.source.zeros()
    norm = induced_norm(product)
    value = norm(zero)
    np.testing.assert_almost_equal(value, 0.0)
Exemple #4
0
     ((2, 4), dict(identify_left_right=True)
      ), ((2, 4), dict(
          identify_bottom_top=True
      )), ((2, 4), dict(identify_left_right=True, identify_bottom_top=True)
           ), ((2, 1),
               dict(identify_left_right=True)),
     ((1, 2), dict(identify_bottom_top=True)
      ), ((2, 2), dict(identify_left_right=True, identify_bottom_top=True)),
     ((42, 30), dict(
         identify_left_right=True)), ((42, 30),
                                      dict(identify_bottom_top=True)),
     ((42, 30), dict(identify_left_right=True, identify_bottom_top=True))]
]

tria_grid_generators = [
    lambda arg=arg, kwargs=kwargs: TriaGrid(arg, **kwargs) for arg, kwargs in
    [((2, 4), {}), ((1, 1), {}), ((42, 42), {}),
     ((2, 4), dict(identify_left_right=True)
      ), ((2, 4), dict(
          identify_bottom_top=True
      )), ((2, 4), dict(identify_left_right=True, identify_bottom_top=True)
           ), ((2, 1),
               dict(identify_left_right=True)),
     ((1, 2), dict(identify_bottom_top=True)
      ), ((2, 2), dict(identify_left_right=True, identify_bottom_top=True)),
     ((42, 30), dict(
         identify_left_right=True)), ((42, 30),
                                      dict(identify_bottom_top=True)),
     ((42, 30), dict(identify_left_right=True, identify_bottom_top=True))]
]