This is an automated email from the git hooks/post-receive script. logari81 pushed a commit to branch master in repository getfem.
The following commit(s) were added to refs/heads/master by this push: new 06c65425 Add unit test for mumps context with multiple rhs 06c65425 is described below commit 06c65425c3cc56a41cac4b13af151e432d7e9874 Author: Konstantinos Poulios <logar...@gmail.com> AuthorDate: Thu May 1 09:17:03 2025 +0200 Add unit test for mumps context with multiple rhs --- interface/tests/python/check_mumps_ctx.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/interface/tests/python/check_mumps_ctx.py b/interface/tests/python/check_mumps_ctx.py index 441881ea..0900ebbb 100644 --- a/interface/tests/python/check_mumps_ctx.py +++ b/interface/tests/python/check_mumps_ctx.py @@ -59,25 +59,30 @@ ctx1.set_vector(rhs) ctx1.analyze() ctx1.factorize() x1 = ctx1.solve() -#print(x1) +#print("x1 =", x1) ctx1.set_vector(2*rhs) x1_times_two = ctx1.solve() -#print(x1_times_two) +#print("2*x1 =", x1_times_two) assert np.allclose(x1, x1_times_two/2) +ctx1.set_vector(np.vstack((rhs,2*rhs)).T) +x1,x1_times_two = np.unstack(ctx1.solve(), axis=1) +#print("x1 =", x1, "2*x1 =", x1_times_two) + + ctx2.set_matrix(K2) ctx2.set_vector(rhs) ctx2.analyze() ctx2.factorize() x2 = ctx2.solve() -#print(x2) +#print("x2 =", x2) ctx2.set_vector(2*rhs) x2_times_two = ctx2.solve() -#print(x2_times_two) +#print("2*x2 =", x2_times_two) assert np.allclose(x2, x2_times_two/2) @@ -100,13 +105,13 @@ ctx3.set_vector(rhs_cplx) ctx3.analyze() ctx3.factorize() x3 = ctx3.solve() -#print(x3) -#print(rhs_cplx) -#print(K3.mult(x3)) +#print("x3 =", x3) +#print("rhs_cplx =", rhs_cplx) +#print("K3.mult(x3) =", K3.mult(x3)) assert np.allclose(rhs_cplx, K3.mult(x3)) ctx3.set_vector(2*rhs_cplx) x3_times_two = ctx3.solve() -#print(x3_times_two) +#print("2*x3 =", x3_times_two) assert np.allclose(x3, x3_times_two/2)