Non-determinstic order in entity_closure_ids

Issue #21 resolved
Ivan Yashchuk created an issue

DualSet.entity_closure_ids[d][e] is a list coming from iteration over dicts - hence with non-deterministic order. It is fixed by sorting at FFC stage. It is better to be done in FIAT.

        # Compute the nodes on the closure of each sub_entity.
        self.entity_closure_ids = {}
        for dim, entities in iteritems(ref_el.sub_entities):
            self.entity_closure_ids[dim] = {}

            for e, sub_entities in iteritems(entities):
                ids = []

                for d, se in sub_entities:
                    ids += self.entity_ids[d][se]
                self.entity_closure_ids[d][e] = ids

List ids should be in ascending order

See: https://bitbucket.org/fenics-project/ffc/commits/695b3c0ffcb459663efaf73ede8aa45ed3a5787c#comment-4951199

Comments (5)

  1. Log in to comment