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

« back to all changes in this revision

Viewing changes to ffc/backends/dolfin/functionspace.py

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2015-01-12 21:08:58 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20150112210858-16bep8qwomfo4dvi
Tags: 1.5.0-1
* New upstream release.
* debian/control:
  - Bump Standards-Version to 3.9.6 (no changes needed).
  - Bump X-Python-Version to >= 2.7.
  - Bump minimum required version for python-fiat, python-instant and
    python-ufl to 1.5.0.
  - Add python-numpy and python-six to Depends field.
  - Bump python-all-dev in Build-Depends to >= 2.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#
20
20
# Last changed: 2012-11-14
21
21
 
22
 
from includes import snippets
 
22
from .includes import snippets
23
23
 
24
24
__all__ = ["apply_function_space_template", "extract_coefficient_spaces",
25
25
           "generate_typedefs"]
48
48
 
49
49
    # Return coefficient spaces sorted alphabetically by coefficient
50
50
    # name
51
 
    names = spaces.keys()
 
51
    names = list(spaces.keys())
52
52
    names.sort()
53
53
    return [spaces[name] for name in names]
54
54
#-------------------------------------------------------------------------------
115
115
    // Do nothing
116
116
  }
117
117
 
118
 
  //--- Constructors for restricted function space, 2 different versions ---
119
 
 
120
 
  // Create restricted function space (reference version)
121
 
  %(classname)s(const dolfin::Restriction& restriction):
122
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
123
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new %(ufc_finite_element_classname)s()))),
124
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new %(ufc_dofmap_classname)s()),
125
 
                                                                                     reference_to_no_delete_pointer(restriction))))
126
 
  {
127
 
    // Do nothing
128
 
  }
129
 
 
130
 
  // Create restricted function space (shared pointer version)
131
 
  %(classname)s(std::shared_ptr<const dolfin::Restriction> restriction):
132
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
133
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new %(ufc_finite_element_classname)s()))),
134
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new %(ufc_dofmap_classname)s()),
135
 
                                                                                     restriction)))
136
 
  {
137
 
    // Do nothing
138
 
  }
139
 
 
140
 
  // Copy constructor
141
 
  ~%(classname)s()
142
 
  {
143
 
  }
144
 
 
145
118
};
146
119
"""
147
120
#-------------------------------------------------------------------------------