From 33efef12a40bb12fa43a43a7fb79bdecc0e7bfd0 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 27 Jun 2015 19:21:49 +0300 Subject: [PATCH] added test to check non-homogeneous boundary condition elimintation --- test/test_elasticity_solver.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_elasticity_solver.jl b/test/test_elasticity_solver.jl index 74ff918..142eaf3 100644 --- a/test/test_elasticity_solver.jl +++ b/test/test_elasticity_solver.jl @@ -270,3 +270,13 @@ facts("remove boundary conditions from vector with 2 dof/node") do A2 = full(sparsevec(I, V)) @fact A2 => [2 3]' end + +facts("test that elimination of non-homogeneous dirichlet boundary conditions raises error because they are not supported atm") do + A = sparse(reshape(1:4*4, 4, 4)) + I, J, V = findnz(A) + dirichletbc = [0 1; NaN 0]' + @fact_throws I, J, V = eliminate_boundary_conditions(dirichletbc, I, J, V) + A = sparsevec([1, 2, 3, 4]) + I, J, V = findnz(A) + @fact_throws I, V = eliminate_boundary_conditions(dirichletbc, I, V) +end