changeset 1463:4ad1282f8bab feature/grids/boundary_indicies

Implement boundary_indices for ZeroDimGrid
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 28 Nov 2023 08:55:22 +0100
parents 05eb8ba149e2
children 37cf9f79caa4
files src/Grids/zero_dim_grid.jl test/Grids/zero_dim_grid_test.jl
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/Grids/zero_dim_grid.jl	Tue Nov 28 08:51:58 2023 +0100
+++ b/src/Grids/zero_dim_grid.jl	Tue Nov 28 08:55:22 2023 +0100
@@ -25,3 +25,4 @@
 
 boundary_identifiers(g::ZeroDimGrid) = ()
 boundary_grid(g::ZeroDimGrid, ::Any) = throw(ArgumentError("ZeroDimGrid has no boundaries"))
+boundary_indices(g::ZeroDimGrid, ::Any) = throw(ArgumentError("ZeroDimGrid has no boundaries"))
--- a/test/Grids/zero_dim_grid_test.jl	Tue Nov 28 08:51:58 2023 +0100
+++ b/test/Grids/zero_dim_grid_test.jl	Tue Nov 28 08:55:22 2023 +0100
@@ -41,4 +41,8 @@
     @testset "boundary_grid" begin
         @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_grid(ZeroDimGrid(@SVector[1.0,2.0]), :bid)
     end
+
+    @testset "boundary_indices" begin
+        @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_indices(ZeroDimGrid(@SVector[1.0,2.0]), :bid)
+    end
 end