Mercurial > repos > public > sbplib_julia
view DiffOps/test/runtests.jl @ 235:a5fdc00d5070 boundary_conditions
Fix a bunch of compilation errors
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Jun 2019 17:54:32 +0200 |
parents | 30112f73555c |
children | 60011a10e17d |
line wrap: on
line source
using Test using DiffOps using Grids using SbpOperators using RegionIndices using LazyTensors @test_broken false @testset "BoundaryValue" begin op = readOperator(sbp_operators_path()*"d2_4th.txt",sbp_operators_path()*"h_4th.txt") g = EquidistantGrid((3,3), (0.0, 0.0), (1.0,1.0)) e_w = BoundaryValue(op, g, CartesianBoundary{1,Lower}()) e_e = BoundaryValue(op, g, CartesianBoundary{1,Upper}()) e_s = BoundaryValue(op, g, CartesianBoundary{2,Lower}()) e_n = BoundaryValue(op, g, CartesianBoundary{2,Upper}()) v = [ 1 2 3; 4 5 6; 7 8 9.0; 10 11 12; ] @test e_w isa TensorMapping{T,2,1} where T @test e_w' isa TensorMapping{T,1,2} where T @test domain_size(e_w, (3,2)) == (2,) @test domain_size(e_e, (3,2)) == (2,) @test domain_size(e_s, (3,2)) == (3,) @test domain_size(e_n, (3,2)) == (3,) @test collect(e_w'*v) == [1,4,7.0] end