// Copyright (c) 2026 Petr BalvĂ­n (https://petrbalvin.org) // SPDX-License-Identifier: MIT package integrate import "testing" // TestSolvePoissonFEM2DNilMeshRefused pins the nil-mesh refusal: the // three-dimensional solve reports a nil mesh as an error, so the // two-dimensional one answers the same way instead of dereferencing // it and panicking. func TestSolvePoissonFEM2DNilMeshRefused(t *testing.T) { _, err := SolvePoissonFEM2D(nil, nil, FEMPoissonOptions{ Kappa: 1, DirichletNodes: []int{0}, DirichletValues: []float64{0}, }) if err == nil { t.Fatal("SolvePoissonFEM2D: expected an error for a nil mesh") } }