~ubuntu-branches/ubuntu/vivid/ffc/vivid

« back to all changes in this revision

Viewing changes to ffc/quadratureelement.py

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2014-06-03 18:26:02 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20140603182602-zvnubjjh7i78e1v0
Tags: 1.4.0-1
* New upstream release.
* debian/control:
  - Add swig in Build-Depends.
  - Remove python-ufc from Depends.
  - Add ufc and python-ufc to Provides, Conflicts and Replaces.
  - Remove python-ferari and python-dolfin from Suggests.
  - Bump minimum required version for python-fiat, python-instant and
    python-ufl to 1.4.0.
* debian/rules: Add override for auto clean target to remove generated
  cmake and pkg-config files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        # Create quadrature (only interested in points)
52
52
        # TODO: KBO: What should we do about quadrature functions that live on ds, dS?
53
53
        # Get cell and facet names.
54
 
        cellname = ufl_element.cell().cellname()
55
 
        #facet_cellname = ufl_element.cell().facet_cellname()
 
54
        domain, = ufl_element.domains() # Assuming single domain
 
55
        cellname = domain.cell().cellname()
 
56
        #facet_cellname = domain.cell().facet_cellname()
56
57
        points, weights = create_quadrature(cellname, degree, self._quad_scheme)
57
58
 
58
59
        # Save the quadrature points
59
60
        self._points = points
60
61
 
61
62
        # Create entity dofs.
62
 
        ufc_cell = reference_cell(ufl_element.cell().cellname())
 
63
        ufc_cell = reference_cell(cellname)
63
64
        self._entity_dofs = _create_entity_dofs(ufc_cell, len(points))
64
65
 
65
66
        # The dual is a simply the PointEvaluation at the quadrature points
68
69
 
69
70
        # Save the geometric dimension.
70
71
        # FIXME: KBO: Do we need to change this in order to integrate on facets?
71
 
        self._geometric_dimension = ufl_element.cell().geometric_dimension()
 
72
        #        MSA: Not the geometric dimension, but maybe the topological dimension somewhere?
 
73
        self._geometric_dimension = domain.geometric_dimension()
72
74
 
73
75
    def space_dimension(self):
74
76
        "The element space dimension is simply the number of quadrature points"
121
123
        values = numpy.eye(len(self._points))
122
124
        return {(0,)*self._geometric_dimension: values}
123
125
 
124
 
def _create_entity_dofs(cell, num_dofs):
 
126
def _create_entity_dofs(fiat_cell, num_dofs):
125
127
    "This function is ripped from FIAT/discontinuous_lagrange.py"
126
128
    entity_dofs = {}
127
 
    top = cell.get_topology()
 
129
    top = fiat_cell.get_topology()
128
130
    for dim in sorted( top ):
129
131
        entity_dofs[dim] = {}
130
132
        for entity in sorted( top[dim] ):