Skip to content

Commit 72101a5

Browse files
authored
give better warning message in partition_coefficients (#58)
1 parent da5a7b4 commit 72101a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

psydac/fem/partitioning.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ def partition_coefficients(domain_decomposition, spaces, min_blocks=None):
6565

6666
for s, e, V, mb in zip(global_starts, global_ends, spaces, min_blocks):
6767
if V.periodic or mb is None:
68-
assert all(e-s+1 >= V.degree)
68+
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 \
69+
You can:\n \
70+
1. increase Nel\n \
71+
2. lower p\n \
72+
3. decrease the MPI size."
6973
else:
7074
assert all(e-s+1 >= mb)
7175

0 commit comments

Comments
 (0)