diff --git a/src/calculate_projections.jl b/src/calculate_projections.jl index 71ffe28..39a4746 100644 --- a/src/calculate_projections.jl +++ b/src/calculate_projections.jl @@ -45,9 +45,8 @@ function project_from_master_to_slave{T<:Number}(::Type{Val{:Seg2}}, xm::Vector{ c = nom_c / denom_c d = b^2 - 4*a*c if d < 0 - warn("Mortar2D.calculate_projections(): negative discriminant") + warn("Mortar2D.calculate_projections(): negative discriminant $d") warn("xm = $xm, xs1 = $xs1, xs2 = $xs2, ns1 = $ns1, ns2 = $ns2") - error("negative discriminant d=$d when calculating projection") end sols = [-b + sqrt(d), -b - sqrt(d)]/(2.0*a) return sols[indmin(abs.(sols))] diff --git a/test/test_calculate_projections.jl b/test/test_calculate_projections.jl index 6f1bead..1722866 100644 --- a/test/test_calculate_projections.jl +++ b/test/test_calculate_projections.jl @@ -29,6 +29,5 @@ end xs2 = [291.474, 359.169] ns1 = [-0.0765221, 0.997068] ns2 = [0.251347, 0.967897] - # FIXME: fails for unknown reason - # project_from_master_to_slave(Val{:Seg2}, xm, xs1, xs2, ns1, ns2) + @test_throws DomainError project_from_master_to_slave(Val{:Seg2}, xm, xs1, xs2, ns1, ns2) end