Beispiel #1
0
    def make_cell_node_list(self, global_numbering, entity_dofs):
        """Builds the DoF mapping.

        :arg global_numbering: Section describing the global DoF numbering
        :arg fiat_element: The FIAT element for the cell
        """
        return dmplex.get_cell_nodes(global_numbering, self.cell_closure, entity_dofs)
Beispiel #2
0
    def create_cell_node_list(self, global_numbering, fiat_element):
        """Builds the DoF mapping.

        :arg global_numbering: Section describing the global DoF numbering
        :arg fiat_element: The FIAT element for the cell
        """
        return dmplex.get_cell_nodes(global_numbering, self.cell_closure,
                                     fiat_element)
Beispiel #3
0
    def create_cell_node_list(self, global_numbering, fiat_element):
        """Builds the DoF mapping.

        :arg global_numbering: Section describing the global DoF numbering
        :arg fiat_element: The FIAT element for the cell
        """
        return dmplex.get_cell_nodes(global_numbering,
                                     self.cell_closure,
                                     fiat_utils.FlattenedElement(fiat_element))
Beispiel #4
0
    def make_cell_node_list(self, global_numbering, entity_dofs):
        """Builds the DoF mapping.

        :arg global_numbering: Section describing the global DoF numbering
        :arg fiat_element: The FIAT element for the cell
        """
        flat_entity_dofs = {}
        for b, v in entity_dofs:
            # v in [0, 1].  Only look at the ones, then grab the data from zeros.
            if v == 0:
                continue
            flat_entity_dofs[b] = {}
            for i in entity_dofs[(b, v)]:
                # This line is fairly magic.
                # It works because an interval has two points.
                # We pick up the DoFs from the bottom point,
                # then the DoFs from the interior of the interval,
                # then finally the DoFs from the top point.
                flat_entity_dofs[b][i] = (
                    entity_dofs[(b, 0)][2 * i] + entity_dofs[(b, 1)][i] + entity_dofs[(b, 0)][2 * i + 1]
                )

        return dmplex.get_cell_nodes(global_numbering, self.cell_closure, flat_entity_dofs)
Beispiel #5
0
    def make_cell_node_list(self, global_numbering, entity_dofs):
        """Builds the DoF mapping.

        :arg global_numbering: Section describing the global DoF numbering
        :arg fiat_element: The FIAT element for the cell
        """
        flat_entity_dofs = {}
        for b, v in entity_dofs:
            # v in [0, 1].  Only look at the ones, then grab the data from zeros.
            if v == 0:
                continue
            flat_entity_dofs[b] = {}
            for i in entity_dofs[(b, v)]:
                # This line is fairly magic.
                # It works because an interval has two points.
                # We pick up the DoFs from the bottom point,
                # then the DoFs from the interior of the interval,
                # then finally the DoFs from the top point.
                flat_entity_dofs[b][i] = \
                    entity_dofs[(b, 0)][2*i] + entity_dofs[(b, 1)][i] + entity_dofs[(b, 0)][2*i+1]

        return dmplex.get_cell_nodes(global_numbering,
                                     self.cell_closure,
                                     flat_entity_dofs)