annotate test/BoundaryConditions/boundary_condition_test.jl @ 1167:fd80e9a0ef99 feature/boundary_conditions

Make use of discretize in sat functions
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 07 Dec 2022 21:56:00 +0100
parents d26aef8a5987
children bdcdbd4ea9cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1164
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
1 using Test
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
2
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
3 using Sbplib.BoundaryConditions
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
4 using Sbplib.Grids
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
5
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
6 grid_1D = EquidistantGrid(11, 0.0, 1.0)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
7 grid_2D = EquidistantGrid((11,15), (0.0, 0.0), (1.0,1.0))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
8 grid_3D = EquidistantGrid((11,15,13), (0.0, 0.0, 0.0), (1.0,1.0, 1.0))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
9 (id_l,_) = boundary_identifiers(grid_1D)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
10 (_,_,_,id_n) = boundary_identifiers(grid_2D)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
11 (_,_,_,_,id_b,_) = boundary_identifiers(grid_3D)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
12
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
13 @testset "BoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
15 @testset "ConstantBoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
16 c = float(pi)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
17 @test ConstantBoundaryData(c) isa BoundaryData
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
18 g_1D = discretize(ConstantBoundaryData(c),boundary_grid(grid_1D, id_l))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
19 g_2D = discretize(ConstantBoundaryData(c),boundary_grid(grid_2D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
20 @test g_1D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
21 @test g_2D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
22 @test g_1D(0.) == fill(c)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
23 @test g_2D(2.) == c*ones(11)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
24 @test_throws MethodError g_1D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
25 @test_throws MethodError g_2D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
26 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
27
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
28 @testset "TimeDependentBoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
29 f(t) = 1. /(t+0.1)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
30 @test TimeDependentBoundaryData(f) isa BoundaryData
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
31 g_1D = discretize(TimeDependentBoundaryData(f),boundary_grid(grid_1D, id_l))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
32 g_2D = discretize(TimeDependentBoundaryData(f),boundary_grid(grid_2D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
33 @test g_1D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
34 @test g_2D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
35 @test g_1D(0.) == f(0.)*fill(1)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
36 @test g_2D(2.) == f(2.)*ones(11)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
37 @test_throws MethodError g_1D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
38 @test_throws MethodError g_2D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
39 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
40
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
41 #TBD: Is it reasoanble to have SpaceDependentBoundaryData for 1D-grids? It would then be a constant
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
42 # which then may be represented by ConstantBoundaryData.
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
43 @testset "SpaceDependentBoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
44 f0() = 2
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
45 f1(x) = x.^2
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
46 f2(x,y) = x.^2 - y
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
47 @test SpaceDependentBoundaryData(f1) isa BoundaryData
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
48 g_1D = discretize(SpaceDependentBoundaryData(f0),boundary_grid(grid_1D, id_l))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
49 g_2D = discretize(SpaceDependentBoundaryData(f1),boundary_grid(grid_2D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
50 g_3D = discretize(SpaceDependentBoundaryData(f2),boundary_grid(grid_3D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
51 @test g_1D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
52 @test g_2D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
53 @test g_3D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
54 @test_broken g_1D(1.) == fill(f0()) # Does not work since evalOn for f0 returns ().
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
55 @test g_2D(2.) ≈ f1.(range(0., 1., 11)) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
56 @test g_3D(0.) ≈ evalOn(boundary_grid(grid_3D, id_n),f2) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
57 @test_throws MethodError g_1D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
58 @test_throws MethodError g_2D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
59 @test_throws MethodError g_3D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
60 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
61
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
62 # TBD: Include tests for 1D-grids? See TBD above
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
63 @testset "SpaceTimeDependentBoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
64 fx1(x) = x.^2
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
65 fx2(x,y) = x.^2 - y
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
66 ft(t) = exp(t)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
67 ftx1(t,x) = ft(t)*fx1(x)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
68 ftx2(t,x,y) = ft(t)*fx2(x,y)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
69 @test SpaceTimeDependentBoundaryData(ftx1) isa BoundaryData
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
70 g_2D = discretize(SpaceTimeDependentBoundaryData(ftx1),boundary_grid(grid_2D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
71 g_3D = discretize(SpaceTimeDependentBoundaryData(ftx2),boundary_grid(grid_3D, id_b))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
72 @test g_2D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
73 @test g_3D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
74 @test g_2D(2.) ≈ ft(2.)*fx1.(range(0., 1., 11)) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
75 @test g_3D(3.14) ≈ ft(3.14)*evalOn(boundary_grid(grid_3D, id_b),fx2) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
76 @test_throws MethodError g_2D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
77 @test_throws MethodError g_3D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
78 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
79
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
80 @testset "ZeroBoundaryData" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
81 @test ZeroBoundaryData() isa BoundaryData
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
82 g_2D = discretize(ZeroBoundaryData(), boundary_grid(grid_2D, id_n))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
83 g_3D = discretize(ZeroBoundaryData(), boundary_grid(grid_3D, id_b))
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
84 @test g_2D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
85 @test g_3D isa Function
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
86 @test g_2D(2.) ≈ 0.0*range(0., 1., 11) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
87 f(x,y) = 0
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
88 @test g_3D(3.14) ≈ 0.0*evalOn(boundary_grid(grid_3D, id_b), f) rtol=1e-14
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
89 @test_throws MethodError g_2D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
90 @test_throws MethodError g_3D(0.,0.)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
91 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
92 end
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
93
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
94 @testset "BoundaryCondition" begin
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
95 g = ConstantBoundaryData(1.0)
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
96 NeumannCondition(g,id_n) isa BoundaryCondition{ConstantBoundaryData}
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
97 DirichletCondition(g,id_n) isa BoundaryCondition{ConstantBoundaryData}
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
98 @test data(NeumannCondition(g,id_n)) == g
d26aef8a5987 Add types for different kinds of boundary data functions to discretize the data on the grid. Add tests
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
99 end