From e14b58406a3b515f73920767acd250b5fc7fd61f Mon Sep 17 00:00:00 2001 From: Stefan Possanner Date: Wed, 19 Nov 2025 13:12:32 +0100 Subject: [PATCH] give better warning message in partition_coefficients --- psydac/fem/partitioning.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/psydac/fem/partitioning.py b/psydac/fem/partitioning.py index de3a3acaf..7650e2d28 100644 --- a/psydac/fem/partitioning.py +++ b/psydac/fem/partitioning.py @@ -65,7 +65,11 @@ def partition_coefficients(domain_decomposition, spaces, min_blocks=None): for s, e, V, mb in zip(global_starts, global_ends, spaces, min_blocks): if V.periodic or mb is None: - assert all(e-s+1 >= V.degree) + assert all(e-s+1 >= V.degree), f"Local number of elements (after domain decomposition) is to small for spline degree p={V.degree}: {e-s+1} is not >= {V.degree} everywhere.\n \ + You can:\n \ + 1. increase Nel\n \ + 2. lower p\n \ + 3. decrease the MPI size." else: assert all(e-s+1 >= mb)