def __init__(self, element): nodes = element.dual.nodes dim = element.ref_el.get_spatial_dimension() if dim == 2: ref_el = UFCQuadrilateral() elif dim == 3: ref_el = UFCHexahedron() else: raise ValueError("Illegal element dimension %s" % dim) entity_ids = element.dual.entity_ids flat_entity_ids = flatten_entities(entity_ids) dual = DualSet(nodes, ref_el, flat_entity_ids) super(FlattenedDimensions, self).__init__(ref_el, dual, element.get_order(), element.get_formdegree(), element._mapping) self.element = element # Construct unflattening map for passing correct values to tabulate() self.unflattening_map = compute_unflattening_map( self.element.ref_el.get_topology())
def __init__(self, element): nodes = element.dual.nodes dim = element.ref_el.get_spatial_dimension() if dim == 2: ref_el = UFCQuadrilateral() elif dim == 3: ref_el = UFCHexahedron() else: raise ValueError("Illegal element dimension %s" % dim) entity_ids = element.dual.entity_ids flat_entity_ids = flatten_entities(entity_ids) dual = DualSet(nodes, ref_el, flat_entity_ids) super(FlattenedDimensions, self).__init__(ref_el, dual, element.get_order(), element.get_formdegree(), element._mapping) self.element = element # Construct unflattening map for passing correct values to tabulate() self.unflattening_map = compute_unflattening_map(self.element.ref_el.get_topology())
def _entity_support_dofs(self): return flatten_entities(self.product.entity_support_dofs())