~ubuntu-branches/ubuntu/natty/dolfin/natty

« back to all changes in this revision

Viewing changes to site-packages/dolfin/fem/assemble.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2011-02-24 10:34:44 UTC
  • mfrom: (1.1.7 upstream) (14.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110224103444-n3fwnmh32lfoske0
Tags: 0.9.10-1
* New upstream release. This release fixes bug "FTBFS: error:
  'SCOTCH_Dgraph' was not declared in this scope" (closes: #612602).
* debian/control:
  - Add libslepc3.1-dev and libboost-thread-dev to Build-Depends and
    Depends field in binary package libdolfin0-dev.
  - Bump build dependency on python-ufc to >= 2.0.0.
  - Remove Build-Depends-Indep field as upstream no longer ships the
    user manual.
  - Remove old fields Conflicts, Provides, and Replaces from
    libdolfin0-dev, libdolfin0, libdolfin0-dbg, and python-dolfin.
* Remove all patches as they are now incorporated upstream.
* Add dolfin-plot and dolfin-version to debian/dolfin-bin.install.
* Remove .doc-base file since the user manual is removed by upstream.
* Remove targets clean and install/dolfin-doc from debian/rules since
  they are no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
rely on the dolfin::Form class which is not used on the Python side."""
10
10
 
11
11
__author__ = "Anders Logg (logg@simula.no)"
12
 
__date__ = "2007-08-15 -- 2009-12-11"
 
12
__date__ = "2007-08-15 -- 2010-11-04"
13
13
__copyright__ = "Copyright (C) 2007-2008 Anders Logg"
14
14
__license__  = "GNU LGPL Version 2.1"
15
15
 
116
116
 
117
117
    # Extract domains
118
118
    cell_domains, exterior_facet_domains, interior_facet_domains = \
119
 
                  _extract_domains(dolfin_form.mesh(),
120
 
                                   cell_domains,
121
 
                                   exterior_facet_domains,
122
 
                                   interior_facet_domains)
 
119
        _extract_domains(dolfin_form.mesh(),
 
120
                         cell_domains,
 
121
                         exterior_facet_domains,
 
122
                         interior_facet_domains)
123
123
 
124
124
    # Assemble tensor from compiled form
125
125
    cpp.assemble(tensor,
211
211
    if tensor is not None:
212
212
        return (tensor, reset_sparsity)
213
213
 
 
214
    # Check that reset_sparsity pattern is not False when not providing tensor
 
215
    if reset_sparsity == False:
 
216
        raise TypeError, "expected a tensor, when 'reset_sparsity' is 'False'"
 
217
 
214
218
    # Decide if we should reset the tensor
215
219
    use_cache = cpp.parameters["optimize_use_tensor_cache"] or \
216
220
                cpp.parameters["optimize"]
264
268
    # The cell dimension
265
269
    cell_dim = mesh.topology().dim()
266
270
 
 
271
    # Get cell_domains
267
272
    if isinstance(cell_domains, cpp.SubDomain):
268
273
        cell_domains = build_mf(cell_domains, cell_dim)
269
274
 
270
 
    # If no exterior facet domain is provided check if data is stored in the mesh
 
275
    # Get exterior_facet_domains (may be stored as part of the mesh)
271
276
    if exterior_facet_domains is None:
272
277
        exterior_facet_domains = mesh.data().mesh_function("exterior facet domains")
273
278
    elif isinstance(exterior_facet_domains, cpp.SubDomain):
274
279
        exterior_facet_domains = build_mf(exterior_facet_domains, cell_dim-1)
275
280
 
 
281
    # Get interior_facet_domains
276
282
    if isinstance(interior_facet_domains, cpp.SubDomain):
277
283
        interior_facet_domains = build_mf(interior_facet_domains, cell_dim-1)
278
284