awslabs / palace

3D finite element solver for computational electromagnetics
https://awslabs.github.io/palace/dev
Apache License 2.0
224 stars 50 forks source link

Bugfix: Coefficient for empty `attr_list` #176

Closed hughcars closed 5 months ago

hughcars commented 5 months ago

Description of changes: https://github.com/awslabs/palace/pull/166 introduced an issue where coefficients with matching attribute lists, might have different size K, if all the attributes are -1. This is a consequence of these lines where a coefficient goes from size zero to size 1, even if there were no local attributes associated. This triggers these lines if attr_mat is all -1, but the incoming coefficient is of size zero. This can occur if one rank does not have any piece of the relevant geometry. The fix is if attr_list is entry in adding a coefficient, to do nothing.